Getting started
Install ngcompass.
ngcompass is a command-line tool. Install it locally in each Angular project so the CLI version, config file, and CI runs all use the same package. This avoids hard-to-debug mismatches between a global CLI and the project's config model.
01
Requirements
- Node.js
- ^20.19.0 or >=22.12.0
- Angular
- v15 or later
- Package manager
- npm, pnpm, or yarn
- TypeScript
- bundled with Angular
02
Recommended setup
For Angular CLI projects, use ng add. It installs ngcompass in the project and initializes ngcompass.config.ts in one step.
bash
01ng add ngcompassIf your workspace cannot use Angular schematics, install the package locally and run init manually:
bash
01npm i -D ngcompass02npx ngcompass initOr with pnpm:
bash
01pnpm add -D ngcompass02pnpm ngcompass initOr with yarn:
bash
01yarn add -D ngcompass02yarn ngcompass initPackage page: ngcompass on npm.
03
Verify
bash
01npx ngcompass --version02# or03pnpm ngcompass --versionYou should see 0.2.2-beta or later.
04
Global installs
Prefer project-local installation. Use a global install only for throwaway checks outside a committed Angular workspace, because a global CLI can drift away from the config schema in the project.
bash
01npm install -g ngcompass05