Interact with another REPL/Terminal using Julia?

How would I go about reading and writing from another REPL/Terminal using Julia? I think it can be done with the readandwrite function, but I can’t figure it out. For example say I wanted to use the command line calculator bc from Julia, I’d image the pseudo-code to be something like:

input,output = create_repl(`bc`)
write(input, "4+4")
read(output)
"8"

I actually want to interact with headless chrome in REPL mode, something like this

I’m bad at searching, it was here all along. Still unsure why readline works but read doesn’t…