Skip to main content

haluguard CLI

PyPI version License

Verify LLM output for hallucinations directly from your terminal or CI/CD pipeline. Plugs into the haluguard hosted API.

Install

pip install haluguard

Zero runtime dependencies — pure stdlib, installs in seconds.

Quick start

# 1. Save your API token (get one at haluguard.com)
haluguard auth login

# 2. Verify a file
haluguard check report.md

# 3. Or pipe input
echo "Microsoft was founded in 1981 by Bill Gates." | haluguard check

# JSON output for scripts / CI
haluguard check report.md --json | jq .

# Exit non-zero only above a confidence threshold (useful in CI)
haluguard check report.md --threshold 0.7

Output

Human-readable by default:

✗ HALLUCINATIONS    severity=clear  score=0.95  claims=1/2  latency=4ms
verdict source: data_contradicted

  [CONTRADICTED] high · wikidata
    claim:    Microsoft was founded in 1981
    evidence: Wikidata confirms Microsoft was founded in 1975
    source:   https://www.wikidata.org/wiki/Q2283
    fix:      1975

--json returns the raw API response (verdict, severity_tier, score, findings, etc).

Exit codes

Code Meaning
0 Clean / no hallucinations above threshold
1 Hallucinations detected
2 Transient API error (rate-limited, 5xx, network)
3 Auth error (no token / invalid token)
4 Bad input / usage

CI/CD example — GitHub Actions

- name: Verify generated docs
  env:
    HALUGUARD_TOKEN: ${{ secrets.HALUGUARD_TOKEN }}
  run: |
    pip install haluguard
    haluguard check generated/release-notes.md --threshold 0.7

For a dedicated GitHub Action with richer output, see haluguard-action.

Env vars

Var Default Purpose
HALUGUARD_TOKEN (required) Bearer token. Used in CI. Overrides ~/.haluguard/config.json.
HALUGUARD_API_URL https://api.haluguard.com Override for self-host / dev.
NO_COLOR unset Disable ANSI colors.

License

MIT (the CLI itself). The hosted API behind it is a paid subscription service — see haluguard.com.

Metadata

Release files for haluguard 0.5.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 haluguard 0.5.3
File Size Uploaded Provenance Actions
haluguard-0.5.3.tar.gz 22.9 kB Without provenance Details for haluguard-0.5.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for haluguard 0.5.3
File Interpreter ABI Platform Actions
haluguard-0.5.3-py3-none-any.whl Python 3 none any Details for haluguard-0.5.3-py3-none-any.whl

Total release size: 47.1 kB

Release files / haluguard-0.5.3.tar.gz

Download URL haluguard-0.5.3.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
63ec78cf05ce3c8887f1561dd4cb86465383c2c4acb38d87d8bffe45863abe7c
BLAKE2b-256 checksum
How to use checksums
79001a1635b0c895e0d24409a594bced0a2c0cbe2916839fa39ac3e287ba2728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Release files / haluguard-0.5.3-py3-none-any.whl

Download URL haluguard-0.5.3-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5452c04c34210e6179001d81b3d77cadbc63908e5f5055043fd3a5d6e777c59c
BLAKE2b-256 checksum
How to use checksums
2aab3bdd5748e3daba2eacca8a0eef4122a7c9434e911e8f581da2c66d7b259a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Security for haluguard 0.5.3

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.

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