Secrets
Project secrets (API keys, .env files) live in 1Password. Your repo declares what it needs in
.dwfs.toml, a project owner binds each name to a 1Password item, and machines receive those values
on boot. Values are scrubbed from command output before the agent, log, or UI ever see them, and
they are never saved in workspace snapshots.
Connect 1Password
Section titled “Connect 1Password”Your operator must enable 1Password on the cluster first. Then an org
owner or admin connects a 1Password service account (available on Teams and Business plans).
Service accounts cannot access personal vaults, so create a dedicated vault for Anastro in the
Developer section of 1Password.com or via the op CLI.
In Settings → Secrets, click Connect 1Password (from a signed-in device—never an API key), paste the service account token, check the vaults the org may read, and optionally pick a write vault for agent-created secrets. Anyone in the org can also connect a personal service account for their own threads and machines.
From the CLI (piping keeps the token off your screen; omitting the pipe prompts interactively):
op service-account create "Anastro acme" --vault "Anastro acme:read_items,write_items" \ | anastroctl org 1password connect --vault "Anastro acme" --write-vault "Anastro acme"write_items and --write-vault are only needed if you want agents to
save secrets.
| Option | Effect |
|---|---|
--vault |
Vaults the org may use (repeatable; defaults to every vault the token can see) |
--write-vault |
Vault where agents save new secrets |
--personal |
Scope the connection to your own threads and machines |
anastroctl org 1password listanastroctl org 1password set <id> --vault "Anastro acme" --write-vault "Anastro acme"anastroctl org 1password delete <id> # drops its bindings and removes those secrets from machinesDeclare secrets in .dwfs.toml
Section titled “Declare secrets in .dwfs.toml”Add [[secret]] entries in .dwfs.toml at your workspace root:
[[secret]]name = "STRIPE_KEY" # injected as an environment variableenv = "STRIPE_KEY"
[[secret]]name = "app-env"path = ".env" # written to disk, excluded from snapshots, removed on stopmode = "0600"Bind secrets to a project
Section titled “Bind secrets to a project”Project owners map each secret name to a 1Password field—Anastro lets you browse vaults, items, and field names without ever displaying values. Open the project menu → Project settings → Secrets → Bind secret (or click Bind next to an unbound name a machine requested), or use the CLI:
anastroctl org 1password items <connection> "Anastro acme"anastroctl org 1password fields <connection> "Anastro acme" "Stripe test"anastroctl project secret bind --project api STRIPE_KEY "op://Anastro acme/Stripe test/credential" --approval first-useanastroctl project secret list --project api # bindings, last-read times, and unbound namesanastroctl project secret unbind --project api STRIPE_KEYAny project binding not declared in .dwfs.toml is still injected automatically as an environment
variable of the same name.
--approval |
When a project editor must approve |
|---|---|
none (default) |
Never |
first-use |
First time a given machine asks for it |
every-use |
Every time a machine boots and asks for it |
Approve machine access
Section titled “Approve machine access”Pending secret approvals show up in Project settings → Secrets with Approve and Deny buttons, or from the CLI:
anastroctl project secret approvals --project apianastroctl project secret approve --project api <approval>anastroctl project secret approve --project api <approval> --denyOnly human project editors can approve; agents never can.
How secrets reach a machine
Section titled “How secrets reach a machine”- On boot, the host fetches secrets from the control plane as the person the machine acts for. 1Password is queried once per boot; binding, approval, or membership changes propagate within about 30 seconds.
- Env secrets are injected into every command and terminal environment—never written to disk.
- File secrets are written with their configured file mode, excluded from snapshots, and deleted when the machine stops.
- Rotating a value in 1Password takes effect on the machine’s next boot. If the acting user loses project access, the machine drops its secrets on the next check.
Output scrubbing
Section titled “Output scrubbing”Before command output reaches the agent, thread log, or UI, Anastro replaces every secret value
with [secret:NAME]—including base64-encoded, URL-encoded, and per-line multi-line variants.
Values shorter than 6 characters aren’t scrubbed. Because interactive terminals stream chunk by
chunk, a secret split across two reads can occasionally slip through in a terminal.
Agents saving secrets
Section titled “Agents saving secrets”When an agent creates a new credential (like a restricted API key), it can pipe it into
anastro-secret (preinstalled in every machine) so the value lands in 1Password without ever
printing to stdout:
stripe api_keys create --restricted ... --format json | jq -r .secret \ | anastro-secret save STRIPE_RESTRICTED_KEY --kind api-credential --host api.stripe.com --bind# saved STRIPE_RESTRICTED_KEY → op://Anastro acme/api · STRIPE_RESTRICTED_KEY/credential (pending approval)| Option | Effect |
|---|---|
--kind |
api-credential, password, secure-note, or document |
--host |
Target host shown to the approver |
--bind |
Also bind this name in the project for future machines |
--replace |
Overwrite an item previously saved by this project (always requires approval) |
--from-file, --from-env |
Read the value from a file or env var instead of stdin |
The value is scrubbed from the machine’s output immediately. Saved items are named
<project> · <NAME> and tagged with the project, machine, and thread.
Project owners control whether agents may save secrets—and whether saves require approval (the default)—under Project settings → Secrets → Agents save secrets. Pending saves show the command that created them (never the secret value) with Save to 1Password, Change (rename or move vault), and Reject:
anastroctl project set --project api --allow-save true --save-approval alwaysanastroctl project secret saves --project apianastroctl project secret approve-save --project api <save>anastroctl project secret approve-save --project api <save> --name STRIPE_KEY_RO --vault "Anastro acme"anastroctl project secret approve-save --project api <save> --rejectRolling back a thread does not delete secrets already saved to 1Password.
- Connectors: give threads tools from Linear, Sentry, and other MCP servers.
- Full design: Secrets come from 1Password in the spec.