Cline
Use Cline through AnyAgent: what you can ask for, how it behaves, and the flags underneath.
The cline adapter drives cline --json --auto-approve true, detected as the cline binary on PATH; import cline from anyagent/cline. The Cline CLI is Apache-2.0 open source and bring-your-own-key (BYOK): configure a provider once with cline auth -p openai -k your_api_key_here (openrouter, anthropic, openai, and gemini all work).
What you can ask for
model and effort (closed vocabulary: none, low, medium, high, xhigh) work on the CLI’s own flags; systemPrompt and schema are provided by AnyAgent. readOnly, resume, mcp, and model listing are undeclared and throw: no read-only run exists, since headless Cline auto-approves every tool and plan mode still runs shell commands. authStatus() reads the provider settings file and never runs the CLI, whose config subcommand needs a TTY. The full grid is on the support matrix.
Good to know
- No session id is revealed headless, so
result.sessionIdstays absent; carry context forward in the next prompt instead. - The prompt must be positional, so a prompt larger than the OS argv limit needs
agent.raw. systemPromptis provided by AnyAgent because Cline’s-sreplaces the system prompt entirely; reach-sviaextraArgsif replacement is what you want.- Usage arrives in the final
run_result, with cache line items and cost; afinishReasonother than"completed"throwsInvocationwith Cline’s own message.
Under the hood
Every run executes cline --json --auto-approve true with the prompt as a positional argument. Run options append flags:
| Option | Flag |
|---|---|
model | -m <model> |
effort | --thinking <level> |