<!--
Sitemap:
- [Installation](/installation): Install the Bento daemon on macOS or Linux, then write your first pipeline to run a coding agent on a GitHub, Linear, or schedule event.
- [Upgrading](/upgrading): Version-specific steps for upgrading an existing Bento install.
- [Concepts](/concepts)
- [Build your first pipeline](/tutorials/pipeline-args)
- [Target a specific issue or PR from a URL](/tutorials/url-targeting)
- [Keep state across runs](/tutorials/pipeline-state)
- [Fire a pipeline on a schedule or on demand](/tutorials/schedule-and-fire)
- [Deploy a box to Railway](/tutorials/deploy-to-railway)
- [Operate a hosted daemon](/tutorials/operate-a-hosted-daemon)
- [Configuration](/configuration): Configure the Bento daemon with daemon.yaml: service name, port, webhooks, sandboxes, knowledge base, and environment variables.
- [Members](/members)
- [Knowledge base](/knowledge-base/)
- [Method and delivery](/knowledge-base/modes): Choose how Bento retrieves knowledge (BM25, vector, or hybrid) and how it delivers that knowledge to a coding agent.
- [Config](/knowledge-base/config)
- [MCP](/knowledge-base/mcp): Give coding agents your team knowledge over MCP. The Bento daemon serves an ask_knowledge search tool and per-file resources.
- [Pipeline configuration reference](/pipelines/config): Reference for Bento pipeline YAML: triggers, agents, skills, instructions, filters, sandboxes, structured results, and outputs.
- [Filters](/pipelines/filters): Filter GitHub, Linear, and webhook events by repository, label, and other fields so only the right Bento pipelines run.
- [Triggers](/triggers/): Start a Bento pipeline from a GitHub, Linear, webhook, schedule, or manual trigger. Compare the trigger types and when each one fires.
- [GitHub trigger](/triggers/github): Run a coding agent on GitHub pull request, issue, and other webhook events. Configure HMAC verification and event patterns.
- [Linear trigger](/triggers/linear): Run a coding agent on Linear issue and comment events. Configure the Linear webhook, signature verification, and Hookdeck relay.
- [Webhook trigger](/triggers/webhook): Fire a Bento pipeline from any HTTP POST to /webhooks/{name}, with bearer-token authentication declared in daemon.yaml.
- [Schedule trigger](/triggers/schedule)
- [Manual trigger](/triggers/manual): Fire any Bento pipeline on demand with bento trigger fire, and pass typed inputs to a pipeline that runs only on request.
- [Traces](/pipelines/traces)
- [Slack](/integrations/slack)
- [Public access](/public-access): Expose the Bento daemon to GitHub webhooks through a Cloudflare Quick Tunnel or Tailscale Funnel, and compare the two options.
- [Context engineering](/context-engineering): Assemble each coding agent prompt from personas, policies, skills, and pipeline instructions. Learn which file each instruction belongs in.
- [Best practices](/best-practices)
- [Troubleshooting](/troubleshooting)
- [Architecture](/architecture/vision)
- [Workspaces](/workspaces)
- [Authentication](/authentication)
- [Identity](/identity)
- [Security](/security)
- [References](/references)
- [Changelog](/changelog): Bento release history.
- [CLI reference](/cli/)
- [Setup](/cli/setup)
- [Secrets](/cli/secrets)
- [Lifecycle](/cli/lifecycle)
- [Sandbox image](/cli/image)
- [Sandboxes](/cli/sandbox)
- [Observability](/cli/observability)
- [Diagnostics](/cli/diagnostics)
- [Triggers](/cli/triggers)
- [Workbench](/cli/workbench)
- [Auth](/cli/auth)
- [Knowledge](/cli/knowledge)
- [Evals](/cli/evals)
- [Bento docs: run coding agents from version-controlled pipelines](/index): Bento runs coding agents from pipelines you keep in your repository. Declare the trigger, sandbox, skill, and guardrails in YAML.
- [Runtime wrapper](/architecture/runtime-wrapper)
- [Skill evolve](/architecture/skill-evolve)
-->

# Auth

## `bento auth setup`

Generate a random local authentication token and write it to `~/.bento/credentials` with mode `0600`. The daemon loads the token on its next restart and then requires it on every request. The command does nothing when a credential is already present.

```bash
bento auth setup
```

To issue per-client tokens in the daemon database, use `bento token`.

## `bento auth login`

Sign in to Bento Cloud through your browser with GitHub OAuth through the broker. The command opens a GitHub OAuth flow. On completion it writes a broker token into `~/.bento/credentials` under the `brokerToken` key.

```bash
bento auth login
bento auth login --org <org-id>   # switch into a specific organization
```

| Flag | Description |
|------|-------------|
| `--org <id>` | Organization id to sign into (requires an active membership) |

## `bento token`

Manage bearer tokens for authenticated daemon access.

```bash
bento token issue --email you@example.com
bento token list
bento token revoke <id>
```

| Subcommand | Flags | Description |
|------------|-------|-------------|
| `issue` | `--email <addr>` (required), `--name <label>`, `--force` | Mint a bearer token. `--force` rotates an existing token for the email |
| `list` | `--all`, `--revoked` | List issued tokens, active only by default (`--all` also includes revoked, `--revoked` shows only revoked) |
| `revoke <id>` | — | Revoke a token by id |

## `bento connect`

Connect a provider to your bento organization.

### `bento connect github`

Install the bento GitHub App on a GitHub user or organization account and bind the resulting connection to your bento organization.

```bash
bento connect github
bento connect github --no-browser   # print the install URL instead of opening it
```

| Flag | Description |
|------|-------------|
| `--browser` / `--no-browser` | Open the install page in your browser (default: true) |

After you install the App on GitHub, the command polls for the claim. If the installation targets a GitHub organization, the command prompts you for a bento team organization name. On success, `bento connections list` shows the connection.

## `bento connections`

Manage provider connections bound to your bento organization.

```bash
bento connections list
bento connections remove <id>
```

| Subcommand | Description |
|------------|-------------|
| `list` | List all connections for the current organization |
| `remove <id>` | Remove a connection by id |
