FAQ
Does Harnix require an internet connection?
Section titled “Does Harnix require an internet connection?”No. Harnix operates entirely offline. It reads files from the local filesystem and does not make network calls, connect to external APIs, or require authentication tokens. You can run harnix scan . on an air-gapped machine, inside a CI container with no outbound access, or on any system with Node.js installed. All checks analyze local repository structure and file contents only.
Does Harnix support monorepos?
Section titled “Does Harnix support monorepos?”Yes. Harnix automatically detects Git submodules (via .gitmodules) and workspace configurations (npm workspaces in package.json, Yarn/pnpm workspace fields, Nx nx.json, Turborepo turbo.json, and Lerna lerna.json). When submodules or workspaces are found, the repo-structure check evaluates organizational quality signals such as source directory presence, root-file ratio, and workspace config coherence. Harnix also performs recursive scans of discovered submodules and workspaces, reporting per-component scores alongside the top-level assessment.
Can I customize the scoring?
Section titled “Can I customize the scoring?”Harnix uses a fixed tier-weighted scoring model where each check has a tier (critical, important, or nice-to-have) with corresponding weights of 3, 2, and 1. The overall score is a weighted average of all evaluated checks. You cannot change tier assignments or weights through configuration.
However, you can influence which checks contribute to the score:
- Skip checks that are not relevant to your repository using
--skip <check-id>or theskipkey in.harnix.yaml. Skipped checks are excluded from the scoring calculation entirely. - Run only specific checks using
--only <check-id>or theonlykey in.harnix.yaml. Only the specified checks are evaluated and scored. - Override repository type using
--type softwareor--type non-software. Some checks only apply to software repositories (e.g.,ci-pipeline,testing-provision,repo-structure), so changing the type affects which checks are included.
See the Configuration page for details on .harnix.yaml and CLI flag precedence.
How do I add a custom check?
Section titled “How do I add a custom check?”Each check in Harnix is a self-contained directory under checks/ with two files:
meta.yaml— Declares the check’s ID, name, category, tier, description, tags, andapplicableToscope.check.ts— Exports a default async function that receives aScanContextand returns aCheckResult.
To add a new check:
- Create a directory under
checks/named with a kebab-case ID (e.g.,checks/my-check/). - Add a
meta.yamlfollowing the existing checks as a template. - Implement your check logic in
check.ts. The function receivesrootPath,files(array of relative paths),repoType, andgitInfoin the scan context. - Rebuild with
npm run buildand runharnix scan .— Harnix auto-discovers the new check from thechecks/directory. - Add tests in
tests/checks/my-check.test.tsusing Vitest and the test fixtures undertests/fixtures/.
See the Contributing page for code style and testing guidelines.
What repository types does Harnix detect?
Section titled “What repository types does Harnix detect?”Harnix classifies repositories as either software or non-software. Detection is automatic: if the repository contains files like package.json, Cargo.toml, go.mod, pyproject.toml, pom.xml, build.gradle, Makefile, or source directories (src/, lib/), it is classified as software. All other repositories default to non-software.
Three checks (ci-pipeline, testing-provision, repo-structure) only apply to software repositories and are automatically skipped for non-software repos. You can override detection with the --type flag or the type key in .harnix.yaml.
What output formats does Harnix produce?
Section titled “What output formats does Harnix produce?”Every scan generates three outputs:
- Console summary — printed to the terminal with per-check status symbols (
✓,△,✗), scores, and top recommendations. - Markdown report — a timestamped
.mdfile suitable for embedding in pull requests, issues, or documentation. - HTML report — a self-contained
.htmlfile with inline styles for browser viewing, no external dependencies required.
Report files are written to the repository root by default, or to a custom directory specified via --output or the output key in .harnix.yaml.