First Scan
Once installed, running your first scan is simple.
Run a Basic Scan
Navigate to your project root and run:
bash
npx @archlinter/cli scanBy default, archlint will:
- Scan all TypeScript and JavaScript files in the current directory.
- Respect your
.gitignorefile. - Use default rules for all 28+ detectors.
- Output a colored table summary of the detected smells.
Save a Snapshot
To use the "Ratchet" approach, you first need to capture the current state of your architecture:
bash
npx @archlinter/cli snapshot -o .archlint-baseline.jsonThis file represents your architectural baseline. You should commit it to your repository.
Check for Regressions
Now, as you develop, you can check if your changes have introduced any new architectural issues:
bash
npx @archlinter/cli diff .archlint-baseline.jsonIn a CI environment, you would typically compare against the main branch:
bash
npx @archlinter/cli diff origin/main --fail-on medium