Cofounder Docs

Secrets and Environment Files

Where secrets live: managed app secrets that ship to deploy targets, database secrets, and local environment files.

There are two kinds of secrets in play, and they live in different places. App secrets are values your deployed app reads at runtime. Local secrets are what your environment needs to talk to Cofounder — COFOUNDER_API_TOKEN and friends.

App secrets

cofounder secrets manages the values your company's deployed app reads: third-party API keys, webhook secrets, anything that would sit in a production env file.

MCPCLIAPI
secrets_setcofounder secrets set KEYPOST /cofounder-cli/v1/secrets
secrets_listcofounder secrets listGET /cofounder-cli/v1/secrets
secrets_deletecofounder secrets delete KEYDELETE /cofounder-cli/v1/secrets/{key}

secrets set prompts for the value or reads it from --stdin, so it never ends up in your shell history. secrets list shows key names and metadata only — values are write-only.

Database secrets

Edge functions on the managed Supabase project have their own store:

MCPCLIAPI
supabase_secrets_setcofounder supabase secrets setPOST /cofounder-cli/v1/company/database/secrets
supabase_secrets_listcofounder supabase secrets listGET /cofounder-cli/v1/company/database/secrets

Local environment files

Local development keeps secrets out of Cofounder entirely — they're for the app running on your machine. Keep them in the repo's gitignored env file (.env.local, .env) and never commit them. Anything the deployed app needs belongs in secrets instead.

CLI environment variables

The variables the CLI itself reads:

VariableControls
COFOUNDER_API_TOKENBearer token for CLI, API, and MCP clients
COFOUNDER_COMPANY_IDPins the active company for every call
COFOUNDER_API_URLAPI base URL override
COFOUNDER_CONFIG_DIRWhere the CLI stores credentials (default ~/.cofounder)
COFOUNDER_CLI_TELEMETRYOpts a dev-environment CLI into telemetry — reporting cannot be switched off

Export them in your environment — the CLI never reads repo env files for its own credentials.

Next steps

Running more than one company under this account? Multiple Companies covers the selection model and per-command scoping.