Subscription token or API key
🧠 Claude
Ask Claude a question from a script or another agent, and get the answer back.
What you can do
- Ask Claude a question and print the answer
- Pipe input in, such as a diff or a log, and add it after your prompt
- Choose the model, a system prompt and the reasoning effort
- Print the answer as JSON, with the model, usage, cost and duration
Setup
agentio claude profile add
agentio offers to run claude setup-token, then asks for the token it shows. You can also paste an API key.
Good to know
- The
claudeCLI must be installed on the machine where the command runs. - A question runs as a plain question: no tools, no files, no project settings.
- With a subscription token, Claude Code adds your account email as context for the model.
- A token made by
claude setup-tokenlasts a year.
Command reference
-
agentio claude ask [prompt]Ask Claude and print the answer. A plain question: no tools, no files, no project settings. Piped stdin is added after the prompt, so a prompt, stdin, or both are needed. The claude CLI must be installed on this machine
--model <model>--system <text>--effort <level>--profile <name>--json