Setup and safety

Managed SSH (1Password), sending keys, and ${NAME} secrets

Hand an API token or .env to an agent without pasting it into chat, keep workspace secrets safely in your OS secret store, reference ${NAME} variables in layouts, and gate SSH/Git signing through 1Password.

  • Updated December 1, 2026
  • 8 min read
  • 3 primary sources
  • 3 steps
  • You act in steps 1, 2 and 3

Quick verdict

Quick verdict

  • Click the key button beside any agent’s paperclip to send an API token, private key, or .env without pasting it into chat: the agent receives only the key name and reads it once within 10 minutes via a pane-bound one-read pipe.
  • Use whole-value ${NAME} references in workspace startup environments so secrets never sit in layout.yaml, and choose Use once or Keep (Settings › Saved secrets) for credentials stored in the macOS Keychain or private 0600 files.
  • Turn on Managed SSH (off by default, macOS and Linux) to route Claude and Codex SSH and Git operations through your 1Password SSH agent with per-request attribution, human Allow / Deny, and sanitized Git execution.

What you get

What you get

You & local secret stores

  • Key button beside paperclip (masked, Use once or Keep)
  • 1Password SSH agent retains private keys
  • macOS Keychain / Linux 0600 files / Windows owner-only files

Agent pane (local or paired)

  • Sees only key name & id (never the value in chat or logs)
  • One-time cmdbrief_secret_take within 10 minutes
  • Managed SSH/Git prompts you with reason & destination
Secrets stay on the host; cross-computer sends use the encrypted direct line only

Pasting an API token, .env file, or private key directly into an agent chat writes it into the prompt history, transcript files, and provider requests. CmdBrief replaces copy-paste secrets with three dedicated mechanisms — Send a secret, `${NAME}` layout references, and Managed SSH through 1Password — while keeping credentials strictly local to each machine. If you also register local or remote MCP servers, see how to run an MCP server without Docker to keep credentials out of config files.

Where CmdBrief stores secrets on Mac, Linux, and Windows

PlatformCredential storage locationImportant boundary
macOSmacOS Keychain (ee.cmdbrief.account, ee.cmdbrief.apikeys, ee.cmdbrief.local-access.*, ee.cmdbrief.saved-secrets.*)Authorization follows the app’s code-signing identity; MCP helpers never read the Keychain directly.
LinuxPrivate `0600` files inside ~/.local/share/CmdBrief/secrets/ (0700 folder)Any program running as the same Linux user can read those files.
WindowsOwner-only files inside %USERPROFILE%\AppData\Local\CmdBrief\secretsSame-user boundary; Managed SSH is still marked Coming soon on Windows.
CmdBrief never copies CLI sign-ins (~/.claude, ~/.codex, etc.) or saved workspace secrets between computers.

When you move a workspace to another computer, its saved secrets remain on the original computer; when you delete a workspace, CmdBrief removes that workspace’s saved secrets on that computer. See Multiple CLI accounts and usage limits and Pair another Mac or Windows PC for how paired computers stay isolated.

Send an API token or .env with the key button

You do thisKey button beside the paperclip in any agent pane

  1. Click the key button next to the paperclip in any Standard agent pane (including mirrored panes on a paired computer with full use, where values travel over the encrypted direct line).
  2. Enter a name and paste a token, password, private key, or click Choose file to load a UTF-8 file such as .env (binary files are refused and the file path is not kept). Click Add field to send up to 8 named values together (up to 64 KB per value, 128 KB total).
  3. Masked fields display 12 dots regardless of length with copy/cut disabled; Show automatically re-masks after 30 seconds, when the window loses focus, or on Send. PEM and OpenSSH private keys preserve LF line endings and their final newline.
  4. Pick Use once (held only in host memory for 10 minutes) or Keep (saved for that workspace in the local secret store, up to 50 per workspace, manageable under Settings › Saved secrets with a per-secret Ask each time toggle), then click Send.

The agent receives only the key’s name, value names, and an ID — the secret never appears in the chat transcript, logs, or tool results. Within 10 minutes, only a process the OS kernel ties to that exact pane and active session may call cmdbrief_secret_take(id) once:

  • One-read named pipe on macOS and Linux: CmdBrief creates a mode 0600 FIFO under <app support>/secret-drops/ (0700) that unlinks the instant one reader opens it (TOKEN="$(cat <path>)" or ssh-add - < <path>), and deletes it after 10 minutes if unread. (On Windows, CmdBrief creates an owner-only file removed after 10 minutes.)
  • Session-bound expiry: if the pane closes, clears, hands off, or restarts before the secret is taken, the dropped secret is wiped immediately and the new session cannot take it.
  • Agent-initiated requests (`cmdbrief_ask_secret`): leads and crew members can ask you for secrets via a masked card docked over the message box (foldable to one line so you can inspect the chat first). You can Send, Decline, or reply in words; chat apps and Voice show that a request waits but cannot view field names or submit secrets.
  • Workspace passwords too: since v0.5.101 (see the changelog), allowing cmdbrief_reveal_workspace_password also delivers the password through a one-read 10-minute private file instead of returning it inside a tool result.

Check it worked

  • Agent chatSend a test token with Use once via the key buttonThe chat shows You sent … with the key name only (never the value), and the agent reads it once via cmdbrief_secret_take.
  • Settings › Saved secretsInspect a secret sent with KeepListed under its workspace with Ask each time and Remove; no raw value is printed.

Use ${NAME} references in workspace layouts

You do thisWorkspace layout YAML and run target editor

Startup environment entries in workspace layouts and run targets support whole-value ${NAME} references. CmdBrief resolves each reference from its own environment when the pane launches so tokens never sit in layout.yaml or exported templates:

Example run-target env block in layout.yamlyaml
env:
  STRIPE_WEBHOOK_SECRET: "${STRIPE_WEBHOOK_SECRET}"
  POSTHOG_API_KEY: "${POSTHOG_API_KEY}"
  NODE_ENV: "development"

References must span the whole value. Unset variables are skipped at launch with a warning toast.

  • The run-target editor flags secret-looking literal values so you can replace them with ${NAME} before saving.
  • Exporting a workspace layout prompts for confirmation before writing any literal secret-like value.
  • If you run a headless Linux server, pipe connector, OpenRouter, or DeepSeek keys over stdin with cmdbrief settings set <key> instead of putting them in shell history (see the CLI reference).

Enable Managed SSH with the 1Password SSH agent

You do thisSettings › Coordination › Managed SSH

Managed SSH is off by default and supports local panes on macOS and Linux (marked Coming soon on Windows). It attributes every agent SSH or Git signing request to its exact workspace, tab, pane, and stated reason before forwarding a single signature to 1Password.

  1. Turn on the SSH agent in 1Password › Settings › Developer › SSH agent. CmdBrief checks the socket at ~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock on macOS or ~/.1password/agent.sock on Linux (1Password’s Flatpak and Snap builds on Linux do not provide an SSH agent).
  2. Open Settings › Coordination › Managed SSH, verify the socket check succeeds (CmdBrief checks reachability without requesting keys or signatures), turn Managed SSH on, and save.
  3. Start a new agent pane after turning Managed SSH on — existing sessions do not gain the helper environment or routing hooks retroactively.
  4. When a Claude or Codex agent runs SSH or Git (fetch, pull, push, ls-remote), its pre-tool hook routes covered commands through $CMDBRIEF_SSH_HELPER (cmdbrief ssh / cmdbrief git) or the local MCP tools (cmdbrief_ssh_start, _status, _cancel).
  5. Review each signing dialog showing the pane, agent, workspace, resolved host, quoted command/Git args, reason, and key fingerprint. Click Allow for one request, Deny to stop it, or tick Keep allowing before Allow for a session-only, in-memory standing grant (revocable in the right sidebar’s SSH section; never persisted across restarts, and repositories outside the workspace always prompt).
How agents invoke the Managed SSH helperbash
cmdbrief ssh --reason "Check service status before proposing a restart" \
  -- [email protected] 'systemctl status cmdbrief'

cmdbrief git --reason "Fetch the upstream branch before comparing changes" \
  -- fetch origin

