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

# BuildBetter CLI

> Use the bb command line tool to connect local AI coding sessions to BuildBetter

The BuildBetter CLI (`bb`) connects local AI coding tools to your BuildBetter workspace. It can authenticate your account, install end-of-turn hooks for supported providers, upload agent session history, and resume uploaded sessions from another machine.

<Info>
  The CLI is in early customer readiness. Your BuildBetter team will provide the current approved install command for your workspace while package-manager distribution and artifact verification are being completed.
</Info>

## What You Can Do Today

* Sign in with your BuildBetter account using browser-based authentication.
* Check the active environment, account email, organization key, API URL, and token expiration.
* Install Codex and Claude Code Stop hooks for the current git repository.
* Inspect and repair provider hooks without editing provider config files by hand.
* Run a redacted local doctor report and support bundle for troubleshooting.
* Send structured CLI feedback to BuildBetter from agent runs or a human shell.
* Upload agent sessions to BuildBetter at the end of each provider turn.
* Resume uploaded sessions from the same repository and branch.
* Check for and install CLI updates from BuildBetter's release endpoint.

## Supported Providers

| Provider    | Hook Command                               |
| ----------- | ------------------------------------------ |
| Codex       | `bb agent-sessions hooks install --codex`  |
| Claude Code | `bb agent-sessions hooks install --claude` |

The installed hook runs quietly at the end of a provider turn. Hook failures are reported to BuildBetter when possible, but they should not interrupt your AI coding session transcript.

Hooks install repo-locally by default. Add `--global` to write user-level provider config with a repo guard, or add `--direct-bb` to invoke an already installed local `bb` binary instead of the remote bootstrap script.

## Common Commands

```bash theme={null}
bb auth login
bb auth status
bb agent-sessions hooks install --codex
bb agent-sessions hooks install --claude
bb agent-sessions hooks doctor --codex --json
bb doctor --json
bb support bundle --output /tmp/bb-support.zip
bb feedback --agent --provider codex --message "Hook output is too noisy."
bb agent-sessions resume
bb update --check
```

## Send CLI Feedback

Use `bb feedback` when an agent or a human hits setup friction, noisy hook output, missing docs, or a CLI bug.

```bash theme={null}
bb feedback --agent --provider codex --message "Hook output is too noisy."
bb feedback --human --message "Please add shell completions." --email user@example.com
```

For automated agent runs, pipe the message and request machine-readable output:

```bash theme={null}
printf '%s\n' "The hook should summarize synced events." | bb feedback --agent --provider codex --json
```

Feedback is routed to BuildBetter's staging feedback API because BuildBetter dogfoods the full application in staging. The command includes CLI version, OS/architecture, and git repository context when it runs inside a git repository.

## Before You Start

* You need an active BuildBetter account with access to the CLI preview.
* You need a local AI coding provider supported by the CLI.
* Run hook install commands inside the git repository where you want BuildBetter session syncing.
* Make sure the directory containing `bb` is on your `PATH`.

## Next Steps

* [Install the CLI](/pages/BuildBetter%20CLI/installation)
* [Review update and security behavior](/pages/BuildBetter%20CLI/security-and-updates)
* [Troubleshoot common setup issues](/pages/BuildBetter%20CLI/troubleshooting)
