# Get started with BotPassword

Source: https://botpassword.com/docs/guides/getting-started

Status: P2-1b (M2-1). This guide covers a new account, from installing the tools to a second device. Each step is marked **built** or **not built yet**.

> **Do not store real credentials yet.** BotPassword is at G0/G1 (SECURITY.md). Every account is a disposable test account. Use synthetic logins and keys only.

The production service (`https://api.botpassword.com` and `https://app.botpassword.com`) is **not live yet**. Until it is, run the control plane and the account web UI locally. The commands below use the local addresses. The production form is shown beside each one.

## 1. Install `bpw`, the daemon and the desktop app

**Not built yet:** signed installers, Homebrew, winget and the store builds (M1-11). Build from source for now. You need Rust stable, pnpm 12 and, on macOS, the Xcode command-line tools.

```bash
cargo build --release -p bpw -p botpasswordd -p bpw-native-host
mkdir -p ~/.local/bin && cp target/release/bpw target/release/botpasswordd target/release/bpw-native-host ~/.local/bin/
export PATH="$HOME/.local/bin:$PATH"   # also put this in your shell profile
```

Start the daemon. It holds your keys while the vault is unlocked, and every app on this computer talks to it (ADR 0006). On macOS, one command installs a per-user launchd agent that starts it at every login and restarts it after a failure, at most once a minute (**built**, P4-9). Run it from a directory only you can write (the block above copies the programs to `~/.local/bin`): it refuses a binary that other users could change.

```bash
bpw daemon install      # also: bpw daemon status, bpw daemon restart, bpw daemon uninstall, --dry-run
```

It runs the same `botpasswordd` with no extra options: the same sockets and permissions, and the browser extension off. Stopping it (`bpw daemon uninstall`) locks the vault. Its log is `~/Library/Logs/BotPassword/botpasswordd.log`, and `bpw daemon status` shows its state and last exit status. Step 2 then creates your account: `bpw init` talks to the running daemon. If you started a daemon by hand earlier, stop that copy first. **Not built yet:** the same for Windows (a service) and Linux (a systemd user unit); `bpw daemon` says so and exits non-zero there. On those systems, or to try it by hand, run it in the foreground:

```bash
botpasswordd &
```

For a trial, also start the local control plane, which listens on port 8787:

```bash
pnpm install --frozen-lockfile
pnpm -C services/control-plane dev
```

The desktop app (macOS; the Windows build is not tested yet) is an unsigned build from source:

```bash
pnpm -C apps/desktop/ui install --frozen-lockfile
pnpm -C apps/desktop/ui tauri build --bundles app
```

The app is in `apps/desktop/src-tauri/target/release/bundle/macos/`. It uses the same daemon as `bpw`. apps/desktop/README.md explains how to run it against a synthetic daemon while you develop it.

## 2. Create your account and save the emergency kit

**Built.** The account is created on this device, never on the web (ADR 0030). `bpw init` asks for a new master password twice, then writes the emergency kit. The kit holds your Account ID, Account Secret and recovery code. With the kit and your master password you can get back in after you lose every device.

```bash
bpw init --server http://127.0.0.1:8787 \
  --kit-out ~/botpassword-kit.txt \
  --kit-pdf ~/botpassword-kit.pdf
# production, when live: --server https://api.botpassword.com
```

- `--kit-out` writes the kit as text. `bpw recover --kit` reads this file.
- `--kit-pdf` also writes a printable PDF of the same kit. It has the same fields, plus instructions and a box where you can write a hint for your master password. If you leave `--kit-pdf` out at a terminal, `bpw init` asks whether to save a PDF.
- Both files are created new with mode 0600. Neither command overwrites an existing file.

Print the PDF and keep it somewhere safe and offline. Then delete both files from this computer, or move them off it. Anyone who has the kit and your master password can open your vault.

**A lost kit cannot be shown again.** The recovery code is never stored, so BotPassword cannot print an old kit a second time. To get a kit again, make a new one. The old kit stops working at once. Each way of doing this asks for your master password, even while the vault is unlocked:

```bash
bpw kit pdf --out ~/botpassword-kit-2.pdf --kit-out ~/botpassword-kit-2.txt
bpw recovery rotate-kit --kit-out ~/botpassword-kit-2.txt --kit-pdf ~/botpassword-kit-2.pdf
```

