Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aethis.ai/llms.txt

Use this file to discover all available pages before exploring further.

Install

# Recommended — isolated, no venv juggling:
uv tool install aethis-cli

# Or, with pipx:
pipx install aethis-cli

# Or in a venv:
python -m venv .venv && source .venv/bin/activate
pip install aethis-cli

Evaluate immediately — no API key

Evaluate against any published ruleset. The Free School Meals rulesets from the worked example are live:
aethis decide \
  -b aethis/uk-fsm/child-eligibility \
  -i '{"child.age": 10, "child.school_type": "state_funded"}'
Decision:  eligible
Fields:    2 provided, 2 evaluated
aethis decide \
  -b aethis/uk-fsm/child-eligibility \
  -i '{"child.age": 10, "child.school_type": "independent"}' \
  --explain
Decision:  not_eligible

Explanation:
  school_type_check  FAIL — school_type must be state_funded (Regulation 3, Education Act 1996 s.512ZA)
# Inspect the fields a ruleset expects
aethis fields -b aethis/uk-fsm/child-eligibility
Fields for aethis/uk-fsm/child-eligibility

  child.age          Int     Age in whole years at start of academic year
  child.school_type  Enum    state_funded | independent | home_educated

Author your own rules

Private beta. Rule authoring is invite-only private beta — approval required. Decision tools work now with no sign-up. Join the authoring waitlist →
Bring your own key. Set ANTHROPIC_API_KEY in your environment before running aethis generate. The key is sent with the generation request only and is never stored.
# 1. Initialise a project (the wizard prompts for a name, runs sign-in, scaffolds)
mkdir my-rules && cd my-rules
aethis init
No separate sign-in step. aethis init runs the browser OAuth flow for you the first time, then scaffolds. Alternatively, run aethis login explicitly first — same result. As of v0.6.0, any authoring command (aethis generate, aethis publish, …) also prompts you to sign in inline if no key is cached, so the order doesn’t matter.For CI / scripted use, set an AETHIS_API_KEY env var or pass --no-prompt (combined with a missing key, this fails fast instead of hanging on a browser prompt).
Initialised project in /Users/you/my-rules/.aethis/
  aethis.yaml         project config
  sources/            put your policy documents here
  guidance/hints.yaml guidance hints (optional)
  tests/scenarios.yaml test cases
# 2. Add source documents
cp policy.pdf .aethis/sources/
# or .md, .txt — any text format

# 3. Write test cases (see format below)
# 4. Generate rules
aethis generate
Uploading sources...   ✓  1 document
Uploading guidance...  ✓  0 hints
Triggering generation...
Polling...  ████████████████████  done (87s)

Ruleset generated: income_eligibility:20260416-f3a1b2c3
# 5. Run tests
aethis test
Running 4 test cases against income_eligibility:20260416-f3a1b2c3

  PASS  Below threshold — eligible
  PASS  Above threshold — not eligible
  FAIL  Edge case — at exact threshold
        Expected: eligible   Got: not_eligible
        Hint: the threshold condition may be using strict < rather than ≤

1 failure. Run `aethis generate` after adding guidance.
# 6. Add guidance and regenerate
#    Edit .aethis/guidance/hints.yaml (see format below), then re-run generate:
aethis generate && aethis test
Ruleset generated: income_eligibility:20260416-g4b2c3d4
Running 4 test cases...  4/4 passing ✓
# 7. Publish
aethis publish
Published: income_eligibility:20260416-g4b2c3d4 (v2)
Tests:     4/4 passing
Previous:  income_eligibility:20260416-f3a1b2c3 → deprecated

Project structure

my-rules/
└── .aethis/
    ├── aethis.yaml          # project config
    ├── state.json           # tracked IDs — auto-updated, commit this
    ├── sources/             # policy documents (PDF, MD, TXT)
    ├── guidance/
    │   └── hints.yaml       # guidance hints
    └── tests/
        └── scenarios.yaml   # test cases

aethis.yaml