If a login shell resets PATH, agents invoke "$CMDBRIEF_SSH_HELPER" in place of cmdbrief. Each operation uses a private 0700 folder under /private/tmp (macOS) or /tmp (Linux) with a 0600 broker socket.

  • No silent fallback: if 1Password later becomes unavailable, Managed SSH stays on and reports the problem instead of falling back to ordinary SSH.
  • Stricter Managed Git: runs /usr/bin/git in a private allow-listed folder so repository hooks, core.sshCommand, filters, and aliases cannot execute; stages new objects/refs privately and rejects symlinks inside .git, reftable repositories, and Git LFS pushes. pull fetches only and instructs the agent to merge locally without SSH.
  • Own-key hosts (`IdentityAgent none`): hosts configured with IdentityAgent none in your ~/.ssh/config (such as an internal dev or Linux build box) bypass Managed SSH and run directly — ignoring any caller-supplied -o IdentityAgent=none or -i flags — and are logged as Direct runs.
  • Expiry & audit trail: pending signing requests expire after 10 minutes (the top-bar Needs you button turns red at 2 minutes left, and an expired request leaves a pinned notice). The app-global SSH access pane keeps up to 500 metadata records for 7 days (ssh-auth-history.json).

Check it worked

  • Your terminalssh -G my-dev-box | grep -i identityagentShows identityagent none for hosts that should bypass 1Password and run directly.
  • Settings › Coordination › Managed SSHClick Open SSH access after running one managed fetchThe operation appears under its workspace with decision, signature count, exit code, and duration.

If it fails

  • Agent gets “That secret was already taken, its 10 minutes ran out, or the session it was sent to ended.”

    You do this

    Secrets sent via the key button are single-use and bound to the exact session for 10 minutes. Send it again from the key button (or approve a saved secret).

  • Pane header shows SSH: restart agent after enabling Managed SSH

    Start a fresh pane and agent session so CmdBrief attaches the private runtime/ssh-bin helper and verifies the control-socket ancestry.

  • Settings › Coordination › Managed SSH cannot find 1Password on Linux

    You do this

    Confirm ~/.1password/agent.sock exists and 1Password was installed from the native .deb/.rpm package — Flatpak and Snap builds of 1Password have no SSH agent.

  • Managed git pull exits 1 after fetching, or a push is refused for Git LFS

    You do this

    By design, Managed Git pull fetches only so the agent merges locally without SSH, and Git LFS pushes are refused before sending. Run LFS pushes yourself in a normal terminal.

  • An own-key dev host still triggers Managed SSH review

    Remove caller overrides like -i, -F, -o IdentityAgent=none, or GIT_SSH_COMMAND from the command — only your ~/.ssh/config IdentityAgent none makes a host direct.

  • Managed SSH toggle is dimmed on Windows

    Managed SSH is still marked Coming soon on Windows; use Send a secret and ${NAME} layout references there today.

Questions

Can a crew member take a secret I sent to the lead pane?

No. cmdbrief_secret_take checks kernel process identity and live pane ancestry (LOCAL_PEERPID on macOS, SO_PEERCRED on Linux, and Windows process checks). Any other pane receives “That secret was sent to another agent.”

Can I approve Managed SSH requests from Grok Bot or my phone?

Yes, for a single request only. With Remote control on and reach over that workspace, a connected chat app (as well as a paired computer with Full use or your own Linux terminal outside CmdBrief’s cgroup via cmdbrief answer host:ssh:... Allow) can send a one-time Allow or Deny—never “Keep allowing”—and the request still hands off to 1Password on the host computer. CLI sign-ins, computer sign-in approvals, and secret asks (cmdbrief_ask_secret) can never be answered from a chat app.

Does a cached 1Password approval bypass CmdBrief’s Managed SSH dialog?

No. Even if 1Password recently authorized a key, CmdBrief still gates every managed request until you click Allow (or grant an in-memory Keep allowing approval for that pane, destination, and key).

What happens to a secret I sent with “Keep” when I delete the workspace?

Deleting the workspace removes its saved secrets from that computer’s secret store. You can also remove any saved secret individually under Settings › Saved secrets.

Still unsure? Write to [email protected] or use the contact form. Contact CmdBrief →

Primary sources

Provider terms and product behavior can change. Confirm plan, pricing, model, and permission details in the current official documentation.

We use cookies to analyze site usage.