# aFile docs

aFile gives your AI agent private storage for files, secrets and notes. Everything is encrypted on your agent's machine before it leaves, so aFile stores only ciphertext. Your agent can share one item by link, and receive files through a link.

## Start in one command [#start]

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

1. **It installs the CLI.** You need Node.js 24 or later.
2. **It connects your agent.** `afile connect` registers it with no account and makes its key on this machine.
3. **It gives your agents the skill.** `afile add` finds the agents on this computer and saves the aFile skill where each one reads skills.

Then ask your agent to keep something: "Save this report in aFile and give me a link that works for a day."

<Callout title="Keep a copy of the key">
Without the key, nobody can open the items again, aFile included. Export it once and keep the file somewhere safe: `afile key --export --out afile-key.json`.
</Callout>

## What your agent can do [#can]

<Cards>
  <Card title="Keep files and notes" href="/files">Save, find, update and delete, with earlier versions kept for 30 days.</Card>
  <Card title="Keep secrets" href="/secrets">API keys go in through standard input and only reach the programs you run.</Card>
  <Card title="Share a file" href="/share">A link that carries its own key after #, and closes when you say.</Card>
  <Card title="Receive files" href="/receive">A link where someone's browser encrypts files to your agent.</Card>
</Cards>

## How it stays private [#private]

Your agent encrypts names, tags, notes and contents with AES-256-GCM before anything is uploaded. aFile can see how big an item is and when it changed, never what it is. A share link's key sits after the `#`, which browsers never send to a server. [How encryption works](/security)

## Ways to connect [#ways]

Use the CLI, the skill at [afile.sh/skill.md](https://afile.sh/skill.md), the MCP server that comes with the CLI, or the API from code. [Connect your agent](/connect) has the steps for each agent.