In the desktop app, use **Emergency kit** in the sidebar, or **Save emergency kit** in the command palette (Cmd+K). The app saves `BotPassword Emergency Kit.pdf` in your Documents folder and shows it in Finder. The app never shows the kit's values on screen.

## 3. Add a passkey for the account web UI

**Built** (device side and web UI). The account web UI shows your passkeys, devices, recovery status and linked email. You sign in to it with a passkey. A passkey signs you in to the web UI only: it never unlocks your vault and never takes the place of your master password or kit.

This device mints a one-time setup link. Open the link in your browser to register your first passkey:

```bash
bpw web setup-link --web-origin http://localhost:5173    # local apps/web (pnpm -C apps/web dev)
bpw web setup-link                                        # production, when live: https://app.botpassword.com
bpw web setup-link --open                                 # open it in the default browser instead of printing it
```

The link is a password-like secret:
- It works once, for 10 minutes. The command prints the time it expires.
- `bpw` prints it only to a terminal. It refuses if the output goes to a file or a pipe (use `--open` there).
- Do not paste it anywhere else. Anyone who opens it before you do can add their own passkey to your account web UI. If that happens, remove the passkey with the commands below.

`--web-origin` accepts only `https://app.botpassword.com`, `http://localhost:<port>` and `http://127.0.0.1:<port>`.

Manage passkeys and email from this device. Each command asks for your master password if you have not entered it in the last 5 minutes:

```bash
bpw web passkeys                        # list passkeys and the linked email
bpw web remove-passkey <credential-id>  # remove one; its web sessions end at once
bpw web email                           # is an email address linked?
bpw web release-email                   # unlink the email address
```

To link an email address, sign in to the account web UI with your passkey and add it there. A code is sent to the address. `bpw web link-email` prints these steps. **Not built yet:** linking an email address from a device.

If you lose every passkey, run `bpw web setup-link` again on any enrolled device. After a kit recovery (`bpw recover`), the recovered device can do the same.

## 4. Install the browser extension

**Built** for Chrome, Edge and Chromium as an unpacked development build. Firefox builds, but its automated test has not run yet. **Not built yet:** Chrome Web Store, Edge Add-ons and Firefox Add-ons listings, and filling in Safari (apps/extension/README.md).

```bash
pnpm -C apps/extension build                  # dist/chrome, dist/firefox, dist/safari
bpw-native-host register chrome               # also: chromium, edge, chrome-for-testing, firefox
```

The daemon serves the extension only when you ask. On macOS, ask by installing the login item with the flag. It admits the `bpw-native-host` beside it:

```bash
bpw daemon install --enable-extension   # run it again without the flag to turn the extension off
bpw daemon status                       # says whether the extension endpoint is on
```

Elsewhere, or if you start the daemon yourself, stop `botpasswordd` and start it again with the flag. (If a login item runs it, run `bpw daemon uninstall` first: launchd would restart a stopped copy.)

```bash
botpasswordd --enable-extension &
```

With the flag on, a program running as you that can drive your browser profile can ask for a login to be filled.

Load `apps/extension/dist/chrome` as an unpacked extension (`chrome://extensions`, Developer mode, Load unpacked). `bpw-native-host unregister chrome` removes the host manifest again.

Read the same-user limit in the extension README before you use it. While the vault is unlocked, any program running as you can ask the extension's host for a login it names. Use synthetic test logins only.

**Saving from the browser** (ADR 0067). After you sign up or change a password, the banner asks "Save this login for <site>?". One click on Save (or Enter) saves a new login while the vault is unlocked, with no master password. A changed password opens the popup instead: press Update, and the earlier password stays in the login's history. Each browser can save 10 logins an hour and 40 a day this way; after that, or if the save would replace an unsynced change, it asks for the master password. `bpw extension saves` (or the desktop app's Browser saves page) lists what was saved this way, each with its way back: `bpw item restore <id> <revision> --base <current>` puts an earlier password back, with the master password, as a new revision. `bpw extension ask-password on` makes every save from the browser ask for the master password again.

## 5. Add a second device

**Not built yet:** pairing by QR code, approved from your phone or another device. This comes in P3-1 (M3-1).

**Built** for the interim: join with the Account Secret from your kit, then approve from a device that is already enrolled. On the new device, start `botpasswordd`, then put only the `BPK1-...` Account Secret line's value in a file and join:

```bash
# new device
bpw join --server http://127.0.0.1:8787 --account <Account ID> --account-secret-file ./account-secret
#   prints: approve it from an enrolled device with:  bpw device approve <code>

# enrolled device (always asks for the master password)
bpw device approve <code>

# new device
bpw sync
```

