Skip to main content

Command overview

Usage: ovecc [OPTIONS] <COMMAND>

Every command reads the model that ovecc index persisted into .ovecc/, renders in multiple formats, and returns stable exit codes. All commands are also exposed 1:1 as MCP tools.

These need no index: init, index, capabilities, mcp, architecture show, architecture templates, and architecture init --template — the contract is a file, so the questions answered from it alone work on day zero.

All commands

Foundation

CommandAnswers
initSet up a repository: commented config, .gitignore entry
indexBuild or update the local architecture database
capabilitiesThe machine-readable contract: commands, metrics, rules, exit codes
summaryOne-screen architecture health
reportOne-shot report: summary + cycles + violations + security + hotspots
grepSearch from the index: definitions first, then text matches
readOne element's source: a symbol, a file:line anchor, a range, an outline

Findings

CommandAnswers
violationsEvery architecture + security finding, with file:line
securitySecrets, insecure patterns, weak crypto, tainted flows
auditKnown-vulnerable dependencies (offline OSV)
healthFunctions over the complexity thresholds
deadcodeUnused exports, unreachable files, phantom/unused dependencies
dupesDuplicated code (clone families)
fixApply the mechanical fixes (dry-run by default)

Architecture intelligence

CommandAnswers
diagnoseNamed architectural smells + evidence + remediation
adviseEverything touching one file/module, with fixes — call before editing
metricsPer-component Martin metrics (fan-in/out, instability, distance)
explainDeterministic explanation of an element's role
impactBlast radius of changing a module / symbol / API / table
queryStructured graph queries: deps, rdeps, paths, cycles, reachability
exportContext slice as JSON, or the dependency graph (JSON / HTML viewer)
hotspotsTechnical-debt ranking: churn × coupling × ownership × violations
conventionsConventions learned from the repo, and deviations
componentsSubsystems recovered from the graph, beside the directory modules
couplingFile pairs the history keeps changing together
selfcheckEach rule graded against the repo's own fix history

Architecture contract

Your intended architecture as code, in .ovecc/architecture.toml, checked against the real graph on every run. Start with the contract.

CommandAnswers
architecture initDraft the contract from the graph, or from a built-in template
architecture templatesThe reference architectures shipped in the binary
architecture suggestWhich built-in architecture this repo already follows
architecture showWhat may this file import? (no index required)
architecture diffThe contract against the real graph, with file:line
architecture checkThe same, as a CI gate, with a baseline for adoption

Change scope (PR loop)

CommandAnswers
reviewThe NAMED new defects a change introduced
gatePass/fail CI verdict on new cycles / violations / regressions
diffRaw structural deltas between two snapshots
driftMetric trend between snapshots: better or worse?
historyOne metric across every snapshot, with a sparkline

Integration

CommandAnswers
mcpMCP server over stdio: every command as an agent tool

Global options

Every command accepts:

OptionEffect
--repo <PATH>Operate on this repository (default: the current directory)
--format <FORMAT>text (default), json, ndjson, markdown — plus sarif and codeclimate for finding-shaped output. Default is configurable via [output] default_format
--statsPrint wall-clock and peak-memory stats to stderr (for index: per-phase breakdown)
--no-metaOmit the self-describing meta block from JSON output (the MCP server sets this automatically)

Exit codes

CodeNameMeaning
0successCommand succeeded; no gating threshold crossed
1findings_presentA --fail-on threshold was crossed (findings/cycles/risk)
2usageCLI usage error (bad arguments)
3repositoryRepository or configuration error
4indexIndex or database error (e.g. database missing)
5parserParser error
6gitGit error
7internalUnexpected internal error

A downstream reader closing the pipe early (ovecc report | head, quitting a pager) is not an error: output stops quietly and the exit code is 0. More in the exit-code reference.

Determinism

Every command is deterministic: an unchanged database renders byte-identical output. Paths are repo-relative with POSIX separators in every format.