Skip to content

Environments

An environment is a named set of variables in your encrypted vault, attached to a Vaulterm Code project. The project’s terminals, tasks and debug sessions get its variables, on this computer or on a saved server, with no .env file on disk.

Vaulterm Code comes with Vaulterm 0.1.1. In Vaulterm, open it with Code at the top left.

Environments need Pro. Without it, a lock stands where the buttons would be, and opens a sheet titled “Environments come with Vaulterm Pro.”

Open Settings → Code → Environments and press Add environment. Give it a Name, such as production, then press Add variable for each variable and fill in its name and value. Tick Secret on the ones that should stay hidden, and press Save.

When a project’s top folder has a .env file, a bar offers Move .env into the vault. The bar names the file it found, which can be .env, .env.local, .env.development or .env.production.

Vaulterm reads the file and ticks the variables that look secret, by their names (such as SESSION_SECRET or API_TOKEN) or by what the value looks like. Tick or clear any it got wrong, give the environment a name under Environment name, and press Move. The values go into the vault, and the project uses the environment from then on.

Afterwards, two separate buttons are on offer: Add .env to .gitignore and Delete the .env file. Vaulterm asks before deleting, and a deleted file can’t be brought back.

Moving a .env attaches the new environment to that project. To attach another, open Project environments from the status bar, pick one and press Add. A project can use several, in order: when two set the same variable, the later one wins.

Their variables reach the project’s terminals, tasks and debug sessions from then on. A terminal that was already open keeps its old values until you restart it. The Environments item in the status bar gets a dot, and Project environments says Restart terminals to use the new values.

A task’s or launch configuration’s own env wins over every environment. If Pro ends, the status bar shows Environments off: Pro ended, and terminals start without them.

Kind In Vaulterm In output
Secret Shown as ••••••, and never shown again once saved. Replace sets a new value. ••••••, for values of 6 characters or more
Plain Shown and editable Shown as it is

Output means what terminals, tasks, the debug console and agents print. A secret shorter than 6 characters can’t be hidden there, and Vaulterm warns you as you type it.

Coding agents started in a project get none of the variables unless Agents get these too is on for that environment. You can turn it on in the environment’s sheet under Settings → Code → Environments.

On a saved server, the values travel over the SSH connection, and a small wrapper exports them before your program starts. No file is written on the server. There the values are in your programs’ environment, which you and root can read, as any environment variable is.