Installation
PromptLint is available through four distribution channels.
Python CLI (pip)
The Python package provides the most accurate token counting via tiktoken.
bash
pip install promptlint-cliRequirements: Python ≥ 3.9
Optional — exact token counts:
bash
pip install "promptlint-cli[tiktoken]"Without tiktoken, token counts fall back to a character-based heuristic (±15%).
Verify:
bash
promptlint --versionNode.js CLI (npm)
bash
npm install -g promptlint-cliRequirements: Node.js ≥ 16
The Node package uses a character-based token heuristic (chars ÷ 4, ±15%). For exact counts install the Python package.
Verify:
bash
promptlint --versionGitHub Action
No installation needed — reference the action directly in your workflow:
yaml
# .github/workflows/lint-prompts.yml
name: Lint Prompts
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: AryaanSheth/promptlint@v1
with:
path: prompts/
fail-level: warnSee the GitHub Actions integration guide for all options.
VS Code Extension
- Open VS Code
- Press
Ctrl+Shift+X(orCmd+Shift+Xon macOS) - Search "PromptLint"
- Click Install
The extension provides:
- Real-time linting as you type
- Quick-fix suggestions in the editor
- Status bar indicator
- Configuration panel
Upgrading
bash
pip install --upgrade promptlint-clibash
npm update -g promptlint-cliUninstalling
bash
pip uninstall promptlint-clibash
npm uninstall -g promptlint-cliVerifying Your Install
bash
# Check version
promptlint --version
# Run a quick sanity check
promptlint --text "Hello, world!"
# List all available rules
promptlint --list-rules