-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
All commands accept -h / --help for full flag list. Source: src/cli/main.c.
- Output is JSON unless a
--markdownflag is supported. - Exit codes:
0OK,1I/O error,2usage error,3daemon returned non-zero. -
GRAFT_PROFILEenv selects the active profile; otherwisedefault.
Save a node. Idempotent on content hash.
graft insert \
--title "..." \
--body "..." \
--keywords k1,k2,k3 \
[--author "..."] \
[--expires-in 7d] \
[--supersedes <id_hex>]| Flag | Type | Default | Meaning |
|---|---|---|---|
--title |
string (required) | — | Short headline. |
--body |
string (required) | — | Full content. |
--keywords |
csv (required) | — | Comma-separated keyword list (≥1). |
--author |
string | unset | Provenance tag. |
--expires-in |
duration | unset |
7d, 24h, 30d. Sets expires_at. |
--supersedes |
id_hex | unset | Atomically replaces the named node. |
Returns: { id_hex, duplicate, keyword_edges, semantic_edges }.
Hard delete. Cascades to keywords, edges, FTS5, vector table.
graft delete <id_hex>Verified cache lookup.
graft query "your question text"Returns STRONG (title + body), WEAK (title only), or MISS (optional fallback list). See Verify & Gating for the gate.
Hybrid top-k via RRF over (vector cosine, BM25 title, BM25 body).
graft retrieve "your text" [--top-k 25]Keyword-conditioned beam search.
graft explore "your text" \
[--depth 3] [--beam 4] \
[--keywords k1,k2]Fetch one node by id.
graft get <id_hex> [--markdown]--markdown emits YAML frontmatter + body, suitable for piping into a file or editor.
Suggest 3–6 keywords for a draft title.
graft classify "draft title or text"Runtime metrics + similarity-score percentiles.
graft statsReturns counts (nodes, edges, keywords) and p25/p50/p75/p90/p95/p99 for insert_topk and query_top1 cosine distributions.
Safe maintenance.
graft consolidatePrunes expired nodes, removes orphan edges/keywords, runs ANALYZE, returns a graph-health report.
Stream the usage log with a time window.
graft analytics [--since 7d|24h|30d]Source: ~/.graft/usage.jsonl. Read-only.
graft profile list
graft profile current
graft profile add <name>
graft profile remove <name>
graft profile import <name> --from <path.db>
graft profile export <name> --to <path.db>
graft profile merge <src> <dst>
graft profile remote sync --url <path-to-remote.db>See Profiles for the semantics. Note: remote sync accepts only SQLite file paths in this build; HTTP remote sync is a roadmap item.
One-shot skills installer for an AI assistant.
graft setup claudecode # ~/.claude/skills/
graft setup codex # ~/.codex/skills/
graft setup opencode # ~/.config/opencode/skills/graft setup does not install hooks and does not modify agent settings, hooks.json, config.toml, or AGENTS.md. See Integrations for manual hook and project-instruction wiring.
Open the 3D viewer. Auto-builds the SPA on first run, opens http://127.0.0.1:9977/ in your browser. See Viewer.
In-place self-update from the latest GitHub Release.
graft upgrade [--yes]You normally don't run graftd by hand. The CLI spawns it on demand. If you want to inspect:
graftd --config ~/.graft/config.yaml --foregroundInstall it in one command, and integrate it through whatever surface fits (CLI, REST, MCP,hooks). No SaaS. No API key. One binary.
Get started · Install · Integrate · Source · Issues · Apache 2.0 · pre-1.0, alpha
Welcome
Concepts
Reference
Adjacent
Operations