attentionfarm
v0.1.13
Published
AttentionFarm CLI launcher for Claude Code backup compute.
Readme
AttentionFarm CLI
AttentionFarm is currently scoped to Claude Code.
Install with curl, the primary path:
curl -fsSL https://api.attentionfarm.com/install.sh | bashRun Claude through the harness:
~/.attentionfarm/bin/af claudeTo spend already-earned AttentionFarm compute credits from the beginning of a fresh session, opt in explicitly:
~/.attentionfarm/bin/af claude --credits--credits is owned and consumed by af; it is never forwarded to Claude.
The launcher checks the installed key's balance, then scopes the AttentionFarm
gateway key and model to that Claude process. It does not add --continue; pass
Claude's own --continue or --resume flag yourself when resuming is intended.
If the balance is below the gateway's minimum, Claude is not started and the
launcher explains how to earn sponsor-funded credit in the terminal. Normal
~/.attentionfarm/bin/af claude remains normal-first, and plain claude remains completely unaffected.
Prefer npm directly?
npm i -g attentionfarm
ATTENTIONFARM_KEY=adsk_live_xxx af install
af claudeFor the curl installation, check the installed launcher and command surface by
its full path (the installer intentionally does not edit PATH or a shell
profile):
~/.attentionfarm/bin/af status
~/.attentionfarm/bin/af earn
~/.attentionfarm/bin/af resume
~/.attentionfarm/bin/af doctor
~/.attentionfarm/bin/af --help
~/.attentionfarm/bin/af --versionaf status reads the authenticated /v1/me account summary and prints the
available balance, minimum backup threshold, earning totals, daily usage, and
five most recent ledger entries. af earn lists the current terminal-native
earning options; use af earn x <post-url> to claim an X-post bonus or
af earn skill <campaign-id> to start a listed skill bounty. af resume
continues the latest Claude conversation on process-scoped AF credits. af
doctor compares the public launcher with the private installed harness and
reports their versions, protocol, capabilities, and compatibility without
printing the installed key.
/start is an install preflight, not a page that displays a key. The curl
installer asks for an email, waits for the 15-minute verification link, and
stores the resulting key under ~/.attentionfarm. If you already have an
adsk_ key from an operator or another supported flow, you can pass it directly:
ATTENTIONFARM_KEY=adsk_live_xxx bash -c "$(curl -fsSL https://api.attentionfarm.com/install.sh)"af claude starts the real Claude Code CLI on your own account first. AttentionFarm refill prompts live in Claude's startup announcement rotation, activity row, spinner tip line, turn-duration row, colored boxed status line, process-scoped Claude skill surface, and interactive terminal title cues, not in your project or ~/.claude settings.
The launcher fetches its help text, spinner verbs/tips, Claude skill copy, status-line copy, and terminal title copy from AttentionFarm's hosted content contract, then caches it in ~/.attentionfarm/cache/content.json. If the content endpoint is offline, the installed package falls back to the last cached copy, then to baked Claude-only defaults.
If Claude exits because quota, rate limits, or credits stopped the run, the installed harness uses a silent process-scoped Claude failure marker and automatically resumes the same conversation with AttentionFarm backup compute for that process only. Set ATTENTIONFARM_AUTO_RESUME=0 or pass --af-no-auto-resume to opt out. Authentication, model-routing, provider-server, overload, and other arbitrary failures are never auto-resumed.
While af claude is running, authenticated status-line telemetry can earn real backup-compute ledger credit from a viewable sponsor impression. The v1 rule requires a campaign-signed session start and at least two server-observed status-line renders spanning 45 seconds. Credit is passive, capped per user/day, unique per process and campaign/day, and atomically charged against sponsor budget; raw heartbeats alone never earn credit.
Interactive af claude runs add fixed terminal/window titles and terminal-native attention notifications on Claude Code v2.1.141 or newer while Claude is running, including AF Claude | normal-first | backup-ready and AF Claude | needs attention. They are skipped for -p / --print, ignored for TERM=dumb, disabled with ATTENTIONFARM_TERMINAL_SEQUENCE=0, and never include prompt text, paths, provider messages, or notification bodies. Set ATTENTIONFARM_TERMINAL_SEQUENCE=1 to force them in a non-TTY wrapper.
Interactive display footer:
af claudeThis adds a compact boxed AF footer to displayed assistant messages in the interactive TUI. It is fixed AF copy only, intentionally off for -p / --print so scripted output stays clean, can be disabled with ATTENTIONFARM_MESSAGE_DISPLAY=0, and can be forced in non-TTY wrappers with ATTENTIONFARM_MESSAGE_DISPLAY=1.
The package is Claude Code only for now. Future harness notes stay outside the package README until they are product-ready.
The package name is attentionfarm; the command it installs is af.