Delete `account-secret` when you are done.

**Built** (ADR 0060): `bpw device list` shows the account's devices with their IDs (run `bpw sync` first for the latest). `bpw device revoke <ID>` takes an ID in that form, or as the account web UI shows it in groups of four (quote it). When a device you did not add from this one joins the account, `bpw status` and `bpw sync` warn about it here until you run `bpw device list`.

## 6. Change your master password

**Built** (ADR 0055). You need your current password, and you need to be online. A change is refused offline, never queued.

```bash
bpw password change
```

It asks for the new password twice, at the terminal. In the desktop app, use **Master password** in the sidebar.

- **Your emergency kit still works**, and it now needs the new password. You do not need a new one.
- **Your other devices keep opening with the old password** until you run `bpw password adopt` on each. A lost or stolen device keeps opening with the old password too. Revoke it: that stops it syncing, though not opening what it already holds.
- **Agent grants, running agent sessions and paired browsers stay live.** A change does not end them. If the old password was exposed, end them yourself.
- **Your items are not encrypted again, and your account key does not change.** Someone who already took the old wrapped key and knows the old password and your Account Secret can still open that key. A password change does not stop them.
- If the change cannot be confirmed, your old password keeps working on this device. Once the server has the change, unlocking with the new password finishes it: `bpw lock`, then `bpw unlock`. If you no longer want it, or no longer know it, run `bpw password abandon`.
- If it still cannot be confirmed after a few minutes, this device gives up on it, and `bpw status` says so until you run `bpw password acknowledge`. Your account may still be on the old password. If you were changing it because it may have leaked, change it again.
- Nobody can change or reset a password you have forgotten.

**If `bpw status` says the key on the server is not this device's,** your password may have been changed on another device, or the server restored from a backup.

- If that change was yours, run `bpw password adopt`. If the password it asks for is one you had stopped using, the server is serving an older key: do not adopt it.
- If it was not yours, revoke the other device first (`bpw device list` names it, `bpw device revoke` takes its ID; the desktop app has no button for this yet). Then run `bpw password change --replace-account-password` with a password that device's holder never knew. If you skip the revoke, the two devices can keep replacing each other's password. If a thief may have your kit, make a new one too (`bpw recovery rotate-kit`).

**If `bpw status` says the server has a newer emergency kit,** any older kit no longer works.

- If you made it and hold it, there is nothing to do on this device. It keeps opening with its own password. Do not use the flag below: it would end that kit and can put back an older password.
- If you do not hold it, make a new one on a device that has the newest kit (`bpw recovery rotate-kit`).
- If you did not make it, or no device has it, revoke any device you do not trust, then run `bpw recovery rotate-kit --kit-out FILE --replace-account-password`.

## 7. Connect an AI agent

**Built** (P4-9). One command registers BotPassword with your agent and installs the standing instructions, then you start the agent inside a session. It makes no grant, so the agent can use nothing until you grant it something with `bpw grant add`.

```bash
bpw agent install claude-code    # or: codex, generic (a .mcp.json and AGENTS.md in this directory)
bpw agent run -- claude          # asks for your master password, opens a session, runs claude in it
```

On macOS and Linux you can also start the agent normally. Enroll it once (`bpw agent enroll claude-code`). When it first asks BotPassword for something, it waits on the desktop app's Agents page and in `bpw session pending`. Approve it there with your master password. Nothing on the row proves it is your agent, so when in doubt, dismiss it and use `bpw agent run`, which still works.

`bpw agent uninstall <harness>` removes exactly what install added, and `--dry-run` shows what would change. The details, and the by-hand steps, are in the [Claude Code](/docs/guides/claude-code) and [Codex](/docs/guides/codex) guides.

## 8. What is not built yet

| Item | Where |
|---|---|
| Signed installers, and the daemon's automatic start on Windows and Linux | M1-11, M1-12 |
| The hook, sandbox mask rules and skill for `bpw agent install claude-code`, and install for Cursor, VS Code Copilot, Windsurf and Gemini CLI | P4-9 follow-ups |
| Touch ID and Windows Hello unlock | M1-11, ADR 0029 |
| QR pairing of a second device | P3-1 (M3-1) |
| Linking an email address from a device | Web UI only, by design (ADR 0030) |
| The production service | Founder steps outside the repository |
| Store listings for the extension, and Safari fill | M2-4 follow-ups |
