Analyzer surface

Features

Review the analyzer, fix mode, verbose diagnostics, export explanations, and doctor checks.

Import Graph

Codescythe follows static imports, re-exports, string-literal dynamic imports, destructured CommonJS requires, and supported import.meta.glob patterns.

Dependency Queries

Use query somepath, and query allpaths to inspect dependency routes through that graph. Queries can target files, folders, or exported symbols and can render text, JSON, Mermaid, or SVG output. The dependency query guide includes fixture-backed Mermaid samples.

Unused Files and Exports

The report separates unreachable files from unused exported symbols. This keeps deletion decisions and export-edit decisions reviewable.

{
  "unusedFiles": ["src/legacy/dead-view.ts"],
  "unusedExports": [
    { "file": "src/constants.ts", "symbol": "oldFlag" }
  ],
  "unresolved": []
}

Fix Mode

Fix mode removes unused files before export edits, records changed files, and skips export edits when unresolved import uncertainty could hide real usage.

npx codescythe --fix --json --config codescythe.jsonc

Explanations

Use export explanations when reviewing a surprising result. Codescythe reports the requested symbol status, the reason for that decision, which importers counted, and which importers were skipped. The report guide shows how to read each field.

npx codescythe --explain-export src/constants.ts:getServerId

Doctor

Doctor mode checks config risk without editing files. It is the fastest way to diagnose suspicious ignores, empty globs, unresolved imports, and source-alias overlap. Read doctor warnings as config risk signals, then use unresolved import diagnostics to see the alias candidates Codescythe tried.

npx codescythe doctor --config codescythe.jsonc