Contexts
Where your app runs. Readable name, generated slug, Open or Locked.
Last updated: 2026-09-27
What is a context
A context is a set of values for one place your app runs: Development, Staging, a preview, a customer. Every context shows the same variable names. A name with no value in a context is missing there.
Names and slugs
Names use letters A-Z, numbers, spaces, dots, underscores or hyphens, and start with a letter or number. The slug is generated from the name and used in commands. "Customer Acme" becomes customer-acme. A taken slug gets a suffix, like staging-2.
A context is a place your app runs. To sort variables like secrets and config, use tags.
Renaming a context keeps its slug. You can edit the slug on purpose in context settings. Commands that use the old slug stop working.
Open and Locked
- Open: the CLI can read and write. Folder and guest tokens reach open contexts. The wrapped key may be cached in
.getmyenv/key.json. - Locked: the CLI is read-only. Set values in the dashboard. Only a server token bound to that context can read it, from an allowlisted IP. Each new machine needs approval unless trusted. The key is never cached.
Locked controls who can fetch ciphertext. Values in both use the same project key. Access checks use the protection setting, never the name or slug.
Defaults
New projects start with Development (open) and Production (locked). A new context with the slug production defaults to locked. Guest projects have Development only until claim.
The CLI picks a context in this order: the one given in the command, the server token's context, context in .getmyenv/project.json, then development.
Create, copy, change
npx getmyenv context list
npx getmyenv context create "Customer Acme" --from development
npx getmyenv context use customer-acme # this folder's defaultThe CLI creates open contexts only, and copies from open contexts only. In the dashboard you can create locked contexts, copy from any context, change protection, rename, and delete. Copying moves ciphertext on the server without decrypting. Changing Locked to Open asks for confirmation. The last context cannot be deleted.