# \[ANN\] Autoloads.jl

**URL:** <https://discourse.julialang.org/t/ann-autoloads-jl/143159>\
**Category:** Package Announcements\
**Created:** [November 24, 2026, 3:34pm UTC](https://discourse.julialang.org/t/ann-autoloads-jl/143159 "2026-11-24T15:34:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tecosaur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tecosaur/32/23206_2.png) [@tecosaur](https://discourse.julialang.org/u/tecosaur)\
**Post date:** [November 24, 2026, 3:34pm UTC](https://discourse.julialang.org/t/ann-autoloads-jl/143159/1 "2026-11-24T15:34:55Z")

</div>

I am very happy to finally announce (the recently registered) Autoloads.jl, a package which has been about four years in the making!

> **[GitHub - tecosaur/Autoloads.jl: Mirror of...](https://github.com/tecosaur/Autoloads.jl)**
>
> Mirror of https://code.tecosaur.net/tec/Autoloads.jl

# Backstory

I don’t like repetition, being nagged, or being interrupted on my way to do things. All of which are reasons why being told “X is undefined” at in the REPL when reaching for a handy function from a utility package etc. is an experience I have wanted to minimise for a while. I come from the land of Emacs where packages use the magic comment `###;;;autoload` to make it so that you can call a function before it’s defined, and so `M-x do-useful-thing` works regardless of whether or not its package was initially loaded.

Back when I did a survey of `startup.jl` files on GitHub (in 2022) and came across Fredrick Ekre’s [“automatic tool loading”](https://github.com/fredrikekre/.dotfiles/blob/7bd9a5404198b63e3d6717aba4acedbe2bc5eb99/.julia/config/startup.jl#L27-L64), it told me that it would be possible to do something similar in Julia, and so I souped it up and added a slightly fancier version to my [Setup.jl](https://code.tecosaur.net/tec/Setup.jl) (I turned my `startup.jl` into a package).

Lilith and I chatted about Julia configuration at JuliaCon 2023, and then the next year [over on Zulip](https://julialang.zulipchat.com/#narrow/channel/137791-general/topic/Autoloads/near/423954381) we talked more. This lead to Lilith creating the lovely BasicAutoloads.jl later in 2024 ([Discourse announcement thread](https://discourse.julialang.org/t/automatically-load-tooling-with-basicautoloads-jl/113212)).

Meanwhile, I still wasn’t quite happy with what I had. You see, I had a vision where it would all _just work_, no thinking about what functions/macros I wanted to trigger what packages, etc. For the two years since, my ambition has been greater than my todo list can support, but the Autoloads package I envisioned still existed in my mind.

A couple of weeks ago, I thought I could probably dump the package in my mind into Claude Code with Opus 5.5, and it should be able to make it happen. It wasn’t perfect, but it was close enough that it’s just taken me about a week of mixed manual code-review-tweaking + prompting to finally realise the package in my mind.

# But what does it _do?_

After you add `using Autoloads` to your `startup.jl` you’ll notice it adds a new Pkg.jl subcommand: `pkg> autoloads`, from which you can add packages. Here’s my current set:

```julia-auto
(@v1.14) pkg> autoloads st
Global autoloads ~/.julia/environments/v1.14/autoloads
  ✓ About v1.0.4 2 exports
  ✓ CSV v1.3.0 1 export, 11 public
  ✓ Chairmarks v1.3.1 3 exports, 4 public
  ✓ ColorSchemes v3.32.0 13 exports
  ✓ Colors v0.13.4 143 exports
  ✓ Combinatorics v1.1.0 43 exports
  ✓ DataFrames v1.8.3 77 exports
  ✓ Distributions v0.25.134 242 exports
  ✓ JSON v1.13.4 11 exports, 18 public
  ✓ Primes v0.5.7 17 exports
  ✓ SpecialFunctions v2.9.2 77 exports
  ✓ StatsBase v0.34.13 173 exports
  ✓ WhyNotEqual v0.2.1 3 exports

```

All of the packages you register like this (`pkg> autoloads add ...`) are added to a sibling environment within the global environment’s workspace (not part of your global environment, but resolved together), and Autoloads.jl reads all the public + exported names and records them in a state file loaded at startup.

This means that you can then _just use_ functions/variables/types from those packages _as if they were already loaded_ and Autoloads will cleverly notice and load as required on-demand.

All of the benefit of a massive global environment eagerly loaded at startup, none of the drawbacks.

# But wait, there’s more

Autoloads will also index the current project and its immediate dependencies, making them available as autoloads. You can see what it’s doing with `pkg> autoloads st`:

```julia-auto
Project autoloads ~/.julia/dev/KangarooTwelve/Project.toml
  ✓ KangarooTwelve v1.0.0 2 exports
  ✓ Mmap v1.11.0 2 exports
  ✓ Polyester v0.7.19 4 exports
  ✓ PrecompileTools v1.3.4 4 exports
  ✓ SIMD v3.7.2 19 exports

```

This means when I’m working on my KangarooTwelve.jl package for example, I don’t even need to bother with `using KangarooTwelve` before calling functions from it, I can just open a fresh REPL and type `@b k12("hello there")` and `@b` will be _automatically_ loaded from the global autoloads, and `k12` from the `KangarooTwelve` project. No `using`s in sight.

# But wait, there’s _even_ more

While Autoloads only does automatic loading of packages you explicitly specify/have in the current project, it pays attention to every single package loaded in the REPL, which means that when you forget to add/import a package it can remind you which one(s) provide the name you just tried to use. E.g.

```julia-auto
julia> heatmap
ERROR: UndefVarError: `heatmap` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Hint: heatmap is provided by packages that are not loaded:
  • pkg> add Makie
  • pkg> add UnicodePlots
  • pkg> add CairoMakie (re-exports from Makie)

```

# Performance and configuration

Autoloads works best when it sits in your `startup.jl` as a `using Autoloads` line. To help ensure this doesn’t get in the way of using the REPL, the package has been carefully structured and aggressively optimised to minimise latency. Even with the more involved initialisation (read a state file, set up autocompletions in the REPL, etc.) it should’t add more than a small handful of milliseconds to your startup.

There are a few ways that you can tweak Autoloads’ behavior (see [the README](https://github.com/tecosaur/Autoloads.jl#settings)) but it’s all managed via `[preferences]`, for example to stop `@spawn` from Distributed from conflicting with Base.Threads, you can use this configuration:

```toml
[preferences.Autoloads]
packages.Distributed = {skip = ["@spawn"]}

```

# Try it!

To me, Autoloads sits in a sweet-spot of automagical behaviour: it just makes it easier for me to do things in the REPL without the “ceremony” of actually thinking about what packages I want to load for what and typing out the required `using` statements 😛

Give it a shot! Let me know if you find it as useful as I do, and if you spot any misbehaviors (currently it’s tested to the level of “it works on my machine”)!

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [November 24, 2026, 5:18pm UTC](https://discourse.julialang.org/t/ann-autoloads-jl/143159/2 "2026-11-24T17:18:54Z")

</div>

I’m anxious to try it out. Looks like it’s still stuck in the registration queue as of 2026-11-24T09:18:47-08:00

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [November 24, 2026, 5:31pm UTC](https://discourse.julialang.org/t/ann-autoloads-jl/143159/3 "2026-11-24T17:31:00Z")

</div>

The [registration PR](https://github.com/JuliaRegistries/General/pull/177185) was merged six hours ago. The time before it’s available on the package servers can vary, but if you’re impatient you can always install it by URL.
