autark-cli
v0.1.5
Published
CLI for autark — hypothesis-driven product runbooks. Track products, hypotheses, runs, and actions from the terminal.
Downloads
546
Readme
autark-cli
CLI for autark — hypothesis-driven product runbooks.
A product has hypotheses. Each hypothesis has runs. Each run logs actions (emails sent, posts made, replies received). The dashboard shows it all.
Install
npm i -g autark-cliLogin
autark login send [email protected]
# check inbox
autark login verify [email protected] --code 123456Runbook use
Autark is ID-first. Use product list / context to discover IDs, then pass IDs for writes. slug/H01 remains a convenience alias.
autark product upsert --slug chrome-relay --name "Chrome Relay" --tagline "..."
autark product list # prints slug, visibility, id, name
autark context chrome-relay
autark hypothesis create --product-id <product_id> --md @./H01.md --code H01 --title "..."
autark run start --hypothesis-id <hypothesis_id>
autark log action --run-id <run_id> --channel github --title "..." --url https://github.com/...
autark run finish --run-id <run_id> --narrative @./narrative.mdMail use
autark mail covers the AgentMail surface Autark needs. It does not require a separate AgentMail CLI login.
autark mail setup --prefix laksh
autark mail send --run-id <run_id> \
--to [email protected] \
--subject "Subject" \
--text @./body.txt
autark mail reply --run-id <run_id> --message-id <message_id> --text @./reply.txt
autark mail threads --limit 20
autark mail thread <thread_id>
autark mail messages --limit 20
autark mail message <message_id>
autark mail raw <message_id>
autark mail attachment --message-id <message_id> --attachment-id <attachment_id> --out file.binMail sends/replies call AgentMail directly with the user's inbox-scoped key from ~/.autark/credentials.json, then log an Autark email action containing agentmail_thread_id and agentmail_inbox_id.
ENV
AUTARK_API_URL— override the default Worker URL (https://autark-api.kushalsokke.workers.dev)AGENTMAIL_API_URL— override AgentMail API baseAGENTMAIL_API_KEY,AGENTMAIL_EMAIL,AGENTMAIL_INBOX_ID— override local mail credentials for debugging
Architecture
The CLI is a thin HTTP client over a Cloudflare Worker that holds the InstantDB admin token. Magic-link auth via InstantDB. Token saved to ~/.autark/credentials.json after login.
The Worker uses the AgentMail org key only for provisioning and dashboard thread reads. Local mail send/reply uses the user's inbox-scoped key.
