# Autoload packages - an option?

**URL:** https://discourse.julialang.org/t/autoload-packages-an-option/139219
**Category:** General Usage
**Created:** [September 5, 2026, 5:30am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219 "2026-09-05T05:30:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [September 5, 2026, 5:30am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219/1 "2026-09-05T05:30:08Z")

</div>

I am looking at WaterLily examples. I try to run one of thr example files, and get a load error asking me to add StaticArrays and Plots  
Julia file has:  
using WaterLily,StaticArrays,Plots

I have already used Pkg to install WaterLily. It is frustrating to add more packages by hand just to get something running.

Could this be frustrating to newbies?

---

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [September 5, 2026, 5:31am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219/2 "2026-09-05T05:31:11Z")

</div>

I see that BasicAutoloads.jl and Autoloads.jl exist.  
However they look a faff to set up.

---

<div class="post-metadata">

### Author: ![cshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cshen/32/217287_2.png) [@cshen](https://discourse.julialang.org/u/cshen)
#### Post date: [September 5, 2026, 7:00am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219/3 "2026-09-05T07:00:54Z")

</div>

I use BasicAutoloads.jl and it’s pretty set and forget.  
Add it to your default environment and load it and set it up in you startup.jl file.

It works quite well when paired with ShareAdd.jl with the @usingany macro. That way you don’t have to care in which environment you have your package to autoload.

---

<div class="post-metadata">

### Author: ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)
#### Post date: [September 5, 2026, 8:21am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219/4 "2026-09-05T08:21:08Z")

</div>

The smooth general solution would be to use an environment in the same folder that has those installed and make sure it is instantiated.

Maybe a bit easier to access would be a Pluto notebook that takes care of that automatically.  
I think you run this in REPL the REPL should even ask you whether you want to install them? See

```julia-repl
❯ julia --project=temp
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.12.7 (2026-08-15)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org release
|__/ |

julia> using WaterLily,StaticArrays,Plots # I hit enter here
 │ Package WaterLily not found, but a package named WaterLily is available from a registry.
 │ Install package?
 │ (temp) pkg> add WaterLily
 └ (y/n/o) [y]: y # [install follows]

```

I was surprised it even installed the others directly as well. But yeah REPL asks.

---

<div class="post-metadata">

### Author: ![langestefan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/langestefan/32/207923_2.png) [@langestefan](https://discourse.julialang.org/u/langestefan)
#### Post date: [September 5, 2026, 9:12am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219/5 "2026-09-05T09:12:20Z")

</div>

Did you clone [GitHub - WaterLily-jl/WaterLily-Examples: WaterLily tutorial files · GitHub](https://github.com/WaterLily-jl/WaterLily-Examples) ?

If you start a REPL from that folder, and run `julia --project=.` it will activate the project for you, with all the needed dependencies.

---

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [September 5, 2026, 9:28am UTC](https://discourse.julialang.org/t/autoload-packages-an-option/139219/6 "2026-09-05T09:28:36Z")

</div>

Aha. I did not go down to the Water lily directory.  
I ran Julia --project =. In a directory abovevWaterLily
