reoclo env
reoclo env ls [options]reoclo env set [options] <KEY=VAL...>reoclo env set [options] --ref <project> <KEY[=SECRET_KEY]...>reoclo env rm [options] <key>reoclo env get [options] <key>All env subcommands operate on a single application. Pass --app <idOrSlug> to select it.
Lists the keys defined for an application, where each value comes from and its build option. Values are write-only via the API and are not returned.
$ reoclo env ls --app webKEY SOURCE BUILD UPDATEDDATABASE_URL value - 2026-11-14T09:12:03ZNEXT_PUBLIC_API_URL value public 2026-11-14T09:12:03ZNPM_TOKEN web-ci/NPM_TOKEN secret 2026-11-14T09:15:40Z- SOURCE is
valuefor a stored value, orproject/KEYfor a variable that reads a key in a secret project. A reference Reoclo cannot resolve is marked(unresolvable). - BUILD is
publicfor a public build value,secretfor a build secret, or-for neither. See Build values and secrets.
With -o json, each line carries build_public, build_secret, source and secret_ref.
set <KEY=VAL...>
Section titled “set <KEY=VAL...>”Sets one or more environment variables. Existing keys are overwritten.
reoclo env set --app api DATABASE_URL=postgres://...reoclo env set --app api LOG_LEVEL=debug FEATURE_X=onFor values that contain spaces or shell metacharacters, quote them or use --from-file:
reoclo env set --app api WELCOME_MSG='Hello, world'reoclo env set --app api --from-file .env.production(--from-file reads KEY=VALUE lines, ignoring comments and blank lines.)
Build options
Section titled “Build options”Pool builds read only the variables you mark for them. Mark a variable as you set it (CLI 0.110.0 or later):
| Flag | Effect |
|---|---|
--public-build | Public build value: compose build arguments may read it with ${VAR}, and it may ship in the image |
--build-secret | Build secret: builds read it, the running container never gets it |
--no-public-build | No longer a public build value |
--no-build-secret | No longer a build secret |
reoclo env set --app web --public-build NEXT_PUBLIC_API_URL=https://api.example.com NEXT_PUBLIC_APP_VERSION=4.2.0reoclo env set --app web --build-secret NPM_TOKEN=npm_xxxA variable is one or the other, never both, so --public-build and --build-secret together exit with code 2. Marking one turns the other off. A set without these flags keeps the variable’s current option, so updating a value does not unmark it.
Values from a secret project
Section titled “Values from a secret project”--ref <project> stores a reference to a key in a secret project (name or id) instead of a copy of its value. Each argument is KEY, which reads the project key of the same name, or KEY=SECRET_KEY. Combine it with a build option to use the project’s value in a pool build without copying it into the application:
reoclo env set --app web --ref production-product-landing --public-build NEXT_PUBLIC_GA_MEASUREMENT_ID NEXT_PUBLIC_INTERCOM_APP_IDreoclo env set --app web --ref production-product-landing --build-secret CMS_TOKEN=CONTENTFUL_ACCESS_TOKENAdding a reference needs the admin role and write access to the project.
Applying changes
Section titled “Applying changes”A successful set does not redeploy the application, and the command says so (Applies on the next deploy.). Trigger a deploy when you want the new values to take effect:
reoclo env set --app api LOG_LEVEL=inforeoclo apps deploy apirm <key>
Section titled “rm <key>”Removes a single environment variable.
reoclo env rm --app api OLD_FLAGget <key>
Section titled “get <key>”Always exits non-zero with a hint pointing to the dashboard. Values are write-only. Reading them back is intentionally not supported via the API. View secrets in the dashboard’s Environment tab if you need to retrieve a value.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Server-side error |
| 2 | Bad arguments (e.g. set without KEY=VAL, or with both --public-build and --build-secret) |
| 3 | Authentication failure |
| 4 | Read attempted via get |
| 5 | App or key not found |
| 7 | Control plane unreachable: DNS, connection refused, or timeout (CLI 0.55.0+, earlier versions report 1) |
Related
Section titled “Related”reoclo apps deploy: apply env changes by redeployingreoclo secrets: manage the secret projects--refreads from- Build values and secrets: what pool builds can read