# How do I redirect stdin to interactive Julia?

**URL:** <https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322>\
**Category:** General Usage\
**Created:** [April 23, 2025, 8:38am UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322 "2025-04-23T08:38:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![phma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phma/32/6576_2.png) [@phma](https://discourse.julialang.org/u/phma)\
**Post date:** [April 23, 2025, 8:38am UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322/1 "2025-04-23T08:38:40Z")

</div>

I need to run a Pkg command on several remote boxen. I wrote a file like this:

```julia
]
dev ../Foo/ ../Bar/ ../Baz/ ../Quux/

```

and ran `julia --project -i </path/to/file` in the project directory. Julia responded:

```julia
ERROR: ParseError:
# Error @ none:1:1
]
╙ ── unexpected `]`
Stacktrace:
 [1] top-level scope
   @ none:1

```

If I run `julia --project -i` and then type `]`, I get a `pkg>` prompt and can run `dev`. How do I get Julia to run an interactive session with input from a file instead of the keyboard?

---

<div class="post-metadata">

**Author:** ![barucden](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barucden/32/26154_2.png) [@barucden](https://discourse.julialang.org/u/barucden)\
**Post date:** [April 23, 2025, 8:50am UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322/2 "2025-04-23T08:50:07Z")

</div>

I believe `]` is only recognized when you directly type it in REPL ([Pasting "]" into the Julia REPL is inconsistent across platforms · Issue #58041 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/58041)).

You can use `Pkg` this way instead:

```julia
using Pkg
Pkg.develop(path="../Foo")
Pkg.develop(path="../Bar")
Pkg.develop(path="../Baz")

```

which can be called from the CLI:

```bash
julia --project -e 'using Pkg; Pkg.develop(path="../Foo"); Pkg.develop(path="../Bar"); Pkg.develop(path="../Baz");'

```

---

<div class="post-metadata">

**Author:** ![phma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phma/32/6576_2.png) [@phma](https://discourse.julialang.org/u/phma)\
**Post date:** [April 23, 2025, 9:40am UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322/3 "2025-04-23T09:40:22Z")

</div>

I know that

```julia
dev ../Foo/
dev ../Bar/

```

doesn’t work, because of dependencies. Can I call `Pkg.develop` with multiple arguments?

---

<div class="post-metadata">

**Author:** ![barucden](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barucden/32/26154_2.png) [@barucden](https://discourse.julialang.org/u/barucden)\
**Post date:** [April 23, 2025, 10:31am UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322/4 "2025-04-23T10:31:40Z")

</div>

> [@phma](#):
>
> Can I call `Pkg.develop` with multiple arguments?

```julia
Pkg.develop([Pkg.PackageSpec(path="../Foo"), 
             Pkg.PackageSpec(path="../Bar"),
             Pkg.PackageSpec(path="../Baz")])

```

Not sure if there’s a more convenient interface.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [April 23, 2025, 12:20pm UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322/5 "2025-04-23T12:20:21Z")

</div>

you can also do `pkg"dev ..."`

---

<div class="post-metadata">

**Author:** ![phma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phma/32/6576_2.png) [@phma](https://discourse.julialang.org/u/phma)\
**Post date:** [April 24, 2025, 7:44pm UTC](https://discourse.julialang.org/t/how-do-i-redirect-stdin-to-interactive-julia/128322/6 "2025-04-24T19:44:47Z")

</div>

I think I’ll try that, but if not I’ll just do it by hand. There are only 12 boxen, and I don’t think I’ll have to do it more than once for each.
