@axtary/cli
v0.1.0
Published
Axtary local CLI for deterministic proxy demos.
Maintainers
Readme
@axtary/cli
Axtary local CLI: the fail-closed runtime proxy, agent hooks, MCP wrapper, policy testing, and ledger tooling in one binary.
Early 0.x release: the runtime path is real and tested, but the API is not stable yet and may change between minor versions.
Quickstart
npm install -g @axtary/cli # or: npx @axtary/cli <command>
axtary init # scaffold a starter axtary.yml
axtary demo # run fake GitHub/Slack/Linear actions through the proxy + ledgerinit then demo reaches a first blocked action in under a minute with no credentials. The full rail — proxy, gating a real agent via the Claude Code hook or the MCP wrapper — is in docs/quickstart.md.
Commands
axtary init
axtary demo --config axtary.yml --json
axtary doctor connectors --config axtary.yml --json
axtary proxy --config axtary.yml
axtary smoke --config axtary.yml
axtary test-policy --config axtary.yml --fixtures examples/policy-fixtures
axtary run workflow github-pr-review --real --config examples/axtary.real.yml [--tamper]
axtary hook claude-code --proxy http://127.0.0.1:7331
axtary mcp serve --config axtary.yml [--wrap '<upstream mcp command>']
axtary export-ledger --format siem-jsonl
axtary sync-ledger --endpoint https://app.example/api/ledger/syncinitscaffolds a starteraxtary.ymland prints the quickstart rail (docs/quickstart.md).demoloads config, creates an ephemeral signing key, runs fake GitHub, Slack, Linear, and Jira actions through the proxy, writes the local JSONL ledger, and prints a structured result.doctor connectorsreports per-provider readiness — mode, missing env names, required scopes, smoke commands — without leaking secret values.proxystarts a long-running local HTTP enforcement point withGET /health,GET /state,POST /actions(authorize + execute), andPOST /authorize(decision, ActionPass, and ledger record without execution — the agent-hook path). It uses fake SaaS adapters by default and can route GitHub, Slack, Linear, AWS, GCP, and local docs actions when their adapter modes are enabled. File-backed configs are cached and policy is reloaded whenaxtary.ymlchanges.smokevalidates configured providers without writes: GitHub REST calls/user, Slack Web callsauth.test, Linear GraphQL queriesviewer, AWS calls STSGetCallerIdentity, GCP checks project access, and local docs checks configured roots.test-policyevaluates JSON fixtures against the loaded YAML policy and fails when an expected decision or reason differs.run workflow github-pr-review --realexecutes the design-partner workflow (Linear read → docs search → GitHub branch/file/PR → approved Slack post) through proxy-compatible wiring;--tampermutates the approved payload and proves the block (seedocs/sandbox-runbook.md).hook claude-codereads a Claude Code PreToolUse payload from stdin, normalizes file tools into content actions, and returns allow/ask/deny from the running proxy (seedocs/claude-code-hook.md).mcp serveruns a stdio MCP server whose wrapped tools are policy-gated at pinned definition hashes (seedocs/mcp-wrapper.md).export-ledger/sync-ledgerexport verified ledger records locally or upload them to the hosted control plane with signed sync tokens.
Real Provider Smoke Test
Set adapter modes and token environment variables in axtary.yml, then run:
GITHUB_TOKEN=... SLACK_BOT_TOKEN=... LINEAR_API_KEY=... \
AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... GCP_ACCESS_TOKEN=... \
axtary smoke --config axtary.ymlFake adapters are skipped. Missing token environment variables, provider auth failures, or missing local docs roots return a non-zero exit code.
Design Notes
The CLI currently proves the local product loop. Real provider modes are opt-in through config and read tokens from configured environment variables, so demos remain deterministic and do not accidentally touch production providers.
