Skip to content
azerv1Public

About

Are the CLIs OK? Check

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

clisok

Are the CLIs OK? check.

Check that all the CLIs on your system work: PATH entries, launchers and shims, DLLs and shared libraries, interpreters, and a headless test run of each tool that is safe to run. Runs on Windows and Linux.

clisok check            # check PATH entries and every tool on PATH
clisok check --output-format json  # same, as JSON on stdout
clisok check --registry --fix   # also apply safe fixes to the saved user PATH (Windows)
clisok list             # list every command and the copies it shadows; runs nothing
clisok rule list        # list every rule, its default severity and fix availability
clisok rule show CLI007 # explain a code

clisok check exits 0 when everything is fine, nonzero when it finds problems. Every problem has a stable code like CLI002.

What it checks

check examines PATH entries and the tools they expose, including launchers, shims, DLLs/shared libraries, interpreters, and Python modules. It statically inspects everything, then runs --version or --help only for eligible headless tools. Installers, GUI programs, plain scripts, app execution aliases, and OS-owned programs are not run.

On Windows, --registry also checks the saved user PATH and App Paths. On all platforms, --system includes OS-owned folders for static inspection. list shows commands and shadowed copies without running them. Options are command-line only; clisok does not read configuration files.

Output and exit status

check supports --output-format full (default), concise, json, github, csv, and sarif.

clisok check --output-format json > report.json
clisok check --output-format csv > findings.csv

Diagnostic codes

Each finding has a stable code. Run clisok rule list to see every rule, or clisok rule show CLI007 to read its severity, meaning, and repair guidance. --ignore CODE suppresses a finding code.

Repairs

Plain check only reports proposed repairs. --diff previews changes without applying them. --fix applies safe repairs; --unsafe-fixes allows UNSAFE repairs that may change command resolution or remove entries that could return. Windows repairs affect only saved user settings, back up the previous values under %LOCALAPPDATA%\clisok\backups\, and never change the system PATH. There are no repairs on Unix. Use --show-fixes to list applied changes.

GitHub Action

Use clisok after setup steps to check a runner's PATH. Pass the same CLI flags through args; --output-format github creates annotations.

- uses: azerv1/clisok@0.1.1
  with:
    args: check --skip some-noisy-tool

MCP server

clisok mcp serves the checks to AI clients over the Model Context Protocol (stdio). Release binaries include it; a source build needs --features mcp.

{
  "mcpServers": {
    "clisok": { "command": "clisok", "args": ["mcp"] }
  }
}

Tools: check (mode static by default; probe also test-runs tools), list, rules, and fix. fix only previews a diff unless the server is started with --allow-fix; unsafe fixes also need --allow-unsafe-fixes, and probes as root or elevated need --allow-root. The client cannot turn these on.

The server checks the PATH it was started with, which may differ from your shell's. On Windows, the registry option also checks the saved PATH.

Install

Download a binary from Releases: Windows x86_64 .zip, or a static Linux x86_64 .tar.gz.

Or build from a local clone with rustup, which fetches the pinned Rust 1.98.1:

git clone https://github.com/azerv1/clisok.git
cd clisok
cargo install --path . --locked

This puts clisok in ~/.cargo/bin. Add --features mcp for clisok mcp.

CI tests Windows Server 2025 and Ubuntu 24.04; other Windows/Linux versions are not exhaustively tested. macOS and FreeBSD remain on the roadmap. Report bugs and feature requests through GitHub issues.

Development

Rust 1.98.1 is pinned; CI also tests Rust 1.88 as the minimum supported compiler.

cargo fmt --all --check
cargo clippy --all-targets --locked -- -D warnings
cargo clippy --all-targets --locked --features mcp -- -D warnings
cargo test --locked
cargo test --locked --features mcp
cargo audit                    # cargo install cargo-audit@0.22.2
cargo audit --file fuzz/Cargo.lock
cargo doc --no-deps --locked
cargo package --locked --allow-dirty
uv sync --locked --group dev
uv run ruff check tools tests/release
uv run mypy tools tests/release
uv run pytest

License

Licensed under the GNU General Public License, version 3 or (at your option) any later version (GPL-3.0-or-later).

About

Are the CLIs OK? Check

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages