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

# CLI Reference

> Generated reference for the Product Brain CLI.

<Warning>
  **Early access** — Generated from `packages/cli/README.md`; regen after README changes. [**Join the Product Brain Community**](https://community.productbrain.io).
</Warning>

The `pb` CLI lets agents and humans read the Chain, open write sessions, capture knowledge, and close the loop from a terminal.

## Commands

### `pb orient [-b]`

Workspace overview. `-b` for brief, `--task` for task-grounded context.

### `pb get <id>`

Full entry: data, relations, history.

### `pb search <query>`

Full-text search across all collections.

### `pb context <id>`

Constellation context for an entry.

### `pb fields <collection>`

Field definitions for a collection.

### `pb constellation <id>`

Entry + all related entries grouped by relation type.

### `pb collections list`

All collections with field counts.

### `pb glossary`

Key Product Brain CLI terms.

### `pb scoreboard [--task <task>] [--json]`

Flywheel health board: M1/M2/M3 metrics, materialization age, and diagnosis. `--json` for the structured agent shape.

### `pb doctor`

Check configuration and connectivity.

### `pb session start`

Open a tracked write session.

### `pb capture "<text>"`

Capture knowledge. Auto-classifies to the right collection.

### `pb update <id>`

Update fields on an existing entry.

### `pb relate <from> <type> <to>`

Add a typed relation between entries.

### `pb promote <id>`

Promote entry from draft to active.

### `pb session close`

Close session, show summary.
