Skip to content

CLI Reference

The trurlic CLI manages the decision graph and starts the servers. It is fully offline and never calls an LLM — all agent reasoning happens over MCP. Run trurlic <command> --help for inline help.

CommandPurpose
initCreate .trurlic/ in the current project
add component / add connectionAdd a component or a directional connection
rename componentRename a component, updating all references atomically
remove component / remove decision / remove connectionRemove a node or edge
decideRecord a decision directly
query fileFind decisions that constrain a file or directory
statusShow component/decision counts and open issues
checkValidate .trurlic/ consistency
gcReclaim decisions that lost their anchor
migrateMigrate .trurlic/ to the current format version
serveStart the MCP server
mapOpen the interactive graph in the browser
installWrite MCP config for an IDE
Terminal window
trurlic init

Creates project.toml, an initial graph.toml, empty components/ decisions/ patterns/, and a .state/ scratch dir; adds .trurlic/.state/ to .gitignore. Refuses if .trurlic/ already exists.

Terminal window
trurlic add component <name> [-d <description>]

name must be unique, valid kebab-case, and not a reserved name (project, all). -d/--description sets a one-line summary.

Terminal window
trurlic add connection <from> <to>

Directional edge (data/control flow). Both components must exist; self-connections are rejected; duplicates are idempotent.

Terminal window
trurlic rename component <old> <new>

Updates the component file, every referencing decision and pattern, all connections, and the index — in one atomic commit.

Terminal window
trurlic remove component <name>

Refuses if any decision references the component.

Terminal window
trurlic remove decision <name> # one decision
trurlic remove decision --agent --component <name> # all agent decisions in a component

name is the decision filename without .toml. Refuses if other decisions DependsOn it or if removal would shrink a pattern below two members; reports affected patterns and edges. The --agent batch is atomic — if any removal is cascade-blocked, none happen.

Terminal window
trurlic remove connection <from> <to>

Record a decision directly, without a design conversation.

Terminal window
trurlic decide <component> \
--choice "..." --reason "..." \
[-a "alternative"]... \
[--ref "src/auth/token.rs::issue_token"]...
FlagDescription
--choiceWhat was decided
--reasonWhy — your reasoning
-a, --alternativeAn alternative considered and rejected (repeatable)
--refCode location this decision manifests: file or file::symbol (repeatable)

Use project as the component for a project-wide rule. Recorded with attribution=user.

Terminal window
trurlic query file <path>

Lists decisions whose code_refs match path exactly or fall under it (directory prefix) — e.g. src/store/write.rs or src/store. Use it to find which decisions constrain a file before you edit it.

Terminal window
trurlic status

Component and decision counts plus open issues (uncovered concerns, unreviewed agent decisions).

Terminal window
trurlic check [--rebuild]

Verifies BLAKE3 hashes, dangling edges, schemas, and cycles. --rebuild reconstructs graph.toml from node files (nuclear recovery) — non-inferable edges (ConnectsTo, DependsOn, Constrains, Supersedes) are lost and must be re-added.

Reclaim decisions that have lost their anchor: orphaned (component gone), orphaned-ref (all referenced files deleted), or long-unreviewed agent decisions.

Terminal window
trurlic gc # dry-run: report what would be reclaimed (DEFAULT)
trurlic gc --apply # write the removals (orphans only)
trurlic gc --aggressive --apply # also remove orphaned-ref + unreviewed agent decisions

Dry-run is the default. --aggressive widens the scope; combined with --apply it prompts for confirmation unless --yes is passed (required in CI / non-interactive shells).

Terminal window
trurlic migrate [--dry-run]

Upgrades .trurlic/ to the current format version. --dry-run shows what would change without writing.

Terminal window
trurlic serve

Starts the MCP server over stdio. Watches .trurlic/ for external changes. No API key required. See MCP Server.

Terminal window
trurlic map [--port <N>] [--no-open] [--detach]

Opens the interactive graph. --port binds a specific port (default: OS-assigned); --no-open skips launching the browser; --detach backgrounds the server and prints the URL.

Write MCP server configuration for an IDE or agent.

Terminal window
trurlic install --ide <target> [--binary-path <path>] [--dry-run]

--binary-path overrides the binary embedded in the config (default: the running executable); --dry-run prints the snippet without writing. Existing configs are merged, not clobbered — an existing trurlic entry is overwritten with a warning.

--ide valueTargetConfig written
claudeClaude DesktopPlatform claude_desktop_config.json
claude-codeClaude CodeRuns claude mcp add directly
cursorCursor~/.cursor/mcp.json
clineCline (VS Code)Platform cline_mcp_settings.json
windsurfWindsurf~/.codeium/windsurf/mcp_config.json
copilotGitHub CopilotPlatform Code/User/mcp.json (servers key)
codexCodex CLI~/.codex/config.toml
open-codeOpenCode~/.config/opencode/opencode.json
open-clawOpenClaw (MCPorter)~/.openclaw/workspace/config/mcporter.json
hermes-agentHermes Agent~/.hermes/config.yaml
antigravityAntigravity CLI~/.gemini/config/mcp_config.json

See Connect Your IDE for details.

Terminal window
trurlic --version
trurlic --help
trurlic <command> --help