Keep secrets
Declare a project’s secrets in its takt.yml, for every job or for one job:
secrets:
RAILS_MASTER_KEY: { from_file: config/master.key }
OPENAI_API_KEY: $(pass show openai/api-key)
GITHUB_TOKEN: # bare: the submitter's GITHUB_TOKEN
jobs:
deploy:
run: bin/deploy
secrets:
DEPLOY_KEY: { from_env: PROD_DEPLOY_KEY }
| Form | Value from |
|---|---|
NAME: |
the submitter’s environment variable NAME |
NAME: { from_env: OTHER } |
the submitter’s OTHER |
NAME: { from_file: config/master.key } |
a file in the repository; from a linked worktree, the main checkout’s copy when the worktree has none |
NAME: $(pass show api/key) |
expanded like a double-quoted .env value: $VAR and $(command) work, so any password manager’s CLI does |
Commit only references, never values. A secret that can’t be read is named in one line at submit, and the job runs without it.
How they travel
- Read on your machine. At submit,
takt runreads each secret where you are. - Sealed to one worker. Each worker has its own key pair. Takt seals the values with a NaCl sealed box to the public key of the worker that runs the job; only that worker can open them.
- Ciphertext only on the coordinator. The coordinator relays the sealed box and can’t read it. It keeps it only until the job ends, outside the database, then deletes it.
- Environment only. The worker opens the box in memory, right before the job starts, and passes the values to the job’s environment: in its container, or into its macOS or Windows VM. Nothing is written to disk.
- Masked. A secret that shows up in the job’s output is replaced with
[REDACTED]. Values never reach the database, the dashboard,takt statusor MCP output.
A job never receives a secret its project doesn’t declare, and a worker only receives secrets for the job it runs. Only join machines you trust: see Run Takt safely.