Plan and implement with anyr task

Run a two-phase pipeline from the terminal: one model plans, a second model executes the plan.

anyr task runs a request through two models in sequence: a planning model writes a numbered plan, then an implementation model executes it. Both phases stream to your terminal and a token summary prints at the end. A strong planner with a fast, cheap implementer keeps most of the quality at lower cost.

anyr task "refactor this CSV parser to stream instead of buffering" \
  --plan-model openai/gpt-5.2 \
  --do-model z-ai/glm-4.7-flash

By default both phases use your profile's default model. Any id from the catalog works (anyr models lists them).

Before running, the CLI shows both models with their per-token prices and asks for confirmation, since a task makes two model calls. Without a terminal (scripts, pipes, CI) pass --yes.

--json suppresses streaming and prints one object with task, plan_model, do_model, plan, result, and usage.plan / usage.implement (prompt and completion tokens):

anyr task "summarize RFC 8628 in five bullets" --yes --json | jq -r .result
FlagMeaning
--plan-model <id>Model for the planning phase (default: profile default model)
--do-model <id>Model for the implementation phase (default: profile default model)
--yesSkip the confirm prompt (required in non-interactive shells)
--jsonPrint {plan, result, usage} as JSON instead of streaming
--profile <name>Use a named profile
--key sk-ar-v1-...Use an explicit key (or the ANYROUTER_API_KEY environment variable)

Signed out? Run anyr auth login first (Login).

AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer