Skip to content

benomahony/cliqa

Repository files navigation

cliqa

Analyze CLI tools against clig.dev guidelines.

Installation

uv tool install cliqa
# or
pip install cliqa

Usage

Analyze any CLI command:

cliqa analyze ls
cliqa analyze git
cliqa analyze your-cli-tool

Run specific checks:

cliqa check ls help
cliqa check git version

List all available checks:

cliqa list-checks

Features

  • 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

Pre-commit Hook

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.

Development

# Install dependencies
uv sync --extra test

# Run tests
uv run pytest

# Run pre-commit checks
pre-commit run --all-files

License

MIT

About

A CLI Linter that gives deterministic & AI suggestions to improve your CLI tool

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages