# Pkg.jl: Splitting the default environment in two

**URL:** <https://discourse.julialang.org/t/pkg-jl-splitting-the-default-environment-in-two/109950>\
**Category:** Internals & Design\
**Created:** [February 8, 2024, 8:17pm UTC](https://discourse.julialang.org/t/pkg-jl-splitting-the-default-environment-in-two/109950 "2024-02-08T20:17:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [February 8, 2024, 8:17pm UTC](https://discourse.julialang.org/t/pkg-jl-splitting-the-default-environment-in-two/109950/1 "2024-02-08T20:17:56Z")

</div>

It’s useful to have an environment that’s inherited, for things like Revise.jl and OhMyREPL.jl. It’s also useful to have an environment that’s activated by default when running `julia`, for quick interactive sessions.

Currently those are both the same environment: the `@v1.10` shared environment is (1) activated by default AND (2) inherited in project-local environments. I suspect this sharing is not ideal, because the convenience of the default environment tempts users to install lots of things into it, which then show up as accessible in their project sessions.

Personally I have two environments: `@v1.10` for Revise.jl and OhMyREPL.jl, and `@main` for quick interactive sessions with heavier dependencies like Makie.jl.

I wonder if this would be a good default behavior: separate the inherited environment `v1.10-inherited` from the default environment `v1.10-standalone`, where `julia` automatically activates `v1.10-standalone`. It’s a little more complicated, but it seems less likely to cause problems.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [February 8, 2024, 8:41pm UTC](https://discourse.julialang.org/t/pkg-jl-splitting-the-default-environment-in-two/109950/2 "2024-02-08T20:41:07Z")

</div>

You could set the [`JULIA_PROJECT`](https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_PROJECT) environment variable in your `.bashrc` or equivalent to achieve this effect.

```julia
$ export JULIA_PROJECT="@main"

$ julia -E "Base.active_project()"
"/home/mkitti/.julia/environments/main/Project.toml"

$ julia -E "Base.load_path()"
["/home/mkitti/.julia/environments/main/Project.toml", "/home/mkitti/.julia/environments/v1.10/Project.toml", "/home/mkitti/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10"]

$ julia --project=temp -E "Base.load_path()"
["/home/mkitti/temp/Project.toml", "/home/mkitti/.julia/environments/v1.10/Project.toml", "/home/mkitti/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10"]

```
