Skip to content

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.

Terminal window
$ reoclo env ls --app web
KEY SOURCE BUILD UPDATED
DATABASE_URL value - 2026-11-14T09:12:03Z
NEXT_PUBLIC_API_URL value public 2026-11-14T09:12:03Z
NPM_TOKEN web-ci/NPM_TOKEN secret 2026-11-14T09:15:40Z
  • SOURCE is value for a stored value, or project/KEY for a variable that reads a key in a secret project. A reference Reoclo cannot resolve is marked (unresolvable).
  • BUILD is public for a public build value, secret for 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.

Sets one or more environment variables. Existing keys are overwritten.

Terminal window
reoclo env set --app api DATABASE_URL=postgres://...
reoclo env set --app api LOG_LEVEL=debug FEATURE_X=on

For values that contain spaces or shell metacharacters, quote them or use --from-file:

Terminal window
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.)

Pool builds read only the variables you mark for them. Mark a variable as you set it (CLI 0.110.0 or later):

FlagEffect
--public-buildPublic build value: compose build arguments may read it with ${VAR}, and it may ship in the image
--build-secretBuild secret: builds read it, the running container never gets it
--no-public-buildNo longer a public build value
--no-build-secretNo longer a build secret
Terminal window
reoclo env set --app web --public-build NEXT_PUBLIC_API_URL=https://api.example.com NEXT_PUBLIC_APP_VERSION=4.2.0
reoclo env set --app web --build-secret NPM_TOKEN=npm_xxx

A 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.

--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:

Terminal window
reoclo env set --app web --ref production-product-landing --public-build NEXT_PUBLIC_GA_MEASUREMENT_ID NEXT_PUBLIC_INTERCOM_APP_ID
reoclo env set --app web --ref production-product-landing --build-secret CMS_TOKEN=CONTENTFUL_ACCESS_TOKEN

Adding a reference needs the admin role and write access to the project.

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:

Terminal window
reoclo env set --app api LOG_LEVEL=info
reoclo apps deploy api

Removes a single environment variable.

Terminal window
reoclo env rm --app api OLD_FLAG

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.

CodeMeaning
0Success
1Server-side error
2Bad arguments (e.g. set without KEY=VAL, or with both --public-build and --build-secret)
3Authentication failure
4Read attempted via get
5App or key not found
7Control plane unreachable: DNS, connection refused, or timeout (CLI 0.55.0+, earlier versions report 1)