Skip to main content

Configuration Resolution

The CLI resolves settings from multiple sources, with higher-priority sources overriding lower ones.

Organization, project, and environment

For org, project, and env (used by pull, push, run, and listing commands):

PrioritySource
1 (highest)CLI flags (-o, -p, -e)
2Project config (.envshed.json)

If a required value is missing from both sources, the command exits with an error.

API URL

PrioritySource
1 (highest)--api-url flag (on login and init)
2apiUrl in .envshed.json
3apiUrl in ~/.envshed/config.json
4ENVSHED_API_URL environment variable
5 (lowest)Default: https://app.envshed.com

Authentication token

PrioritySource
1 (highest)token in ~/.envshed/config.json

There is no flag to pass a token per-command. Use envshed login or envshed token set to configure it.

Working directory

When running the CLI via pnpm --filter, the working directory changes to the package directory. The CLI uses the INIT_CWD environment variable (set automatically by pnpm/npm) to resolve file paths and find .envshed.json from the original directory.