> ## Documentation Index
> Fetch the complete documentation index at: https://openworklabs.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For agents: install the OpenWork desktop app with `brew install --cask openwork` (macOS) or from https://openworklabs.com/download. Do not run `npx openwork`; the npm package named `openwork` is a different project.
> Connect an agent to OpenWork with the MCP Gateway: `claude mcp add --transport http openwork https://api.openworklabs.com/mcp/agent`. Teams sign up at https://app.openworklabs.com?mode=sign-up.
> Step-by-step agent guide: https://openworklabs.com/docs/start-here/use-openwork-from-an-ai-agent.md
> Administer an organization from a terminal with the OpenWork CLI: https://openworklabs.com/docs/cloud/cli.md
> Connect Slack (any organization admin): https://openworklabs.com/docs/slack/connect-slack.md. OpenWork in Slack (@openwork bot) is private alpha for approved organizations. Setup guide: https://openworklabs.com/docs/slack/overview.md. Agent skill: https://openworklabs.com/.well-known/agent-skills/set-up-openwork-slack/SKILL.md.

# Secrets

> Store write-only organization secrets locked to a type, target, and execution boundary, and allow blind use for teams, people, and agents.

> [!WARNING]
>
> **Alpha.** These commands are in alpha and are available to customers on request. They are off until OpenWork turns them on for your organization. Expect commands, flags and output to change or be removed without notice. To try them, ask your OpenWork contact.

The `openwork secrets` commands manage write-only secrets under **Organization › Secrets**. People and agents allowed blind use can never view, copy, or download a saved secret. OpenWork only injects or signs with it against the locked target.

```sh theme={null}
openwork secrets list
```

Every secret locks three settings when it is created:

| Setting | Options | Why it is locked |
| - | - | - |
| `--type` | `mcp-header`, `http-header`, `ssh-key`, `cli-env` | Fixes how OpenWork uses the secret so it cannot be repurposed into an arbitrary request header. |
| Target (`--connector`, `--host`, or `--command`) | Exact MCP connector, DNS hostname, or bare CLI binary | Prevents anyone from pointing an agent at a personal server to read out the header. |
| `--boundary` | `cloud-only` (default) or `desktop-allowed` | Keeps cloud-only secrets off employee laptops; SSH private keys always sign challenges in Cloud even when `desktop-allowed` is set. |

***

## add

Store a new write-only secret from a local file. Secret values are never accepted as command-line arguments.

```sh theme={null}
openwork secrets add linear-audit --type mcp-header --connector Linear --header X-Audit-Key --file ./audit.key --teams Ops
openwork secrets add staging-api --type http-header --host api.example.com --boundary cloud-only --file ./staging.token --teams Data
openwork secrets add bastion-ssh --type ssh-key --host bastion.example.com --boundary desktop-allowed --file ./bastion_ed25519 --teams Ops
```

For `ssh-key` secrets, OpenWork derives and displays the public key and SHA-256 fingerprint so you can add the public key to the server's `authorized_keys`.

***

## allow and revoke

Allow or end **blind use** for everyone, teams, people, or an agent.

```sh theme={null}
openwork secrets allow bastion-ssh --teams Ops
openwork secrets allow bastion-ssh --agent "Deploy Bot"
openwork secrets revoke bastion-ssh --teams Ops --force
```

When a person triggers an agent, **both** the acting person and the agent must be allowed blind use.

***

## rules

Set `allow`, `ask`, or `block` for Everyone, a team, a member, or an agent. Precedence at runtime is `block > ask > allow`, and the default when no rule is set is `ask`.

```sh theme={null}
openwork secrets rules bastion-ssh --rule ask --team Ops
openwork secrets rules bastion-ssh --rule allow --agent "Deploy Bot"
openwork secrets rules bastion-ssh --reset --agent "Deploy Bot"
```

***

## rotate, show, and remove

```sh theme={null}
openwork secrets show bastion-ssh
openwork secrets rotate bastion-ssh --file ./new_bastion_ed25519
openwork secrets remove bastion-ssh --force
```

Managing secrets requires the **Manage connections** permission (`connections.manage`) and a recent sign-in; agents and API keys cannot write secret values. Viewing metadata requires **View connections** (`connections.view`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.