First run

Getting Started

Install Codescythe, add a minimal config, run the analyzer, and apply supported fixes.

Install

Use the public npm package for local development and CI. The loader selects the matching native package for supported platforms.

npm install -D codescythe

Minimal Config

Start by naming the files that make the application reachable and the project files that Codescythe is allowed to report.

{
  "$schema": "./codescythe.schema.json",
  "entry": ["src/index.ts"],
  "project": ["src/**/*.{ts,tsx}"],
  "testFilePatterns": ["**/*.test.*"]
}

Run Analysis

  1. Run read-only JSON

    npx codescythe --json --config codescythe.jsonc
  2. Inspect unused files and exports

    Unused project files and unused exports are reported separately so you can review deletion and export-edit risk independently.

  3. Rerun with verbose diagnostics when changing config

    npx codescythe --verbose --json --config codescythe.jsonc

Apply Fixes

Fix mode removes unused project files and supported export declarations. It refuses risky source-like unresolved-import ignore patterns unless you explicitly force the run.

npx codescythe --fix --config codescythe.jsonc

CI Workflow

A practical CI lane runs read-only JSON and fails when Codescythe finds issues. Keep destructive fixes in reviewed cleanup branches.

npx codescythe --json --config codescythe.jsonc