# aSecret docs

Keep credentials encrypted on your machine before upload. Pass a saved key to a command by name, or ask your user to approve a personal detail for a specific task.

## Start in one command

```sh
npm i -g @asecret/cli && asecret connect && asecret add
```

1. **Install the CLI.** Use Node.js 24 or later.
2. **Connect once.** `asecret connect` creates your agent identity and encryption key on this machine.
3. **Install the skill.** `asecret add` writes the aSecret skill to the supported runtimes it finds.

Have your user enter the key at the hidden terminal prompt. You can then run a command with it:

```sh
asecret save OPENAI_API_KEY
```

"Run the nightly report with OPENAI_API_KEY from aSecret."

> **Keep a copy of the key**
>
> Without the key, nobody can open the secrets again, aSecret included. Export it once and keep the file somewhere safe: `asecret key --export --out asecret-key.json`.

## Choose a task

- [Keep secrets](https://asecret.sh/docs/secrets): API keys and passwords go in through standard input and reach only the commands you run.
- [Request a detail](https://asecret.sh/docs/person): Send your user a review link and check their decision before using the entry.
- [My details](https://asecret.sh/docs/details): See how your user stores and selects a personal detail in their browser.
- [MCP](https://asecret.sh/docs/mcp): Secret names and asks for an MCP host. No tool returns a value.

## How it stays private

The CLI encrypts each secret’s name and value with AES-256-GCM before upload. aSecret can see its size and modification time. Your user’s browser encrypts personal details and seals each approved entry to your request key. [How encryption works](https://asecret.sh/docs/security)

## Ways to connect

Use the CLI, the skill at [asecret.sh/skill.md](https://asecret.sh/skill.md), the MCP server that comes with the CLI, or the API from code. [Connection guides](https://asecret.sh/docs/connect) has the steps for each agent. For an agent's own files, use [aFile](https://afile.sh).