project: my-rules
api_key_env: AETHIS_API_KEY

guidance/hints.yaml

hints:
  - process_type: rule_generation
    guidance_text: >
      The £30,000 threshold is inclusive — an applicant with exactly £30,000
      annual income qualifies. Use ≤ not <.

  - process_type: field_extraction
    guidance_text: >
      All income fields represent annual gross income in whole pounds sterling.
      Do not use monthly or weekly figures.
process_type is either rule_generation (affects how rules are generated) or field_extraction (affects how fields are identified from source text).

tests/scenarios.yaml

tests:
  - name: "Below threshold — eligible"
    inputs:
      applicant.annual_income: 25000
    expect:
      outcome: eligible

  - name: "Above threshold — not eligible"
    inputs:
      applicant.annual_income: 35000
    expect:
      outcome: not_eligible

  - name: "Exactly at threshold — eligible"
    inputs:
      applicant.annual_income: 30000
    expect:
      outcome: eligible
Test coverage strategy: test boundaries (values just below, at, and above thresholds), every enum value, and any combination of fields that exercises a different code path. Five tests minimum — more is better.

Error scenarios

Generation fails immediately: Check that AETHIS_API_KEY is set and valid. Run aethis account keys to verify. Generation times out: The server continues after your client disconnects. Wait 10–15 minutes, then run aethis rulesets list to check if a ruleset appeared. If yes, run aethis test and aethis publish. Do not re-trigger generation — it creates a duplicate run. Tests fail on publish: aethis publish refuses if tests are failing. Fix with aethis generate (after adding guidance) or pass --force to override (not recommended for production). 422 Validation error on decide: Check that DATE fields are passed as integer ordinals, not ISO strings:
python3 -c "from datetime import date; print(date(2025,4,13).toordinal())"
# → 739354

Commands

Decision (no API key)

CommandDescription
aethis decide -b <ruleset_id> -i '<json>'Evaluate eligibility. Add --explain for trace output.
aethis fields -b <ruleset_id>Show input fields the ruleset expects
aethis explain -b <ruleset_id>Human-readable rule descriptions

Authoring

CommandDescription
aethis initInitialise a new project in the current directory
aethis generate [--poll]Upload sources + guidance, trigger generation
aethis statusShow CLI context (server, identity, project) and generation progress
aethis testRun test cases against the latest ruleset
aethis publish [--force]Set the latest ruleset as active

Guidance (project-level)

Project guidance is authored in .aethis/guidance/hints.yaml and uploaded by aethis generate. These commands manage hints server-side after upload.
CommandDescription
aethis guidance listList active hints for the current project
aethis guidance export <file>Export the current project’s hints to YAML
aethis guidance import <file>Import hints from a YAML file
aethis guidance deactivate <hint_id>Deactivate a specific hint

Projects & rulesets

CommandDescription
aethis projects listList your projects
aethis projects show <project_id>Show project details
aethis projects archive <project_id>Archive a project
aethis rulesets listList published rulesets
aethis rulesets archive <ruleset_id>Archive a ruleset

Account

CommandDescription
aethis loginSign in and store an API key locally — first-time setup, this is all you need
aethis account generateMint an additional API key (rotation, multi-machine, scoped access)
aethis account keysList your API keys (masked)
aethis account revoke <key_id>Revoke a key

MCP server

Wire up the Aethis MCP server in Claude Code, Cursor, Claude Desktop, or Windsurf without hand-editing JSON.
CommandDescription
aethis mcp install --target <client>Install. Targets: claude-code, cursor, claude-desktop, windsurf, or all. Idempotent.
aethis mcp uninstall --target <client>Remove the aethis server entry, leaving any other configured servers in place

Environment variables

VariableRequiredDefault
AETHIS_API_KEYAuthoring only
ANTHROPIC_API_KEYWhen running aethis generate

Shell completions

aethis --install-completion zsh    # or bash, fish, powershell

Worked example

See UK Free School Meals — full three-section example with source documents, guidance hints, and test cases ready to run.