Environment variables
Environment variables are stored encrypted. Secrets are write-only: once set, their values are never shown again by the CLI, console, API or MCP. Changes reach the running app on its next deploy; pass --redeploy to apply them now.
Rules: names match [A-Za-z_][A-Za-z0-9_]* (up to 128 characters), values up to 32 KB, up to 100 variables per project. Names starting with TC_, and DATABASE_URL, PORT, HOSTNAME, PATH, HOME, NODE_OPTIONS, are reserved.
tc env ls
tc env ls [--project NAME] [--json]
tc env and tc env list do the same.
Output
SUPPORT_EMAIL support@contoso.com
SLACK_WEBHOOK •••••••• (secret)
Changes are not live yet: `tc redeploy -p expenses` (or --redeploy).
Static sites print a note instead: they have no runtime, so env vars don't reach them.
JSON: { project, vars: [{ name, secret, value, masked, updatedAt, updatedBy }], pendingRedeploy, staticSite }.
tc env set
Adds or changes variables.
tc env set NAME=VALUE... [--secret] [--redeploy] [--project NAME] [--json]
| Flag | Description |
|---|---|
--secret | Store all given variables as secrets (write-only) |
--redeploy | Redeploy the production build now so the app sees the change |
tc env set SUPPORT_EMAIL=support@contoso.com
tc env set SLACK_WEBHOOK=https://hooks.slack.com/… --secret --redeploy
Errors: Expected NAME=VALUE; INVALID_ENV (reserved or invalid name, value too large); TOO_MANY_ENV.
tc env unset
Removes variables. tc env rm is an alias.
tc env unset NAME... [--redeploy] [--project NAME] [--json]
Errors: ENV_NOT_FOUND.