Skip to main content

ragguard-cli

Check that your RAG index matches your source documents, from a terminal, a CI job or an AI assistant.

RAGGuard compares the files in Amazon S3 with your Qdrant or pgvector index, and optionally your ingestion pipeline's records, and finds what silently drifted: documents that were never embedded, stale embeddings after a document changed, two versions of a document answering at once, deleted documents that are still searchable, half-indexed documents, duplicate chunks, empty vectors and chunks tagged with the wrong tenant. It only reads your systems.

This package gives you:

  • the ragguard command, for people and CI jobs;
  • an MCP server (ragguard mcp), so Claude Code, Cursor, Claude Desktop, VS Code and other AI assistants can run the checks.

Install

pip install ragguard-cli

Or run it without installing, with uv: uvx ragguard-cli status.

Create an API key in RAGGuard on the Integrations page and set it:

export RAGGUARD_API_KEY=ragi_your_key_here
# export RAGGUARD_URL=https://your-own-ragguard.example.com   # only for a self-hosted server

The key can run audits and read results. It cannot read your connection settings or create other keys.

Use it

ragguard check --fail-on high    # run an audit and wait; exit code 1 if open issues are high or critical
ragguard status                  # the latest results, without running an audit
ragguard issues --severity high  # open issues, most severe first
ragguard issue ISSUE_ID          # one issue with its evidence and the recommended fix
ragguard document refund-policy.pdf
ragguard report > report.md

Add --json to check, status, issues, issue and document for machine-readable output. Exit codes: 0 fine, 1 open issues at or above --fail-on, 2 an error.

In CI

- run: pip install ragguard-cli
- run: ragguard check --fail-on high
  env:
    RAGGUARD_API_KEY: ${{ secrets.RAGGUARD_API_KEY }}

Connect your AI assistant (MCP)

Claude Code:

claude mcp add ragguard -e RAGGUARD_API_KEY=ragi_your_key_here -- ragguard mcp

Cursor, Claude Desktop and other MCP clients:

{
  "mcpServers": {
    "ragguard": {
      "command": "ragguard",
      "args": ["mcp"],
      "env": { "RAGGUARD_API_KEY": "ragi_your_key_here" }
    }
  }
}

Without installing anything first, use "command": "uvx" and "args": ["ragguard-cli", "mcp"] instead.

Tools: ragguard_status, ragguard_run_audit, ragguard_list_issues, ragguard_get_issue, ragguard_check_document, ragguard_report.

A rule for your assistant

Paste this into AGENTS.md, CLAUDE.md, .cursorrules or .github/copilot-instructions.md:

## RAG index integrity (RAGGuard)
- After changing ingestion, chunking or embedding code, or after a bulk re-index, run
  `ragguard check --fail-on high` (or the MCP tool `ragguard_run_audit`) and fix every open
  issue it reports before saying the work is done.
- Do not call an ingestion change finished while RAGGuard reports missing, stale, duplicate,
  half-indexed or wrong-tenant chunks.
- When a user reports a wrong or outdated answer, run `ragguard document <document-id>`
  before changing prompts or models: the index is often the cause.

Learn more

MIT licensed.

Metadata

Release files for ragguard-cli 0.1.0

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

Source distribution (sdist)

Source distribution for ragguard-cli 0.1.0
File Size Uploaded Provenance Actions
ragguard_cli-0.1.0.tar.gz 12.8 kB Without provenance Details for ragguard_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ragguard-cli 0.1.0
File Interpreter ABI Platform Actions
ragguard_cli-0.1.0-py3-none-any.whl Python 3 none any Details for ragguard_cli-0.1.0-py3-none-any.whl

Total release size: 25.7 kB

Release files / ragguard_cli-0.1.0.tar.gz

Download URL ragguard_cli-0.1.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6872ffb8519a8713d037ab087e508ef923403293f22f306d1cdcb4ace41b6814
BLAKE2b-256 checksum
How to use checksums
9d6d45297c7288ca9ecc9f6d9d401c671e19ba94ee28eb6c2965747f14c0a169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / ragguard_cli-0.1.0-py3-none-any.whl

Download URL ragguard_cli-0.1.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cef69105db4ff9dd27a7270700994e6bbf4ba5cc4cf294225b43e27390f81b9
BLAKE2b-256 checksum
How to use checksums
4c9874c6dbe16c8218c863595b2283210af6b2869fe70be5df44ca27e8fdb43a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for ragguard-cli 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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