Skip to content

Latest commit

 

History

History
118 lines (78 loc) · 3.13 KB

getting-started.md

File metadata and controls

118 lines (78 loc) · 3.13 KB

Getting Started

This guide walks through installing codeint, initializing codeint.jsonc, and running your first measurements, diagnostics, and codebase queries.

Install

Install the standalone binary on macOS or Linux:

curl -fsSL https://github.com/avidianity/codeint/releases/latest/download/install.sh | bash

Install the standalone binary on Windows (PowerShell):

irm https://github.com/avidianity/codeint/releases/latest/download/install.ps1 | iex

Or run directly through npm without a global install:

npx codeint check

First measurements inside a Git repository

  1. Create a starter codeint.jsonc pinned to your installed version's JSON schema (never overwriting an existing codeint.json or codeint.jsonc):

    codeint init
  2. Verify your repository setup, config validity, detected languages, Workspace packages, and external Plugins offline:

    codeint doctor
  3. Inspect the effective active configuration and where each setting comes from (default, file, or cli):

    codeint config --resolved
  4. Measure the current working tree:

    codeint check
  5. Compare your branch against main and fail on any Budget failure or Regression:

    codeint diff main
  6. Save a JSON report once and re-render it losslessly into Markdown, SARIF, or TOON without re-scanning:

    codeint diff main --format json --output diff.json
    codeint report diff.json --format markdown
    codeint report diff.json --format sarif --output codeint.sarif
  7. Inspect how each Metric evolved over the latest 20 main-line commits:

    codeint trend

Navigation, boundaries, and Git history queries

Use codeint before editing or refactoring to understand architectural rules and blast radius:

  • Check architectural boundary zones and allowed imports for an existing or planned file:

    codeint guard src/domain/order.ts
  • Find the shortest runtime import path between two modules:

    codeint trace src/routes/checkout.ts src/db/pool.ts
  • Compute the transitive reverse-dependency blast radius of files or everything changed since main:

    codeint impact src/domain/order.ts
    codeint impact --changed main
  • Rank eroded and duplicated files alongside their Git commit churn independently per Metric:

    codeint churn --since 90d
  • Find pairs of files that repeatedly change together in the same commits:

    codeint coupling --since 90d
  • Upgrade a standalone binary in place (and keep your configuration file's $schema tag in sync):

    codeint update

Exit codes

  • 0: succeeded with no Budget, Regression, or blocking codeint doctor error.
  • 1: succeeded, and at least one Budget, Regression, or blocking codeint doctor error failed.
  • 2: operational error (invalid codeint.jsonc / codeint.json, both config files present at once, missing folder, unknown option, or not inside a Git repository).

See docs/reference.md for every command flag and output format (toon, json, sarif, markdown, text).