CLI Reference
Evaluate actions, store facts, and manage your governance control plane from the terminal.
1Getting Started
Exogram's governance infrastructure is accessible via REST API. Use your preferred HTTP client — curl, Python requests, Node fetch, or any language with HTTP support.
REST API (All Platforms)
curl -H "X-API-Key: YOUR_KEY" https://api.exogram.ai/v2/health
MCP Server (Claude, Cursor)
Endpoint: https://api.exogram.ai/mcp
Python
pip install requests # Use the REST API
Node.js
fetch("https://api.exogram.ai/v2/health")All examples below use curl for simplicity. Replace with your preferred HTTP client. Prefer a GUI? Use the Dashboard Connectors page.
2Quick Start
3Command Reference
exogram auth loginAuthenticate with your Exogram account. Opens browser for OAuth or accepts an API key directly.
Usage
exogram auth login [--key sk_exo_...]
Options
--keyProvide API key directly instead of browser OAuth--profileSave credentials under a named profile (default: "default")Example
$ exogram auth login ✓ Browser opened. Waiting for authentication... ✓ Authenticated as richard[at]exogram.ai ✓ API key saved to ~/.exogram/credentials
exogram evaluateEvaluate a proposed action against your governance constraints. Returns PERMIT or DENY with a full rule trace.
Usage
exogram evaluate <payload.json> [--format json|table]
Options
<payload.json>Path to JSON file containing the action payload--stdinRead payload from stdin (pipe-friendly)--formatOutput format: json (default) or table--dry-runEvaluate without creating an evaluation recordExample
$ exogram evaluate payload.json --format table ┌──────────────────────────────────┐ │ Verdict: DENY │ │ Rule: compute_execution_guard│ │ Latency: 0.07ms │ │ Hash: sha256:a3f8... │ │ Eval ID: eval_abc123 │ └──────────────────────────────────┘
exogram commitCommit a previously evaluated action. Requires a valid evaluation ID that has not expired.
Usage
exogram commit <evaluation_id>
Options
<evaluation_id>The evaluation ID returned from `evaluate`--forceSkip confirmation promptExample
$ exogram commit eval_abc123 ✓ State hash verified (no drift detected) ✓ Action committed to immutable ledger Record: action_xyz789
exogram storeStore a verified fact in the semantic ledger with automatic PII scrubbing and conflict detection.
Usage
exogram store "<content>" [--source <source>] [--tags <tags>]
Options
"<content>"The fact or claim to store--sourceProvenance attribution (e.g., "planning-doc", "user-stated")--tagsComma-separated tags for categorization--confidenceConfidence score 0.0-1.0 (default: 0.9)--lockLock this fact (cannot be contradicted without explicit unlock)Example
$ exogram store "API rate limit is 300 RPM for Pro tier" --source docs --tags api,limits ✓ PII scan: clean ✓ Conflict check: no contradictions ✓ Stored: fact_def456 Vector: embedded in namespace user_abc
exogram searchSemantic search across your encrypted governance vault. Returns ranked facts by relevance.
Usage
exogram search "<query>" [--top-k <n>]
Options
"<query>"Natural language search query--top-kNumber of results to return (default: 5)--jsonOutput raw JSON instead of formatted tableExample
$ exogram search "rate limits" --top-k 3 ┌─────┬────────────────────────────────────┬───────────┬────────────┐ │ # │ Fact │ Score │ Stored │ ├─────┼────────────────────────────────────┼───────────┼────────────┤ │ 1 │ API rate limit is 300 RPM for Pro │ 0.94 │ 2h ago │ │ 2 │ Free tier limited to 5 RPS │ 0.87 │ 1d ago │ │ 3 │ Enterprise has no rate limits │ 0.81 │ 3d ago │ └─────┴────────────────────────────────────┴───────────┴────────────┘
exogram statusCheck connection status, API health, and current account tier.
Usage
exogram status
Example
$ exogram status Exogram CLI v1.2.0 API: https://api.exogram.ai ✓ healthy (0.07ms) Account: richard[at]exogram.ai Tier: Pro (50,000 evals/month) Used: 12,847 / 50,000 (25.7%) Profile: default
exogram ledger listList recent ledger entries with filtering and pagination.
Usage
exogram ledger list [--limit <n>] [--tag <tag>]
Options
--limitNumber of entries to show (default: 20)--tagFilter by tag--sinceShow entries after this date (ISO 8601)--jsonOutput raw JSONExample
$ exogram ledger list --limit 5 --tag api Showing 5 of 23 entries tagged "api" fact_def456 API rate limit is 300 RPM... 2h ago ● fact_ghi789 Webhook retry policy is 3x... 1d ago ● ...
exogram initInitialize Exogram in your project directory. Creates a .exogramrc config file.
Usage
exogram init [--ci]
Options
--ciGenerate CI/CD-optimized config (GitHub Actions, GitLab CI)Example
$ exogram init ✓ Created .exogramrc ✓ Added to .gitignore Configure your governance rules in .exogramrc
4Configuration (.exogramrc)
# .exogramrc — project-level Exogram configuration # Generated by `exogram init` [profile] api_key_env = "EXOGRAM_API_KEY" # Environment variable for API key base_url = "https://api.exogram.ai" # API base URL [defaults] format = "table" # Default output format (json|table) confidence = 0.9 # Default confidence for stored facts top_k = 5 # Default search results count [ci] fail_on_deny = true # Exit code 1 if evaluation returns DENY timeout = 5000 # Request timeout in ms retry = 3 # Number of retries on failure
5CI/CD Integration
GitHub Actions
# .github/workflows/governance.yml
name: Exogram Governance Check
on: [push, pull_request]
jobs:
evaluate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Evaluate deployment
env:
EXOGRAM_API_KEY: ${{ secrets.EXOGRAM_API_KEY }}
run: |
RESULT=$(curl -s -X POST https://api.exogram.ai/v2/evaluate \
-H "X-API-Key: $EXOGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d @deploy-payload.json)
echo "$RESULT" | jq .
if echo "$RESULT" | jq -e '.decision == "blocked"' > /dev/null; then
echo "❌ Governance check failed"
exit 1
fiGitLab CI
# .gitlab-ci.yml
governance-check:
image: curlimages/curl:latest
script:
- curl -sf -X POST https://api.exogram.ai/v2/evaluate
-H "X-API-Key: $EXOGRAM_API_KEY"
-H "Content-Type: application/json"
-d @deploy-payload.json
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"6Environment Variables
| Variable | Description | Default |
|---|---|---|
| EXOGRAM_API_KEY | API key for authentication | — |
| EXOGRAM_BASE_URL | API base URL | https://api.exogram.ai |
| EXOGRAM_PROFILE | Named credential profile | default |
| EXOGRAM_FORMAT | Default output format | json |
| EXOGRAM_TIMEOUT | Request timeout (ms) | 5000 |
| EXOGRAM_NO_COLOR | Disable colored output | false |
Ready to get started?
Install the CLI and evaluate your first action in under 2 minutes.