Skip to main content

ant — the Antaḥkaraṇa governed-AI operator CLI: prompt your on-box copilot to investigate/operate a machine, read-only by default, with y/N approval for changes and catastrophic commands hard-blocked.

Project description

ant — Antaḥkaraṇa governed-AI operator CLI

Author — Deepak Soni. A tiny, dependency-free, cross-platform CLI (Windows / macOS / Linux) that prompts your on-box copilot (the Antaḥkaraṇa model + control ring) from any terminal — Claude-Code style. It investigates a machine, reasons, runs read-only commands immediately, and asks y/N before any state-changing action; catastrophic commands (rm/dd/mkfs/reboot/…) are hard-blocked server-side.

PyPI: https://pypi.org/project/antahkarana-cli/ · command: ant

Install

pip install antahkarana-cli          # or: pipx install antahkarana-cli

First run

ant connect http://YOUR-BOX:8090     # point it at your copilot (saved to ~/.ant/config.json)
ant login dk-xxxxxxxx                 # the copilot requires an API key (dk- prefix); ant refuses without one
ant                                   # interactive session: banner + prompt
ant "what is listening on this server?"   # one-shot
ant status                            # connection + model health

Commands

ant                         interactive REPL
ant "<prompt>"              one-shot
ant connect <url>           save the copilot endpoint
ant login <dk-key>          save an auth token (sent as Bearer)
ant logout                  remove the saved key
ant status                  connection + model health
ant new | ant forget        archive / clear conversation memory
ant audit verify <file>     verify a hash-chained audit bundle LOCALLY (offline governance)
ant version

In the REPL, slash commands: /connect /login /logout /model /status /save [path] /new /sessions /resume <id> /forget /audit verify <file> /version /help /exit.

Governance: verify an audit bundle offline

A governed copilot (antahkarana 4.0 platform) can export a signed, hash-chained audit bundle. ant audit verify <bundle.json> recomputes the whole chain on your machine — no trust in the box that produced it, no dependencies — and if a record was altered it tells you the exact index where the chain breaks (exit code 1, so it drops straight into CI):

ant audit verify audit-bundle.json
#  ✓ audit chain intact — 128 record(s), hashes verify end-to-end
#  ✗ audit chain BROKEN at record index 41   (tamper localized)

Governance: run the non-bypass proof offline

A governed copilot (antahkarana 5.0 self-governing) ships a machine-checked guarantee that no action reaches a sink without a capability token minted by the control ring. ant verify runs that proof on your machine — a zero-dependency, stdlib-only copy of the checker, so you don't trust the box's word for it. It exhaustively checks the non-bypass invariants over the whole governance skeleton; --teeth also fails three deliberately-broken models (a checker that can't fail proves nothing):

ant verify --teeth
#  ✓ INV-1/4/5 hold over all 291 reachable states
#  checker teeth (each broken model MUST fail):
#    INV-1 bypass          INV-1 violated - counterexample in 4 step(s)
#    INV-4 ignore-control  INV-4 violated - counterexample in 8 step(s)
#    INV-5 token-reuse     INV-5 violated - counterexample in 5 step(s)

This is behaviorally identical to the SDK's atk verify and antahkarana.formal.check() — same 291 states, same counterexamples — just with no dependency on the SDK.

What you can ask

  • what OS is this and what's listening on its ports? → runs read-only, reports
  • create a file /tmp/demo.txt → proposes it, asks [y/N], runs only if you approve
  • rm -rf /tmp/xhard-blocked by the control ring
  • assess example.com → passive web-recon → prioritized report
  • summarize this file /path/to/notes.mdreads a LOCAL file on your machine
  • write the summary to a file ~/Desktopsaves LOCALLY as plain text, prints the path

Features (0.6.0)

  • Offline non-bypass proofant verify [--teeth] runs the machine-checked non-bypass invariant locally (zero-dependency, stdlib only); exhaustive over 291 reachable states, and --teeth fails three broken models. Behaviorally identical to the SDK's atk verify.
  • Offline audit verificationant audit verify checks a hash-chained audit bundle locally, zero-dependency, and localizes any tamper to the exact record index (matches the box's own verifier).
  • Multi-tenant aware status — shows tenant/tier and governed-fleet size when the box reports them.
  • API-key auth — refuses with "API key required" unless a dk- key is set.
  • Live progress — a "thinking…/running " spinner while the agent works (TTY only).
  • Memory across runs — your conversation persists in ~/.ant/session.json, so ant remembers what you did; /new archives and starts fresh, /sessions + /resume revisit past ones, /forget clears.
  • Local file read — paths you mention are read on YOUR machine and inlined for the copilot.
  • Local file write — when you ask it to save/write, the reply is written locally as clean text (not markdown); give a folder/path or it defaults to ./ant-output-<time>.txt, and the path is printed.

How it works

ant is a thin client over the copilot's /api/chat — the model (e.g. Qwen2.5-14B), the governed run_shell, the web-recon tools, and the control ring all live on the box (or a remote SSH target the copilot is pointed at). The box governs and audits every command; local file read/write happens on your own machine by the CLI.

Requires a running Antaḥkaraṇa copilot (see ../copilot/).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antahkarana_cli-0.8.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antahkarana_cli-0.8.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file antahkarana_cli-0.8.0.tar.gz.

File metadata

  • Download URL: antahkarana_cli-0.8.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for antahkarana_cli-0.8.0.tar.gz
Algorithm Hash digest
SHA256 47e00ea26acec867b05d0cf66d6a98869caa73a6c193d96de327130f4a2bbb1b
MD5 0dc92ab1d3d29e65e71a75e5d1c7b6b0
BLAKE2b-256 40ba1fbe839daa52230df25b3704237cb2cc34fbdb10fee5be7639377d054200

See more details on using hashes here.

File details

Details for the file antahkarana_cli-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for antahkarana_cli-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c07ed96626410f59d65b2874e667a6be73efde73a7d391bc3df25de06303ccb9
MD5 be0d22334e70a56650cce4a92adb7d99
BLAKE2b-256 78e855470dd65d4d52e5042f5aac70d0bc7feb27e83213853714c09f44f15150

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page