Skip to main content

Sanityops CLI

A command-line tool for static defect inspection of AI logical artifacts (System Prompts, Skills, Tool Schemas). Designed for local development and CI/CD integration.

Documentation | Report Bug | Request Feature

Features

  • Multi-level inspection depth — Choose between L1 (fast), L2 (standard), or L3 (deep) check levels
  • Multiple artifact types — Inspect System Prompts, Skills, and Tool Schemas
  • CI/CD ready — Designed for automated pipeline integration
  • Configurable rules — Customize inspection behavior via YAML configuration

Installation

macOS and Linux:

curl -fsSL https://downloads.sanityops.org/sanityops-cli/install.sh | bash

Windows PowerShell:

irm https://downloads.sanityops.org/sanityops-cli/install.ps1 | iex

For a reviewable PowerShell installation, download the script first:

irm https://downloads.sanityops.org/sanityops-cli/install.ps1 -OutFile install.ps1
Get-Content .\install.ps1
.\install.ps1

Both installers verify the downloaded binary against checksums.txt before installing. They default to user-writable locations (~/.local/bin on macOS/Linux and %USERPROFILE%\.sanityops\bin on Windows), then add the Windows directory to the user PATH if needed.

From PyPI

pip install sanityops-cli

From Source

git clone https://github.com/sanityops-org/sanityops-cli.git
cd sanityops-cli
pip install -e .

Quick Start

1. Initialize Configuration

sanityops-cli init

This creates .sanityops/inspect_config.yaml in your current directory with a freshly generated project UUID. The generated file matches the template below — edit the artifact paths to point at your prompts, tools, and skills.

2. Configure Artifacts

Edit .sanityops/inspect_config.yaml to specify your artifacts:

project:
  id: <your-project-id>          # required: UUID

# Optional: omit to use LLM_* environment variables
# model:
#   provider: anthropic
#   api_key: sk-ant-...
#   model_id: claude-sonnet-4-20250514
#   base_url: ""

prompts:
  - file: prompts/system_prompt.md

tools:
  - file: tools/search_tools.json

skills:
  - file: skills/code_review.md   # file only, not directories

3. Run Inspection

# Standard inspection (L2 depth)
sanityops-cli inspect

# Fast inspection (L1 depth)
sanityops-cli inspect --check-level L1

# Deep inspection (L3 depth)
sanityops-cli inspect --check-level L3

# Skip defect check, only analyze artifacts
sanityops-cli inspect --skip-defect-check

# Use custom config file
sanityops-cli inspect --config path/to/config.yaml

Check Levels

Level Description Use Case
L1 Fast Quick validation during development
L2 Standard Default, balanced depth for regular use
L3 Deep Comprehensive analysis for production releases

Documentation

Full documentation is available at sanityops.org.

Requirements

  • Python >= 3.11
  • OpenAI API key (or compatible LLM provider) for defect checking

Development

Setup

# Clone the repository
git clone https://github.com/sanityops-org/sanityops-cli.git
cd sanityops-cli

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install development dependencies
pip install -e ".[dev,test]"

Run Tests

pytest

Code Style

This project uses Ruff for linting. Run:

ruff check .

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Development setup
  • Code style guidelines
  • Pull request process
  • Commit message conventions

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

Built with Typer and Rich.

Release files for sanityops-cli 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sanityops-cli 0.1.3
File Size Uploaded
sanityops_cli-0.1.3.tar.gz 172.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sanityops-cli 0.1.3
File Interpreter ABI Platform
sanityops_cli-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 270.6 kB

Release files / sanityops_cli-0.1.3.tar.gz

Download URL sanityops_cli-0.1.3.tar.gz
Size 172.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0f1f16c8a4712f9696a4b229c98f0e85fd9da5447924655d298c1f5639940216
BLAKE2b-256 checksum
How to use checksums
f2c13d6307d323395995bd8498f03b65af662f90ba51397842a260cb7921cf7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / sanityops_cli-0.1.3-py3-none-any.whl

Download URL sanityops_cli-0.1.3-py3-none-any.whl
Size 98.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
beaa942f01e59350d47683b93600efe7d9357069b028b696052550f3b64ec7c2
BLAKE2b-256 checksum
How to use checksums
cc85a4888158e7a4de59c0ecbeaafef273194b40bc1d434dfb9ce6d1b0e552c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page