Skip to main content

Quickstart

Connect your application and reach its first execution with team secrets.

:::info Before you start An Envshed account (the first sign-in creates it: Start free) and Node.js 20.12 or later. :::

1. Install the CLI​

terminal
npm install -g envshed

Just trying it? Run any command with npx envshed@latest instead, no install needed. See Install the CLI.

From your application folder, run:

terminal
cd ~/my-app
npx envshed@latest init

Init signs in when needed and resumes after device authorization. Then it asks step by step: the organization and project (reuse or create), the environment each .env file goes to, the default environment, and a final confirmation. If you started in the dashboard, copy its init command to reuse the context already chosen.

If the folder has .env files, init lists them in a table with the environment each one goes to. Change any row, then continue. Only file names and secret counts are shown, never values, and nothing is written before you confirm.

Init writes shared metadata to .envshed.json; tokens remain in your personal credential store. A monorepo or parent folder containing several applications can connect each app to its own project in the same setup. Existing setup is reused. See init for options and recovery.

3. Prepare values and run​

Add values in the dashboard, or import the files you already have during init. Existing team projects can go straight to execution. When init ends, it prints hints, including the command that runs your application with injected variables. For example:

terminal
npx envshed@latest run -- npm run dev

Replace the example with your application's command. No env file is required or created by run. The process and authorized children can still read their injected variables; avoiding an env file reduces exposure on disk without isolating those processes.

To make this the default, put the envshed run -- command in your dev script yourself, or run init with --wrap-script. Init does not change your scripts or .env files on its own.

4. Select another environment​

terminal
npx envshed@latest env staging
npx envshed@latest branch

This saves a personal selection for the checkout, outside Git. Shared project defaults and local env files stay unchanged. For one command only, use run -e staging. Flags and ENVSHED_ENV take precedence over the saved selection. Reset it with env checkout --reset. CI ignores personal selections.

Optional file compatibility​

For tools that require files, export explicitly:

terminal
npx envshed@latest pull

The file contains plaintext values. Review overwrite prompts and keep it out of Git. See pull and the checkout migration.

Next steps​