path-cli
One binary that ties together everything Toolpath can do: derive provenance from git and Claude, query and filter documents, render DAG visualizations, track live editing sessions, and merge results into release graphs. If you want to use Toolpath without writing Rust, start here.
Unified CLI for deriving, querying, and visualizing Toolpath provenance documents.
Installation
This installs a binary called path.
Previously published as
toolpath-cli. The old crate name still works —cargo install toolpath-cliis now a thin shim that depends on this crate and installs the samepathbinary — but new installs should pin topath-clidirectly.
Or run from source:
The CLI splits into porcelain (top-level: show, share, resume,
query, auth, haiku) and plumbing (path p …: p list,
p import, p export, p cache, p render, p merge, p validate,
p derive, p project, p incept, p track).
Typical workflows
Capture the provenance of a PR:
Visualize how a branch evolved, including dead ends:
| |
Review what an AI agent changed:
|
Record provenance for a live editing session:
|
# ... edit the file ...
|
Merge multiple sources into a release graph:
Commands
p list
Discover available sources before importing.
# List git branches with metadata
# List Claude projects
# List sessions within a project
# Machine-readable output
p import
Generate Toolpath documents from source systems and write them to the
local cache (~/.toolpath/documents/). Use --no-cache to stream the
JSON to stdout for shell composition instead.
# From git history (single branch -> Path, multiple -> Graph)
# From Claude conversation logs
query
Load every step in the local cache into one JSON array and transform it with
an in-process jaq (jq) filter. Each element wraps a Toolpath step with
cache_id, path (the parent path's id/base/meta), and dead_end.
Scope flags choose which documents load; the filter does the rest.
# Find abandoned branches (the former `dead-ends` subcommand)
# Steps by an agent actor (the former `filter --actor`)
# Turns over 50k input tokens, in Claude sessions only
# Top 10 steps by total tokens
# Raw output (-r): a column of ids straight into another command
|
Scope flags: --source <name> / --id <cache-id> / --input <file> (file
selection), --project <path> / --kind <selector> (content scoping). Output
mirrors jq: pretty on a TTY, compact when piped (-c forces compact); -r
prints string results unquoted (for piping ids/paths onward, or reading
text/diff content unescaped).
kind
List the document kinds the binary bundles a spec for, or print a kind's
bundled schema.json — the per-field type and semantics reference for writing
path query filters.
p query
Low-level graph traversal on a single document.
# Walk ancestry from a step
p render
Render documents to other formats.
# Graphviz DOT output
# Pipe through Graphviz
| |
p merge
Combine multiple documents into a single Graph.
p track
Incrementally build a Path document step by step, useful for editor integrations and live sessions.
# Start a session (pipe initial content via stdin)
|
# Record a step (pipe current content via stdin)
|
# Record a step with VCS source metadata
|
# Add a note to the current step
# Annotate any step with metadata (intent, source, refs)
# Export the session as a Toolpath Path document
# Export and clean up
# List active sessions
p validate
Check that a JSON file is a valid Toolpath document.
# Valid: Step (id: step-001)
haiku
Global flags
| Flag | Description |
|---|---|
--pretty |
Pretty-print JSON output |
Part of Toolpath
This is the CLI for the Toolpath workspace. See also:
toolpath-- core types and query APItoolpath-git-- derive from git historytoolpath-claude-- derive from Claude conversationstoolpath-dot-- Graphviz DOT rendering- RFC -- full format specification