# CLI Guide
The CLI is intentionally small. It exists to inspect local event logs and graph projections.
## Commands
```bash
arcagent-state init
arcagent-state events
arcagent-state graph
arcagent-state node <id>
arcagent-state lineage <id>
arcagent-state lineage <id> --markdown
arcagent-state goal create <id> <title> [summary]
arcagent-state goal list
arcagent-state goal show <id>
arcagent-state patch show <id>
arcagent-state patch promote <id>
arcagent-state fork create <id> [event-id]
arcagent-state replay
```
When running from source, prefix commands with Cargo:
```bash
cargo run --bin arcagent-state -- graph
```
## Event log path
The default event log is:
```text
.arcagent-state/events.jsonl
```
Set `arcagent_STATE_EVENTS` to use another path:
```bash
arcagent_STATE_EVENTS=.arc/state/events.jsonl cargo run --bin arcagent-state -- events
```
## Common local flow
Initialize:
```bash
cargo run --bin arcagent-state -- init
```
Inspect raw events:
```bash
cargo run --bin arcagent-state -- events
```
Inspect projected graph:
```bash
cargo run --bin arcagent-state -- graph
```
Print lineage:
```bash
cargo run --bin arcagent-state -- lineage patch_42 --markdown
```
List patches:
```bash
cargo run --bin arcagent-state -- patch list
```
Create a goal:
```bash
cargo run --bin arcagent-state -- goal create goal_retry "Make retry reliable"
```
Update goal status:
```bash
cargo run --bin arcagent-state -- goal status goal_retry in-progress
```
Create a fork at an event:
```bash
cargo run --bin arcagent-state -- fork create fork_before_patch event_123
```
Show one patch:
```bash
cargo run --bin arcagent-state -- patch show patch_42
```
## Current limitation
The CLI is still intentionally small. Use the Rust API for full behavior/policy/pack flows and use the CLI for local inspection and simple goal/patch/fork operations.