CLI reference

Common commands for graph exploration, context, review, and operation.

Graph and retrieval

Terminal
fehm scan [repository] [--out directory]
fehm stats [graph.json]
fehm query "question" [graph.json] --budget 4000
fehm focus "symbol" [graph.json] --depth 2
fehm relationships "symbol" --direction both
fehm search "query" --limit 10

Commands that accept an optional graph default to .fehm/graph.json. Use an absolute graph path when working outside the indexed repository. query is an alias for context retrieval.

Review and quality

Terminal
fehm impact --base HEAD~1
fehm preflight --base HEAD~1 --understand "describe the change"
fehm verify --no-commands
fehm practices audit
fehm health
fehm production-audit

Choose a Git base that exists. Remove --no-commands only when you want verification to run project commands.

Assistant registration

Terminal
fehm install --platform codex --project
fehm integrations --platform codex --project
fehm uninstall --platform codex --project

Omit --project for personal scope. Use --dry-run before registration changes. Customized skills are protected; --force backs them up before replacement.

Operation and help

Terminal
fehm serve .fehm/graph.json --watch --port 7331
fehm mcp /absolute/path/to/.fehm/graph.json
fehm --version
fehm --help

--help lists the full CLI surface. Many reports accept --json for programmatic consumption. Practice audits return exit code 2 for required gaps or baseline regressions and exit code 1 for invalid configuration.