Skip to main content
This is the public command reference for the OpenCLIs release monogram 0.98.6. In a non-TTY agent process, bare monogram and monogram help print a compact entry brief. Pull the full installed manual with monogram help --full or monogram docs initiate; monogram mcp-schema is the machine-readable authority for the MCP-visible command contract.
For index ownership and freshness, see Scope & Index Management. For coupling, semantic evidence, and possibility bands, see Audit & Correctness.

Contract preflight

Use these commands before ordinary code search when the task is a behavioral contract rather than a simple location question.

monogram spec-audit

Turns a public task or specification into leak-safe edge bands and executable Monogram follow-ups.
It is a preflight, not a hidden-test oracle. Use the leading band to define an edge test, then return its named connection point to region, context, chain, and coupling.

monogram sequence

Runs the stateful contract loop: locate code, deepen the structural fork, define connection points, and close the ordered review after the final edit.
sequence define writes connection-points.md. It joins the spec bands, IAW-SOP contract gates, advisory trigram structure, and embedded fix-shape knowledge. Its leading [IAW-SOP] ORDER chain is binding: bind the contract, consult the Book before the first Edit/Write when knowledge is present, implement and test, then run sequence finish after the last Edit/Write. sequence finish re-presents the saved spec.md and available Book section, writes a finish.json witness, and sets meta.json phase to finished. It does not edit product source. JSON output from start, define, and status carries the same order contract, while status and resume re-emit the phase and next position after context loss. The generated documents remain substrate for proof; the agent still decides which contract applies and must satisfy each gate with source and test evidence. Use MONOGRAM_HOME for benchmark and disposable-worktree isolation. Since 0.98.2 the sequence session follows that override as well as the index databases, so start, deepen, define, finish, and resume do not introduce a repo-local .monogram/ directory in an isolated run. Human-readable stats, search, and region results and every packaged discovery guide use session and task identity to choose at most one inbound hint. TASK.md, PLAN.md, BUG.md, .task.md, cwd .monobench-task-instruction.md, and the historical /tmp/monobench-task-instruction.md path are recognized task sources. A task whose FNV-1a 64-bit content digest is absent from existing session metadata gets a runnable sequence start task --from <path> hint. The digest is an identity gate, not a security hash. When the current session is open and no checked scope file is newer than its UTC start, the hint reports ORDER OPEN (<id>), the exact connection-points.md path to re-read after compaction, and sequence finish as the closing verb after the final Edit/Write. Once a saved scope-file mtime crosses that start boundary, the hint escalates to edits detected in its scope and the final-close wording. Missing or malformed session/scope data and unresolvable files fail quiet rather than breaking a search. Successful stats --json, search --json, and region --json responses carry the same decision in sequence_hint: a string when the edge exists, otherwise null. MCP always invokes these commands through JSON, so it inherits that field. Finishing the session suppresses the same task; a different recognized task digest triggers entry again. Legacy sessions with no digest remain readable and suppress only the generic placeholder. This adds a response field, not a 51st MCP command.

monogram format-trace

Treats a data or configuration format as a language plane with symbols, references, scopes, branches, and runtime behavior.
The public planes are json-schema, openapi, openapi-yaml, hcl, and cargo-toml; generic yaml and toml are intentionally not public planes. JSON Schema output includes reference cycles, generator/runtime markers, completion_gate, and required positive/negative probes. A blocked gate is unfinished work, not informational decoration.

Locate

Ranks files and symbols using trigram, compound-identifier, coverage, and size evidence.
Useful controls include -n, --cwd, --file, --lang, --explain, --score-debug, --bands, --json, and -r. Ranking is lexical/structural relevance, not root-cause proof. Follow the printed file-scoped region or symbol proof rather than repeatedly broadening the same search.

monogram region

Fuses fuzzy search, raw hits, structural references, graph, coupling, and metrics into ranked functional source regions.
-n caps displayed regions, not the evidence scan. --file and --lang retain scope; --domain can bias http, sql, pubsub, tauri-ipc, ffi, event, css-token, or export-import. A close-score contrast lock asks you to compare bounded candidates before choosing one.

monogram symbols

Lists exact definitions with kind, signature, and file:line evidence.

monogram grep and monogram refgrep

grep combines native indexed code-line hits with structural references; refgrep restricts the query to reference targets.
Single-line alternation and simple regex forms are supported. Use -C, -A, or -B for bounded context inside Monogram rather than piping the result through shell filters. Broad lifecycle/ownership terms are guarded and redirected toward file-scoped regions before expensive caller fan-out.

monogram context

Returns relevant entry symbols, one-hop graph evidence, and line-numbered source in one call.
Inline source is capped at 80 lines. Large types expose member follow-ups instead of dumping an entire definition.

monogram trace and monogram investigate

trace is the bounded composite: definition, callers, callees, and a coupling-boundary cue. investigate also runs the coupling boundary and identifies the highest fan-in edit anchor. Use trace for a quick role view; use investigate when the boundary must be present in the same report.

monogram chain and monogram tree

chain is a flat BFS view; tree is a hierarchical DFS view. --file, --lang, --through, and bounded depth keep homonyms and fan-out under control. Broad roots are staged into smaller expansions rather than returning an unbounded graph.

monogram provenance

Traces where a value originates: writers, writer callees, and the raw-source versus transformed-view fork.
It requires a verified deep index. Use it for field/getter origin questions; use chain for call ownership.

monogram deps, monogram rdeps, and monogram css

deps follows outgoing imports, rdeps follows the reverse dependency radius, and css flattens a stylesheet’s @import graph in cascade order while marking duplicate imports.

Complete 50-tool MCP inventory

The following CLI names map to the 50 tools returned by the live Monogram MCP server (MCP names use the monogram_ prefix and underscore-normalized command names). This count excludes local index administration and terminal integration commands.

Contract, locate, and navigation: 16 tools

Structural, index, and format audits: 12 tools

Deep graph and possibility bands: 22 tools

All deep graph and possibility-band tools require monogram index . --deep and a healthy monogram semantic status. Their rows are evidence leads or complete worklists, not automatic bug verdicts.

CLI-only administration and integration

These commands are real public CLI functions but are intentionally outside the 50-tool MCP investigation inventory: MONOGRAM_PREPARED_INDEX=1 blocks index-mutating commands, -r, prune, and boot init for harnesses that pin a prepared database.

Shared output controls

Many commands support the same evidence controls: Avoid shell-side head, grep, or ad hoc file discovery when the command provides a bounded option or printed [NEXT]. Keeping the scope and proof inside Monogram preserves its candidate ordering and guard rails.

End-to-end examples