CLI Reference
MorphArch supports two main workflows:
- interactive repository inspection with
watch - static analysis and reporting with
scan,analyze, and repo-scoped cache commands
The interactive UI is organized into three levels:
Map: understand repo shapeCluster details: inspect one subsystemInspect: debug one member or module
Global Options
| Flag | Long Flag | Description |
|---|---|---|
-v | --verbose | Enable INFO-level logging |
-h | --help | Show help |
-V | --version | Show the installed version |
Commands
scan
Scan a repository, extract dependency graphs from Git history, compute health, and store snapshots locally.
morpharch scan [path] [flags]
Arguments
path: repository path, default..
Flags
-n, --max-commits <N>: limit how much history is scanned.0means no limit.
Notes
- history traversal is
first-parentonly - scan data is cached per repository in the local SQLite database
- repeated runs reuse cached state when the repo and config are unchanged
watch
Scan a repository and launch the terminal UI.
morpharch watch [path] [flags]
Arguments
path: repository path, default..
Flags
-n, --max-commits <N>: limit how much history is scanned before launch-s, --max-snapshots <N>: limit how many snapshots are loaded into the timeline
What watch opens
MorphArch opens on the architecture map whenever clustering is available.
From there the expected flow is:
- open a cluster from
Map - inspect cluster details and the selected-item lens
- open a centered raw graph lens in
Inspect
The insights panel is organized into:
Overview: current state, recent trend, risk drivers, and suggested actionsHotspots: the modules creating the most pressureBlast: downstream impact for high-risk modules
analyze
Generate a static architecture report for one commit.
morpharch analyze [commit] [flags]
Arguments
commit: commit reference such asHEAD,main~5, orabc1234. Defaults toHEAD.
Flags
-p, --path <PATH>: repository path, default..
list-graphs
List recently stored graph snapshots.
morpharch list-graphs --path .
Flags
-p, --path <PATH>: repository path, default..
list-drift
Show recent health drift and graph deltas in a compact table.
morpharch list-drift --path .
Flags
-p, --path <PATH>: repository path, default..
TUI Navigation Model
MorphArch uses one consistent interaction model across the TUI.
Global
Tab/Shift+Tab: move panel focus1-4: jump to Packages, Graph, Insights, or Timelineq: quit?: open help
Selection and drill-down
j/korUp/Down: move selection in the active panelEnter: open selected cluster, member, or inspect targetEsc: go back one semantic level
Local views
h/lor[ ]: switch local views or tabs
Graph and timeline
- mouse wheel: zoom raw inspect graph
- drag graph background: pan in inspect mode
c: reset graph viewportr: reheat raw graph layoutLeft/Right: move through timelineSpaceorp: play/pause timeline
Filtering and panel visibility
/: filter current sidebar or graph contextb: toggle sidebari: toggle detail panelx: toggle blast overlay when available
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Runtime error |
2 | Internal failure / panic |
Typical Workflows
Explore a repo interactively
morpharch watch .
Generate a point-in-time report
morpharch analyze HEAD --path .
Review recent drift
morpharch list-drift --path .
Limit history for a faster local session
morpharch watch . -n 150 -s 200