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):
| Priority | Source |
|---|---|
| 1 (highest) | CLI flags (-o, -p, -e) |
| 2 | Project config (.envshed.json) |
If a required value is missing from both sources, the command exits with an error.
API URL
| Priority | Source |
|---|---|
| 1 (highest) | --api-url flag (on login and init) |
| 2 | apiUrl in .envshed.json |
| 3 | apiUrl in ~/.envshed/config.json |
| 4 | ENVSHED_API_URL environment variable |
| 5 (lowest) | Default: https://app.envshed.com |
Authentication token
| Priority | Source |
|---|---|
| 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.