Skip to content

ctxo visualize ​

Produces a self-contained HTML file showing the project's symbol graph, with PageRank-weighted node sizing, dead code highlighting, architectural layer coloring, cyclomatic complexity, and per-file git intent. The file opens in your default browser by default.

Synopsis ​

shell
npx ctxo visualize [options]

Flags ​

FlagDefaultDescription
--max-nodes <N>allKeep only the top N symbols by PageRank. Useful for very large graphs
--output <path>.ctxo/visualize.htmlWhere to write the HTML file
--no-browserfalseDo not open the result in a browser

What is in the output ​

DimensionSource
Node sizePageRank score (core/importance/pagerank-calculator.ts)
Node colorArchitectural layer (core/overlay/architectural-overlay.ts)
Dead-code badgefind_dead_code detector
Cyclomatic complexityPer-symbol complexity stored in the index
Anti-pattern flagFiles with revert or churn anti-patterns
Edgesimports, calls, extends, implements, uses

Each file's commit intent and anti-pattern history are embedded for on-hover inspection.

Examples ​

shell
npx ctxo visualize
shell
# Keep only the 200 most central symbols.
npx ctxo visualize --max-nodes 200
shell
npx ctxo visualize --output ./reports/graph.html --no-browser
shell
# Generate the HTML in a CI job; upload it as an artifact.
npx ctxo visualize --output artifacts/ctxo-graph.html --no-browser

Exit codes ​

CodeMeaning
0HTML written
1No index found (run ctxo index first), or --max-nodes is not a positive integer

See also ​

  • ctxo index β€” must run before visualize has data.
  • ctxo status β€” verify the index before visualizing.

Released under the MIT License.