| title | CLI Command Reference | |||||
|---|---|---|---|---|---|---|
| description | Reference manual detailing every subcommand, flag, and configuration override option in the Graphit CLI. | |||||
| content-type | reference | |||||
| audience | developers | |||||
| updated | 2026-09-23 | |||||
| keywords |
|
|||||
| prerequisites |
|
|||||
| related |
|
The graphit command-line tool acts as the control center for configuring project registries, indexing code structure, query-tuning, and running background daemon tasks.
This document lists every command and flag available in the CLI.
These flags can be appended to any command:
| Flag | Shorthand | Description | Default |
|---|---|---|---|
--verbose |
-v |
Enables detailed debug logs on stdout. | false |
--config |
-c |
Override a configuration value inline (e.g. -c agent=cursor). |
nil |
--non-interactive |
Forbids prompts, confirmations, browsers, editors, pagers, and interactive chat; missing input is an error. | false |
These commands initialize and maintain Graphit Code environments:
Initializes the global directory, ensures the persisted default provider local, and collects
event-privacy, agent-adapter, and agent-CLI preferences. The canonical provider has explicit local
embedding/rerank services and ONNX cpu/0, but no profile. Setup never configures account
identity, MCP, broker, S3, OIDC, claims, custom AI topology, or credentials.
graphit setupEvery question has a flag. With --non-interactive, every applicable answer must be explicit,
including empty values where a current/default value is intended. Setup does not prompt for
embedding or rerank topology, devices, or credentials.
# one answer given, the rest still asked
graphit setup --agent cursor
graphit --non-interactive setup --agent cursor --cli cursor-agent \
--anonymize-events=falseAn empty value is an answer for an optional runtime setting. Omitting a flag in interactive mode prompts; omitting it in non-interactive mode fails.
Flags:
| Flag | Sets | Notes |
|---|---|---|
--anonymize-events[=<bool>] |
hub.events.anonymize |
Default false; bare flag means true, and an explicitly empty value clears the key. Chooses hashes instead of explicit project/user IDs in event payloads. |
--agent <string> |
agent |
Default agent adapter |
--cli <string> |
cli |
Default CLI for the AI fallback |
Provider and account commands follow setup; see Authentication.
Local manifests with fetch_policy: setup are provisioned during setup; on_demand manifests wait
until first use, and never manifests require operator-mounted files.
See AI Models, Providers, and Agent CLIs for every provider, model default,
dimension, credential, CLI protocol, and data boundary.
Completes project workspace initialization. It creates a minimal project identity when none exists,
otherwise preserves the existing ULID, registers the project under the global active tracker,
generates rules or skills files, and maintains a generated block in the project's .gitignore.
The block ignores **/.graphit/runtime/ and **/.graphit/grammars/; project query YAMLs and rule
overrides remain versionable. See
Storage Layout.
graphit init --agent <agent_name> [flags]Flags:
--agent <string>: Targets a specific agent adapter:antigravity,cursor,claude,gemini,kiro,codex,opencode,qwen, orkimi.--id <string>: Sets the initial ULID only when identity does not exist; a conflicting existing ULID is rejected.--name <string>: Sets or renames the human-readable discovery name; remote registration still enforces global uniqueness.--description <string>: Sets the project description inline to skip prompts.
Forces a complete synchronization of the project state.
graphit sync [flags]Flags:
--no-background: Prevents spawning background tasks asynchronously. Both phases (sync and heavy indexing/processing) execute synchronously inside the terminal process.--heavy: Runs only Phase 2 tasks (generating embeddings and memory consolidation).
The AST reindex in init and the normal sync phase takes the AST store lifecycle lock while
publishing the graph. Background AST embedding releases that lock during model inference and
reacquires it only for store reads, writes, and vector-index finalization, so slow inference does
not by itself hold up a foreground reindex.
Before indexing, sync inspects Git when the current project is a repository. If S3 storage is
available, every sync checks the current branch/... lineage for the exact compatible commit or
nearest published ancestor. It retains the local overlay when that base is unchanged, or replaces
the base with a filesystem-local shallow clone and reindexes local differences when the published
base advances. Base fragments remain in S3; new writes remain local. A detached checkout can
select its source lineage with GRAPHIT_GIT_BASE_BRANCH. LadybugDB/Icebug is rebuilt rather than
cloned. Sync never publishes a Hub commit.
Checks authorized per-project Hub entries for updates to installed artifacts, refreshes managed files, and advances native-store version selections as appropriate. It does not download or synchronize the complete global name directory.
graphit update --agent <agent_name>Deletes project-local configuration, rules files, git hooks, and ignorer configurations. Does not affect source code or the global database.
graphit remove --agent <agent_name>Cleans up all global parameters, schedules, background daemons, and deletes the ~/.graphit workspace directory.
graphit uninstallSelf-downloads and replaces the current graphit CLI binary with the latest release published on GitHub.
graphit self-updateprovider add <name> --type local|broker creates reusable identity, MCP/broker and AI service
topology. Provider outputs redact configured secrets.
provider list, provider show, provider update, and provider remove manage it. Updates advance
the provider revision and force dependent profiles to log in again. Removal requires confirmation;
referenced providers additionally require --cascade. If local is removed while no profile is
active, the next AI resolution recreates its canonical local/ONNX cpu/0 configuration. While
another profile is active, that profile's provider wins and local remains absent.
login --profile <name> --provider <name> authenticates and always activates the profile. Local
login accepts --username, --organization, repeatable --team, --mcp-key, --broker-key,
--embedding-api-key, and --rerank-api-key.
Broker login is browser-only: Graphit discovers the OpenID issuer, public client ID, scopes and
callback path from --broker-endpoint, then uses standard OIDC discovery and endpoints; the Broker
page chooses between enabled local and upstream OIDC methods and returns a signed ID token plus
an EdDSA-signed access JWT and opaque rotating refresh token. Graphit verifies exact issuer,
advertised access-token audience, and same-origin endpoints plus Authorization Code, refresh, PKCE
S256, public-client, EdDSA, and JWKS capabilities before opening the browser. Broker providers
reject local identity, static-key, and token flags. --mcp-resource configures the exact canonical
URI of this daemon's HTTP MCP endpoint; the Broker must advertise it in mcp_resources.
Login always activates the profile.
For a provider configured with --broker-allow-anonymous, local login may instead use
--anonymous; it cannot be combined with username/organization/team/broker-key flags.
Important provider option groups:
| Capability | Options |
|---|---|
| Broker identity and HTTP MCP | --type broker --broker-endpoint URL [--mcp-resource URI]; the login contract is discovered from that Broker and HTTP MCP tokens require the configured resource audience |
| Local identity | --type local; optional --broker-endpoint and --broker-allow-anonymous support local profiles with Broker services |
| Embedding | `--embedding-mode local |
| Rerank | `--rerank-mode local |
| S3 topology | --s3-bucket, --s3-region, --s3-endpoint, --s3-prefix, `--s3-credential-source login |
| Local S3 login | --s3-access-key, --s3-secret-key, --s3-session-token, or --aws-profile; --allow-aws-credential-chain enables the ambient chain |
Adding broker configuration requires both --embedding-mode broker and --rerank-mode broker;
provider validation rejects any mixed, local, direct, disabled, or omitted AI mode. Rerank execution
is still controlled separately by search.rerank. Use provider update NAME --clear-broker to
remove the broker block and set both AI modes to the desired non-broker values in the same update.
Interactive add/update prompts for device and device ID only for local services, preselecting the
provider's current values or cpu/0. Non-interactive add/update may omit either value to preserve
the current value or accept the new-service default. Device flags are rejected for direct, broker,
and disabled services. The rule follows AI service mode for both local and Broker auth providers.
account list, account show [profile], and account use <profile> inspect or atomically select
profiles. logout [--profile <name>] deletes that profile's credentials. Full provider flags are
in Authentication; IdP registration and complete Keycloak,
Microsoft Entra ID, Auth0, MCP, and Broker-issued S3 session walkthroughs are in
OIDC integration.
Gets, sets, or unsets parameters inside your active configuration file.
By default, targets your project-local graphit.lock.json.
graphit config [key] [value] [flags]Flags:
--global: Reads or updates parameters in~/.graphit/config.jsoninstead.--get: Retrieves the value of a key.--unset: Deletes a key from the configuration.--list: Prints all keys and values.--secret: Reads a value securely from stdin without echoing it on terminal logs.
Examples:
graphit config agent cursor
graphit config --global agent cursor
graphit config --get agent
graphit config --unset agent
graphit config --listAST Cluster Configuration:
# Set cluster mapping for multi-domain monorepos (persisted to graphit.lock.json)
graphit config ast.cluster_map "backend/=python,frontend/=javascript,shared/=typescript"
The ast.cluster_map accepts comma-separated path=cluster pairs. Paths are directory prefixes
(trailing slash optional). --cluster-path persists that mapping. Use --cluster <name> on an
individual ast index or ast watch invocation for a fallback cluster. Although current commands
may preserve an ast.cluster field in the lockfile, no configuration resolver consumes it.
For every supported key, environment spelling, scope, default, and module switch, see the Configuration Reference.
Client configuration secrets are redacted by --get and --list; redaction does not encrypt the
value on disk. Authentication and AI keys are rejected here and belong to provider/login.
Project values override global values, while matching
GRAPHIT_* environment variables override both.
Launches the embedded unified web application server and automatically selects a free port. Allows you to explore the AST code database in 3D, chat with the wiki knowledge, and view memories.
graphit ui [--repo <path>]If the Hub registry cannot initialize, the UI still starts with local project and AST data. Remote Hub discovery and publishing remain unavailable until the Hub works again.
The server binds to ui.host (127.0.0.1 by default). Browser origins use the exact,
comma-separated ui.allowed_origins policy; without an override, only same-origin and
localhost loopback origins are accepted. Set ui.auth.enabled=true to require Broker
browser login for data APIs; otherwise protect a reachable instance with a firewall,
VPN or authenticated reverse proxy. --repo selects the
repository to visualize; there is no fixed-port flag. See
S3 Credentials and UI Network Configuration.
Starts an MCP (Model Context Protocol) server. Allows AI tools to consume AST querying, memory search, and wiki indexes via standardized MCP actions.
The MCP server runs inside the daemon process, exposed via HTTP on a dynamic port with Bearer token authentication.
The --stdio flag starts a lightweight proxy that relays JSON-RPC messages between stdin/stdout and the daemon's HTTP endpoint.
graphit mcp [flags]Flags:
--stdio: Starts the MCP stdio proxy for Agent integration (used by Claude Code, Cursor, Gemini, etc.).
Without flags: Displays the MCP HTTP endpoint URL and auth information.
Architecture:
- The daemon listens on
127.0.0.1:<dynamic-port>/mcp(Streamable HTTP transport) - Authentication: generated runtime key; local-provider static MCP key; or, with an active Broker provider, a verified Broker access token propagated to Broker APIs
- The stdio proxy always connects to this local daemon. It uses the current daemon runtime key or the active local provider's static MCP key. Remote HTTP clients send their Broker access token.
- Port: Written to
~/.graphit/daemon/mcp.port - The stdio proxy auto-recovers if the daemon restarts, preserves its host-agent identity, replays the MCP handshake, and sends
notifications/tools/list_changedso clients that implement catalog invalidation refresh their tools. Fresh sessions always receive the new catalog.
Discovers and distributes versioned code graphs, documentation, rules, skills, agents, commands, MCP definitions, powers, and language packs.
Remote list and search results are deny-by-default, limited to projects granted to the trusted subject, and returned as bounded pages. Exact show, install, update, content, submit, and mount operations revalidate authorization; a known ULID or artifact ID is not a capability. The project ULID is the stable qualifier, while a mutable globally unique name is only a friendly lookup.
graphit hub <subcommand> [flags]The CLI install and uninstall commands operate on the global version-keyed store, so they also
work on a server with no checkout. MCP clients may additionally pass a real project_dir to create
a project-scoped installation.
Subcommands:
list [--type <type>] [--page-size <n>] [--cursor <token>]: List one bounded page of authorized registry artifacts.search <term> [--type <type>] [--page-size <n>] [--cursor <token>]: Search IDs, names, and descriptions within authorized projects.show <id> [--type <type>] [--project-id <ulid>]: Show one authorized registry entry. Supply the publishing project ULID to avoid a cross-project scan or to disambiguate repeated artifact IDs.install <id>[@version] [--type <type>] [--alias <name>]: Install globally. Pin an exact version for reproducible agent work. Versions may be numeric constraints (2,2.1,2.1.3) or exact named channels such asbranch/mainandbranch/feature/api.uninstall <id> [--type <type>]: Drop a global installation.update [id] [--type <type>]: Update every installed artifact or one selected artifact.submit <id> <local-path>: Publish local source. Flags are--version(default1.0.0),--type(defaultrule),--name,--description, and comma-separated--tags. Publishing AST or knowledge requires an initialized checkout; the command readsproject.idfromgraphit.lock.jsonso broker authorization is scoped to that project. Republishing the same numeric or named version is supported and replaces its content with last-writer-wins semantics. A version beginning withbranch/matches the resolved Git branch and requires a clean worktree when the project is in Git; each such publication records the commit and exact table versions in the branch history. Outside Git, a newbranch/...channel is an exact mutable snapshot without commit history and cannot replace an existing Git-backed lineage. A version beginning withtag/is a compact release snapshot: each staged LanceDB table retains only its current version, and publication fails if superseded MVCC history cannot be removed. See Publishing Graphit artifacts from GitHub Actions for the unattended branch/tag workflow and retention constraints. For a Git branch, rungraphit sync --no-backgroundafter checking out a committed revision, thengraphit hub submit <ast-id> . --type ast --version "branch/<name>"andgraphit hub submit <knowledge-id> . --type knowledge --version "branch/<name>". Branch publication leaves the project lockfile unchanged so both artifacts can use the same clean commit. Changed LanceDB rows and changed non-Lance objects are published; a changed non-Lance object is still uploaded in full.link <name> --path <project> --type <type>: Record or materialize a local development link in the current initialized project. AST/Knowledge point to the sibling's compiled global store; adapter-native artifacts use the adapter's own destination.unlink <name> --type <type>: Remove a local link from the current project.projects [--page-size <n>] [--cursor <token>]: List one bounded page of Hub projects visible to the trusted subject. This is distinct from the machine-local ecosystem registry.type-path <type> <name>: Print the adapter-native destination for creating a physical skill, command, agent, or MCP artifact. Rules have no physical destination because hooks load them.rule: Inspect or override the Hub routing mandate.
The inherited --agent flag selects the adapter for project materialization. Artifact types are
knowledge, ast, rule, skill, command, agent, mcp, power, and language.
Runs an agent in a disposable workspace assembled from selected Hub artifacts plus user memory.
Every -a/--artifact accepts [<type>:]<id>[@version] and is repeatable.
graphit live "where is retry decided?" \
--artifact knowledge:acme-docs@3.0.1 \
--artifact ast:acme-api@2.1.0- With a question, the answer streams and the command exits; without one, the session remains
interactive until
/exitor a secondCtrl+C. --agent <name>chooses adapter conventions in the throwaway project.--jsonemits one structured event per line.graphit live sessionslists retained sessions.graphit live remove <session-id>deletes one session and its throwaway workspace.
Leaving an interactive run does not delete it. modules.agent=false disables Live Search because
the server must launch a coding-agent CLI; artifact retrieval itself remains available.
Generates shell completion scripts for bash, fish, powershell, or zsh:
graphit completion bash
graphit completion zshEach shell subcommand's --help shows the installation command for that shell.
Directly indexes, queries, and manages the abstract syntax tree.
graphit ast <subcommand> [flags]Subcommands:
index [path...]: Parses source code and builds the AST knowledge graph.--reset: Wipe the complete AST store before indexing. It waits for active store access, but not AST model inference; the daemon resumes from the rebuilt store without a restart.--reindex: Wipe only this repo's data before re-indexing.--cluster <name>: Logical cluster tag for queries (fallback for unmatched paths).--cluster-path <path=cluster>: Tag nodes under with (repeatable). Paths are directory prefixes; most specific match wins.--workers <int>: Worker thread count.--no-source: Skip storing raw source code inside nodes.
watch [path]: Watch directory for file changes and re-index incrementally.--cluster <name>: Logical cluster tag (fallback).--cluster-path <path=cluster>: Tag nodes under with (repeatable).--workers <int>: Worker thread count.
query <cypher-query | natural-language-question>: Execute graph query.--ai: Generate Cypher from natural language via AI.--cypher: Print generated Cypher without executing (requires--ai).--ai-optimized: Output tabular representation for AI agent tokens.--hybrid: Perform combined BM25 + semantic vector search (RRF).--top <int>: Limit results count.--context <name>: Query an imported context instead of project.
schema: Print the AST GRAPH node properties and labels schema, for writing Cypher.fts-schema: Print the full-text tables (entities,files), their columns and row counts. A different store from the graph.--table <name>: Describe only this table.--context <name>: Context name.
fts-query: Filter rows of one full-text table by Lance predicate and return only the columns asked for.--table <name>:entities(default) orfiles.--filter <predicate>: WHERE clause, e.g.etype = 'Function' AND is_dep = false.--columns <list>: Columns to return. Thebodyandsourcecolumns hold synthesised BM25 documents, not code, and are never returned.--limit <int>/--offset <int>: Rows to return and skip.--context <name>: Context name.--context <name>: Context name.
install <path> --context <name>: Import external AST database into named context.--reset: Wipe context before importing.--list: List imported contexts.--workers <int>: Thread count.
remove: Wipe project AST or context.--context <name>: Context name.
sync: Re-sync imported context from cache.export: Export the AST graph as an Obsidian vault or an importable.astpackage.--format <format>: Format:obsidianorpackage.--output <path>: Output path. The defaults are.graphit/runtime/ast/export/for Obsidian and.graphit/runtime/ast/export.astfor a package.
list: List all installed AST contexts.source <relative-path>: Show stored source code for a file.--entity <name>: Extract specific entity range.--entity-type <type>: Class context type.--head <int>: Show first N lines.--tail <int>: Show last N lines.--start <int>: Start line.--end <int>: End line.--pattern <string>: Grep-like match.--regex: Treat pattern as regex.--before <int>: Context before match.--after <int>: Context after match.--line-numbers: Print line prefixes.--context <name>: Context name.
embed: Generate vector embeddings for semantic search.rule: Manage the AST module rule.--unset: Remove customization.--default: Show default rule.
Manages project documentation wiki and contexts.
graphit knowledge <subcommand> [flags]Subcommands:
index [path]: Scanknowledge.docs_dir(defaultdocs/) plus the root README, and compile the wiki index. Apathargument overrides both and indexes that directory wholesale.--reset: Clear the knowledge store first. It coordinates with background embedding and does not require a daemon restart.--louvain: Detect community structures.--workers <int>: Thread count.--context <name>: Re-index context.
watch [path]: Watch the project and incrementally recompile from the same scope. Apathargument watches and indexes that directory wholesale.--louvain: Detect community structures.
ask <text>: Answer a question from the knowledge wiki using the configured AI.--context <name>: Search context.
query: Filter rows of one index table by Lance predicate and return only the columns asked for.--table <name>:chunks(default),xrefs,sync_logormeta.--filter <predicate>: WHERE clause, e.g.stale_since != ''. Not SQL: no SELECT, JOIN, GROUP BY or ORDER BY.--columns <list>: Columns to return.--limit <int>/--offset <int>: Rows to return and skip.--context <name>: Query context.
lint: Audit wiki files for link defects.--fix: Fix broken backlinks.--deep: Enable AI contradiction audit.--stale-days <int>: Age threshold.--context <name>: Context name.
schema: Print the index tables, their columns and row counts. The index is LanceDB, not a graph database.--table <name>: Describe only this table.--context <name>: Context name.
install <name>: Fetch knowledge context.remove: Delete the project wiki index directory, or disconnect an imported context.--context <name>: Context name.
sync: Re-sync context.export: Export the compiled Knowledge index.--format <format>:packagewrites an importable.knowledgearchive,okfwrites Open Knowledge Format Markdown, andobsidianwrites a navigable Markdown vault.--output <path>: Output file or directory; omitted output uses a format-specific project runtime path.--context <name>: Export an imported Knowledge context instead of the local project.--project-dir <dir>: Resolve the project from another directory.
list: List contexts.rule: Manage knowledge rule.
Manipulates persistent agent memories.
graphit memory <subcommand> [flags]Subcommands:
index: Refresh indexes on the authoritative memory table.--user: Target user scope.--louvain: Run clustering.--context <name>: Re-index context.
watch: Watch memory changes.--user: Target user scope.--louvain: Run clustering.
ask <question>: Answer a question from the memory table using the configured AI.--user: Target user scope.--context <name>: Context name.
query: Filter memory records by Lance predicate and return only the columns asked for.--filter <predicate>: WHERE clause, e.g.mandatory = true. Anidrepeats across revisions, so addsuperseded = falsefor live records only.--columns <list>: Columns to return.--limit <int>/--offset <int>: Rows to return and skip.--user: Target user scope.
schema: Show the memory table's columns, types and record count, read from the table. Memory is a LanceDB table, not a graph.--user: Describe the user-scope table.
install <project-id-or-name>: Fetch external memory context.remove: Remove a memory or disconnect an imported context.--context <name>: Context name.
sync: Refresh the authoritative context table's indexes.list: List memories.--user: List user scope.
insert <title>: Add new memory entry.--content <body>: Memory details.--user: Save to user scope.--project: Link user memory to active project.--important: Surface in Agent rules.--mandatory: Require unconditional session-start recall.--type <type>: convention, correction, decision, tension, fact, or skill.--tags <list>: Comma-separated tags.--context <name>: Target context.
update <id>: Modify existing memory.--content <body>: New body.--title <title>: New title.--user: User scope.
delete <slug>: Remove memory.--user: User scope.--context <name>: Context name.
search <term>: Grep-like memory search.--user: Target user scope.
important: List important memories.--user: User scope.
mandatory: List every mandatory memory with complete content, without search.--user: User scope.
promote <id>: Mark memory as important.--user: User scope.
demote <id>: Remove important status.--user: User scope.
mark-mandatory <id>: Require unconditional recall for a memory.--user: User scope.
unmark-mandatory <id>: Stop unconditional recall when the requirement no longer applies.--user: User scope.
consolidate: Find and resolve duplicate, contradicting and stale memories.--user: User scope.--dry-run: Show the plan only, change nothing (defaulttrue).
All Memory list and search output is grouped mandatory, important, then normal. Within each
group, the most recently updated memories appear first (created_at is used when updated_at is
absent). A search score reports match strength but does not override this order.
The analysis runs on the agent CLI from ai.cli; every change is then applied in Go
under invariants the analysis cannot override — content is always carried into a
surviving memory before anything is removed, importance, mandatory status, and classification
survive a merge, an important or mandatory memory is never deleted outright, the last memory in a scope is
never deleted, and every refusal is reported with its reason. Without an AI CLI, only
the deterministic staleness check runs.
This manual command remains a separate deterministic analysis/apply workflow. The dream module instead lets a constrained agent make individual, CAS-fenced Memory tool calls during idle time; Dream does not invoke this command.
gcwas removed. Collecting memories by age answers the wrong question: age says a memory has not been revised, not that it is wrong. Consolidation reasons about content instead, and carries it forward instead of deleting it.
--stale-days <int>: Expiry threshold.rule: Manage memory rule.
AI multi-wiki explorer.
graphit wiki <subcommand> [flags]Subcommands:
search <query>: Search multiple wiki sources.--wiki <refs>: Knowledge sources to search:projector project IDs.--hub <refs>: Registry knowledge artifacts.--session <name>: Session identifier.--continue: Resume last session.--top-k <int>: BM25 filter limit.
chat: Multi-turn chat over wiki context.--session <id>: Session ID.--continue: Resume last session.
sessions: List or delete wiki sessions.--delete <id>: Delete session ID.
embed: Generate or update vector embeddings for the project knowledge wiki.
Export is owned by graphit knowledge export; graphit wiki export is not a command.
Controls background service lifecycle.
graphit daemon <subcommand> [flags]Subcommands:
- Foreground daemon start:
graphit daemon--no-embedding: Disable embedding server.--no-dream: Disable dream runner.--log <path>: Log file.
stop: Terminate running daemon.status: Show daemon status and log tail.restart: Stop the current daemon, start its replacement in the background, wait for readiness, and return to the terminal.scheduler <install|remove|status>: Manage OS system launchers (cron, launchd, task scheduler).
The recursive filesystem watcher is configured rather than controlled by a daemon flag:
graphit config modules.sync false
graphit daemon restartThat setting disables watching for the current project. Use the global configuration command below
for every registered project, or GRAPHIT_MODULES_SYNC=false in the daemon environment:
graphit config --global modules.sync falseWatching defaults to enabled. Disabling it stops incremental AST/Knowledge reactions but leaves
manual graphit sync and direct index commands available.
Inspects autonomous, idle-triggered Memory consolidation.
graphit dream <subcommand> [flags]Subcommands:
status: Show Dream state, latest operational run, and timing configuration.
Current runs write .graphit/runtime/dream/dream.state; their semantic result is the Memory table.
The provider-aware operational ledger is the shared Dream-module store: locally
<brand.GlobalDir()>/dream/dreams/<project_id>, or remotely
v2/projects/<project_id>/dream. The brand alone resolves the global root and its default. Runs do
not create a Markdown report, sentinel, or last-seen marker.
Manages deterministic project work in the shared LanceDB task store.
graphit task <subcommand> [flags]Subcommands:
batch <file|->: Run 1-100 ordered mutations from a JSON object withoperationsand optional defaultlease;-reads standard input. Every item reports success or an explicit error, and the command exits non-zero if any item fails.create <title>: Create an idempotent task with required description, acceptance criteria, and tests;--parentcreates a subtask, and--sessionassociates a durable request. Manual standalone tasks may omit a session.list/ready: List tasks or only dependency-ready work; filter by status, owner, parent, or--session.get,search: Retrieve authoritative history or search task/comment text;search --sessionranks only that session’s tasks.schema: Print the Task store's 11 LanceDB tables, their columns and row counts. Read it before writing aqueryfilter.--table <name>: Describe only this table.
query: Filter rows of one table by Lance predicate and return only the columns asked for — the route for a question about records you can already name, such as the status of a set of ids.--table <name>:tasks(default);schemalists the rest.--filter <predicate>: WHERE clause, e.g.id IN ('tsk-a','tsk-b'). Not SQL: no SELECT, JOIN, GROUP BY or ORDER BY, and rows come back in storage order.--columns <list>: Columns to return, e.g.id,status.--limit <int>/--offset <int>: Rows to return and skip.- The claim token is never returned and cannot be named in a filter.
export [task-id]: Print a stable complete JSON document for every project task, or one exact task and its recursive subtasks. Schema version 2 contains task snapshots, dependency/check projections, events, comments, specification revisions and the selected sessions with their event/checkpoint/specification history; an all-project export includes sessions without tasks. Private fencing tokens are never exported.claim,heartbeat,release: Own or hand off work with a fenced lease.progress,comment,check: Record checkpoints, typed context, and acceptance/test evidence.revise <task-id> <patch-file|->: Apply a strict JSON specification patch with--expected-revision,--reason, and the current claim token.check supersede <task-id> <check-id>: Preserve an obsolete check as superseded, with a reason and optional replacement.flag,unflag: Add or resolve a completion gate with a reason.dependency add|remove: Maintain explicit blocking edges.complete: Finish only after every active check and subtask passes and no flag remains.cancel: Preserve an obsolete task as an audited terminal record with a required reason.remove/rm: Hard-delete certainly erroneous work with--confirm <exact-id>and--reason; referenced tasks are refused.
Complete exports always write JSON and can be redirected without an additional format flag:
# Export the complete project Task document.
graphit task export > tasks.json
# Export one exact task and every nested subtask below it.
graphit task export tsk-abcd > tsk-abcd.jsonBoth forms use the same versioned export contract as graphit_task_export and the Observatory
/api/tasks/export endpoint. Arrays are ordered deterministically. Claim fencing tokens and
internal scheduler-control rows are excluded.
Claims default to one hour. Renewing through heartbeat, progress, checks, comments, or lifecycle hooks never shortens a longer active lease.
Open, unclaimed tasks are the backlog; no Markdown task files are created. On a direction change, cancel or remove obsolete work immediately instead of leaving task garbage. See Task Module.
A durable session holds the complete user request, strategy, checkpoints and related tasks across agents. Its coordinator claim is independent of task claims. Session guide provides the creation, revision, handoff, failure recovery and completion workflow.
| Subcommand | Inputs and result |
|---|---|
create <title> |
Required --description, --strategy; optional --idempotency-key, --agent. Creates an open request without claiming. |
get <id> / show <id> |
Snapshot, ordered events/checkpoints/spec revisions and associated task summaries, without private tokens. |
list |
Optional --status, --owner, --active; active selects open and in-progress requests. |
search <query> |
Search request and history; --limit defaults to 20. |
claim <id> |
Optional --agent, --lease (default 1h); returns the private coordinator token. |
revise <id> <patch-file|-> |
Strict JSON fields title, description, strategy; requires --expected-revision, --reason, --claim-token. |
checkpoint <id> <file|-> |
Strict JSON with required summary, next_step and optional problems, decisions, strategy; requires --claim-token. |
heartbeat <id> |
Requires --claim-token; renews ownership without changing the narrative. |
release <id> |
Requires --claim-token, --summary, --next-step; leaves the request open for continuation. |
complete <id> |
Requires --claim-token, --summary; refuses nonterminal associated tasks. |
cancel <id> |
Requires --claim-token, --reason; refuses nonterminal tasks without cancelling them automatically. |
force-takeover <id> |
Requires --confirm-id, --expected-revision, --reason, --lease; use a different --agent for an unrecoverable coordinator. |
Owner mutations accept --agent; revise/checkpoint/heartbeat also accept --lease. Session states
are open, in_progress, completed, cancelled. Ending a host turn never completes a request.
Manages project grouping.
graphit cluster [key] [value] [flags]Without subcommands:
graphit cluster <key> <value>: Set cluster label.--get <key>: Read label.--list: List all labels.--unset <key>: Remove label.
Subcommands:
projects: List sibling projects.