Skip to content

Contributing

  • Improve existing checks and recommendations
  • Add or refine report output
  • Expand documentation and examples
  • Report issues and propose feature requests
Terminal window
git clone https://github.com/anakotai/harnix.git
cd harnix
npm install

Run the CLI against a target repository:

Terminal window
node bin/harnix.js scan .

Run docs locally:

Terminal window
cd docs
npm install
npm run dev

Harnix uses Vitest for testing. Run the full test suite with:

Terminal window
npm test

Tests live in tests/ and use fixture repositories under tests/fixtures/ that simulate repos with various check conditions (pass, partial, fail). When adding or modifying a check, add corresponding tests in tests/checks/<check-id>.test.ts with at least three test cases covering pass, fail, and partial/edge scenarios.

  1. Create checks/<check-id>/meta.yaml with required fields: id, name, category, tier, description, tags, applicableTo
  2. Create checks/<check-id>/check.ts exporting a default async function that receives a ScanContext and returns a CheckResult
  3. Rebuild with npm run build and verify the check is discovered by running harnix scan .
  4. Add tests in tests/checks/<check-id>.test.ts
  • Keep changes focused and testable
  • Update docs when behavior changes
  • Prefer explicit check IDs and deterministic output wording
  • Avoid network dependencies in scan execution
  • Follow Conventional Commits format for commit messages (e.g., feat:, fix:, docs:, chore:)