LintPal
Lint committed changes against the rules your team writes. Put requirements in Markdown files beside your code. LintPal checks changed lines in two Git revisions, reports findings with file and line anchors, and can fail CI when a finding reaches your severity gate.
Start
Install LintPal in your project, or use npx lintpal directly:
npm install --save-dev lintpal
mkdir -p .lintpal/rules/go
cat > .lintpal/rules/go/errors.md <<'RULE'
Handle errors returned by calls when failure can change the result or behavior.
RULE
export TYPESAFE_API_KEY='your-provider-key'
npx lintpal lint --base origin/main --head HEAD
Both revisions must be committed and available locally. LintPal reads rules
from the Git worktree root .lintpal/rules/, even when run from a subdirectory.
There are no built-in mandates. A missing or invalid rule directory stops the
run before any provider request. The selected provider receives bounded
committed source context and rule text; see privacy.
The command prints Markdown findings. The default gate fails with exit code
10 for a finding of high or critical severity, after writing the
complete output. Use --out .artifacts/lintpal/findings.json for a JSON
artifact, or --format json for JSON on stdout. See the CLI reference
for provider options, filters, and two-command CI feedback.
Stored findings can also be published to a GitHub pull request without another
model call. lintpal feedback github posts a deterministic blocking-status
result and inline rule findings; it does not generate a semantic code review or
change summary. See the CLI reference for flags and
the required pull-request permission.
Work with rules
Each .md file is one mandate; its path beneath .lintpal/rules/ is its ID.
Optional frontmatter sets title, severity, and threshold. Directory names
organize IDs; every rule applies to eligible changed lines on both sides of the
diff.
npx lintpal rule list
npx lintpal rule view go/errors.md
npx lintpal rule validate
npx lintpal rule import ./team-rules --prefix team
rule import copies validated Markdown into .lintpal/rules/, so the next lint
uses it automatically. Commit and review those files with your project. GitHub
imports can select a ref and subdirectory; rule import
explains the source syntax and collision handling. See rule authoring
for examples and per-run overrides.
Learn more
The commands above describe this source revision. Check releases for the features in a published npm version. LintPal is available under the MIT license.