Analyze CLI tools against clig.dev guidelines.
uv tool install cliqa
# or
pip install cliqaAnalyze any CLI command:
cliqa analyze ls
cliqa analyze git
cliqa analyze your-cli-toolRun specific checks:
cliqa check ls help
cliqa check git versionList all available checks:
cliqa list-checks- No mocking: Real integration tests with actual CLI commands
- 93% test coverage: Comprehensive test suite
- NASA05 compliance: Defensive assertions throughout
- clig.dev alignment: Checks against modern CLI best practices
Add to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/benomahony/cliqa
rev: v0.1.4
hooks:
- id: cliqa
args: [your-cli-tool]Analyze multiple commands:
repos:
- repo: https://github.com/benomahony/cliqa
rev: v0.1.1
hooks:
- id: cliqa
name: Check main CLI
args: [my-tool]
- id: cliqa
name: Check admin CLI
args: [my-admin-tool]Enable AI-powered analysis:
repos:
- repo: https://github.com/benomahony/cliqa
rev: v0.1.1
hooks:
- id: cliqa
args: [your-cli-tool, --ai]This will analyze your CLI tool before each commit and fail if any errors are found.
# Install dependencies
uv sync --extra test
# Run tests
uv run pytest
# Run pre-commit checks
pre-commit run --all-filesMIT