Skip to main content

Command overview

Usage: ovecc [OPTIONS] <COMMAND>

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

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

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

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.