Your AI subscriptions are idle 16 hours a day. atr turns them into a 24/7 dev team.
- Hand it a task (a prompt, plus a folder or repo if you like) and it runs it with Claude Code, Grok Build, Cursor, Codex, Gemini CLI or OpenCode.
- When one provider hits its usage limit, it moves on to the next one in your list. A run wall-clock cap is not a usage limit: a pinned provider stays put unless you allow overflow.
- Retries transient provider errors (overloaded, 429, 5xx) with backoff, waits on
after:task dependencies, and keeps new work queued when the host CPU or memory is busy. - Takes work from the terminal, GitHub issues, other agents (MCP), Telegram, HTTP or a drop folder.
- Shows what is running on a local dashboard, in the terminal or in Telegram.
- Keeps each provider's session and reuses that CLI's prompt cache. Cache hit % shows in
atr usage,atr status, the dashboard and the TUI; the dashboard also shows tokens saved. More.
atr never calls vendor APIs or handles your API keys. You sign in to each CLI yourself.
One line, on macOS (Apple Silicon) or Linux (x86_64 or arm64):
curl -fsSL https://raw.githubusercontent.com/rimusz/agent-task-runner/main/install.sh | shIt picks the right file for your machine, checks its checksum and puts atr in ~/.local/bin.
Or let your coding agent install and set it up (paste into Claude Code, Codex, Cursor or Grok)
Install atr (https://github.com/rimusz/agent-task-runner) on this machine.
Never print, log or paste any secret, token or API key. Never sign in to anything for me.
1. Install: curl -fsSL https://raw.githubusercontent.com/rimusz/agent-task-runner/main/install.sh | sh
Make sure ~/.local/bin is on PATH, then check: atr --version
2. Run: atr providers detect
For each CLI that is installed but signed out, tell me its login command and wait for me.
3. Check gh auth status. If not logged in, ask me to run gh auth login, then run gh auth setup-git.
4. Ask whether I want to answer the setup questions myself or take defaults, then run one of:
atr init
atr init --yes
5. Run atr service install. On headless Linux also: sudo loginctl enable-linger "$USER".
6. Ask which GitHub repos to watch and add each: atr repos add <owner/name> --path <clone>
7. Run atr doctor and report every warn or FAIL line with a suggested fix.
Full version, including MCP setup: docs/INSTALL.md.
Or download it yourself
Pick your platform: macos-arm64, linux-x86_64, linux-arm64 or linux-x86_64-musl (Alpine).
ver=$(curl -fsSL https://api.github.com/repos/rimusz/agent-task-runner/releases/latest | sed -n 's/.*"tag_name": *"v\{0,1\}\([^"]*\)".*/\1/p' | head -n1)
platform=macos-arm64
curl -fsSL "https://github.com/rimusz/agent-task-runner/releases/download/v$ver/atr-$ver-$platform.tar.gz" | tar -xz -C /tmp
mkdir -p ~/.local/bin && install -m 755 /tmp/atr ~/.local/bin/atrNo Intel Mac build: use cargo install --git https://github.com/rimusz/agent-task-runner.
Arch, Omarchy and Asahi notes: docs/INSTALL.md.
Later, atr upgrade updates it in place, refreshes the atr skill so it matches the new binary, and restarts the service (it does nothing if already on the latest release; --force reinstalls) (atr rollback undoes it and refreshes the skill from the restored binary). atr reset removes atr's service, config, data and skills to start fresh (see USAGE.md).
1. Sign in to your coding CLIs. Use the ones you have:
claude # Claude Code
grok # Grok Build
codex login # Codex
gemini # Gemini CLI (Login with Google), or set GEMINI_API_KEY
opencode auth login # OpenCode
# Cursor: sign in to the Cursor app (on a Mac, at the desktop, not over SSH)2. Give it GitHub access. You need a GitHub token: gh auth login, then gh auth setup-git. An SSH key is optional. Details: docs/GITHUB.md.
3. Set it up and start it.
atr init # asks a few questions; or: atr init --yes
atr service install # runs atr in the background (init usually does this)Or run atr / atr tui / atr ask on a TTY: if there is no config yet, atr offers this same atr init (including whether to install the user service) and then continues. Scripts should call atr init --yes first.
4. Check it.
atr doctor # shows anything that needs fixing
atr ui # opens the dashboard at http://127.0.0.1:7420/What that page shows: Dashboard.
Ask it to do something in a folder:
atr add "fix the spelling mistakes in README.md" --dir .
atr statusFinished sessions that can take a follow-up show as idle in atr status, atr tasks, and Telegram. The database and --json still store that state as waiting.
Or let it work on GitHub issues. Add the repo, then label an issue for:atr. atr does the work and opens a pull request:
atr repos add owner/my-repo --path ~/src/my-repo
gh issue edit 12 --add-label for:atrA bare atr (same as atr tui) opens a chat in your terminal. It behaves like the provider CLI (Claude Code, Grok Build, Cursor, Codex, Gemini CLI or OpenCode) with atr in the middle as a proxy: atr keeps the session, reuses the prompt cache and shows tokens and cache hit % under the input. atr never writes the replies itself.
atr # chat with no workspace (answer-only)
atr --repo . # work in the current directory's git repo
atr --repo demo # a repo from your config, by name or path
atr tui --dir ~/notes # edit a plain folder in place
atr ask "what is 2+2?" # one turn, print the answer, exit (scripts, CI)| In the chat | What it does |
|---|---|
/ |
Opens the atr command menu |
/provider, /model |
Pick the provider, or that provider's model, for this session |
/effort, /context |
Set reasoning effort or context size for the next turn, where that CLI has a flag for it |
/repo |
Switch workspace: a repo from your config, /repo . (current git repo) or /repo none |
/new, /status, /help |
Fresh session, session status, help |
/cli |
Open the provider's own TUI |
/quit or Ctrl+C |
Leave |
Any other /… line (for example /compact) goes to the provider as a turn. Press Enter while a turn is running and the line is queued; atr sends queued lines in order once the turn finishes. Full reference: docs/USAGE.md.
| Mode | Use it for | Start it |
|---|---|---|
| TUI only | Chatting with your CLIs on a laptop, no background service | atr |
| TUI + serve | A machine that runs background work and that you also chat on | atr service install, then atr |
| serve only | A headless runner (Mac Mini, Linux box, VM) | atr init --yes, atr service install |
TUI only. The TUI runs atr's engine in its own process, so atr serve is not needed. It only runs its own chat session. Nothing polls GitHub, Telegram or the inbox, the dashboard, HTTP API and MCP over HTTP are off, and tasks from atr add wait in the queue until serve runs. The first atr on a terminal offers atr init if there is no config yet.
TUI + serve. Serve runs as the user service and you open atr when you want to chat. The TUI does not connect to serve. Both read the same config file and state database (by default ~/.config/atr/config.toml and ~/.local/share/atr/state.db; pass the same --config or ATR_CONFIG to both if you use another one). So:
/repolists the repos in that config ([[repo]]orrepo_path, added withatr repos add) and the status line marks a picked repo(watched)when it is enabled there./reporereads the config each time you open it, and works whether or not serve is running.- TUI sessions are tasks named
cli-<name>. Serve never starts them, and the TUI only starts its own session, so they do not run the same task twice. Each process stamps its pid and start time on the runs it owns instate.db. Restarting serve (atr service restart,atr upgrade) leaves a live TUI turn alone; a run whose owner process is gone is still reaped. - Provider cooldowns and quota limits live in the shared database.
max_parallelis counted across every live owner (TUI turns use the same slots as serve). A TUI turn waits and the status line showsprovider at limitrather than going past the cap. - The status line under the input shows
· servewhen a live serve is registered instate.dbor the serve pidfile is still valid. The launchd/systemd user service check is a fallback.
serve only. atr serve (usually the user service) runs the scheduler, the HTTP API with the dashboard and MCP, and the GitHub, Telegram, inbox and shadow pollers. Nobody needs to be at the keyboard. On headless Linux, also run sudo loginctl enable-linger "$USER". The TUI cannot reach a serve on another machine; to chat with that machine's setup, SSH in and run atr there. See docs/USE-CASES.md and Sources.
atr ui opens this read-only page. atr serve (usually atr service install) serves it at http://127.0.0.1:7420/ by default.
It shows running, queued, and finished tasks, and usage: tokens, cost, and tokens saved from the prompt cache. A banner is red when a GitHub token is failing and amber when one expires within 14 days.
From another device on your tailnet, reach it with a Tailscale bind. See docs/REMOTE-ACCESS.md.
atr stores the session for Claude, Grok, Cursor, Codex and OpenCode and resumes it on the next turn. A resume sends only the new text, so the CLI can reuse its prompt cache. On the first turn, standing instructions go in that CLI's system-prompt slot (Claude, Grok, Codex and OpenCode). Cursor has no slot, so they are part of the prompt. A retry of a no-shell model, and a retry of a planning run, starts a fresh session.
atr usage and atr status print cache hit %. The dashboard shows that hit % and tokens saved (tokens read back from the cache). The TUI status line shows the last turn's cache hit %.
Settings: docs/CONFIG.md. How the prefix stays stable: docs/HOW-IT-WORKS.md.
A line that starts with / is a bot command (/add, /status, and the rest). Any other sentence, in an allowed private chat, is answered by a provider CLI when [telegram.assistant] enabled = true. That switch is off by default; with it off, the chat is told how to turn it on. Groups, supergroups and channels are ignored. The chat must be private, its id must be allowed (allowed_chat_ids, or the chat id file), and from.id must be in allowed_user_ids (or in the chat allowlist when that user list is empty).
The assistant answers questions about atr. It is told not to use a shell, edit files, or run git or gh, and it has no tools of its own. To change anything it proposes the same / commands. Queuing a task and other changes wait for Confirm. A plain answer does not. Typing the / command yourself skips the assistant and uses that same Confirm rule.
It does not use the driver. A turn uses this chat's /assistant provider, or @provider on that message. Otherwise it takes the first name in [telegram.assistant] providers that is enabled and not busy, cooling down, rate-limited or at quota. An empty list uses provider. An empty provider uses the first available provider in order. providers wins when both are set. The model is that provider's [[provider]] model. There is no assistant model key. A provider at its limit is skipped for the next name in providers. If every listed provider is only busy or cooling down, the turn waits. Each turn is capped by timeout (default 10 minutes).
Settings: docs/CONFIG.md. Provider choice: docs/CONFIG.md. From your phone: docs/USE-CASES.md.
- Background runner on your Mac: queue work and close the terminal. More
- Always-on Linux box or VM: runs around the clock. More
- GitHub issue worker: label an issue, get a pull request. More
- Mobile app proofs: prove a PR head with Maestro on an iOS simulator, an Android emulator or a cabled phone. More
- Backend for other agents: Claude, Codex, Cursor, Grok or Gemini hand work to atr over MCP. More
- Grok Bot operator: import the atr Operator bot template to queue work and watch atr from Grok Bot. A bot needs MCP over HTTP (Tailscale plus a token), not stdio.
- Inbox folder: scripts drop a task file and atr runs it. More
- Telegram: add tasks, check progress, or ask the assistant in an allowed private chat. Optional
[telegram] eventsfilter. More - Terminal TUI: chat with your coding CLIs in the terminal, with atr as the proxy. More
Claude Code, Grok Build, Cursor, Codex, Gemini CLI and OpenCode. OpenCode also opens the door to DeepSeek, Kimi, Qwen, local Ollama, self-hosted vLLM and more. See docs/USAGE.md.
Gemini CLI: npm install -g @google/gemini-cli or brew install gemini-cli, then sign in with gemini (Login with Google) or set GEMINI_API_KEY. Details: docs/INSTALL.md.
Each CLI gets atr's instructions in its own system-prompt slot. For Codex that is -c model_instructions_file, which replaces Codex's built-in base prompt with atr's (details in docs/CONFIG.md; see also Prompt caching). For Grok Build, --rules is the rules text: atr reads <worktree>/.atr/system.md and passes those bytes as the argument (Grok 1.0.89 has no rules-file flag).
atr can run worker tasks on a model on your own machine through OpenCode and Ollama. Tested setup: OpenCode 2.0.28, Ollama with qwen3-coder:30b (30B-A3B, 32k context), Apple M4 Pro with 48 GB.
ollama pull qwen3-coder:30b && ollama serve # http://127.0.0.1:11434
atr providers add ollama --model ollama/qwen3-coder:30b --url http://127.0.0.1:11434/v1
# also writes the provider into ~/.config/opencode/opencode.json
atr doctor # checks the CLI, the URL and the model- The model has no shell. Every OpenCode run gets an
OPENCODE_CONFIG_CONTENTdeny list, loaded last so it beats youropencode.json. It deniesshell,execute,subagent,question,webfetch,websearch,external_directoryandskill. The model only reads and edits files in its worktree.- atr runs your
[verify]commands, commits, pushes, opens the PR and posts comments itself. - Because the model can't run tests, it gets one extra verify follow-up (
[verify] no_shell_extra_retries). allow_shell = trueon the provider gives the shell back, but only for a model you trust.
- atr runs your
- Extra guards for no-shell models only. These don't apply to Claude, Codex, Cursor, Grok or Gemini:
- new scratch files and unrequested README/docs edits are dropped (
[scratch]); - an edit to the main checkout withholds the result;
atr retrystarts a fresh session.
- new scratch files and unrequested README/docs edits are dropped (
- Triage is suggest-only.
atr triage runstores a label and comment suggestion. Nothing is posted untilatr triage approve. - Hardware.
qwen3-coder:30bis an 18.6 GB download and needs about 20 GB of free RAM or VRAM with a 32k context, so 32 GB or more is comfortable. Give the model a context limit of at least 32k inopencode.json(provider.ollama.models.<id>.limit.context). atr runs one task at a time per Ollama model and keeps the model loaded (keepAlive24h). - Results so far. On the 10 sandbox issues the local model fixed 8 out of 10 at first, and 9 out of 10 after the follow-up hardening. The misses failed verify and were not delivered.
- Known limits.
- Small-model quality varies from run to run.
- Triage label accuracy is weak.
- The model sometimes still writes files during triage; they are dropped, never verified or posted.
- Docs revert only covers docs-style files.
Setup, config and safety details: docs/USAGE.md, docs/CONFIG.md.
Why Grok Build: it's the recommended main provider. atr uses it by default to plan and review, and it adds live progress on the dashboard and Telegram, per-run cost and token data, and session resume. Everything else works with any provider. See docs/USAGE.md.
| Page | What it covers |
|---|---|
| docs/INSTALL.md | Manual install, Arch/Asahi, full agent deploy prompt |
| docs/USE-CASES.md | Each use case with examples |
| docs/USAGE.md | Adding work, watching repos, Telegram (and the CLI equivalent of every Telegram command), dashboard, providers, upkeep, troubleshooting |
| docs/GITHUB.md | GitHub token, SSH, what needs what |
| docs/TROUBLESHOOTING.md | atr doctor checks, status, logs, service, GitHub token, Telegram, notify hook. Self-heal reaps orphans after serve died; killing a live agent while serve is up is failed, not a reap |
| docs/REMOTE-ACCESS.md | Dashboard and MCP from other devices over Tailscale |
| docs/CONFIG.md | Config file, paths, several repos, dashboard bind, choosing the driver provider and model |
| docs/HOW-IT-WORKS.md | How providers, MCP and CI fit together |
| docs/DESIGN.md | Internals, for people changing atr |
| docs/RELEASING.md | How to cut a release (on demand only) |
atr is not affiliated with or endorsed by Anthropic, xAI, Anysphere, OpenAI, Google or the OpenCode authors. Claude, Grok, Cursor, Codex, ChatGPT, Gemini and OpenCode are trademarks of their owners. Use atr with your own CLI accounts and follow each provider's terms. Do not resell access or share accounts.
Licensed under MIT OR Apache-2.0 (LICENSE-MIT, LICENSE-APACHE). Dependency licenses: THIRD_PARTY_LICENSES.
