DoubleX AgentesDocs

CLI › Commands

Chat

Call an AI model straight from the terminal, without an agent, with streaming or a full response.

doublex chat sends a message straight to a model, with no agent instructions, connectors or history. Use it for quick questions, to transform text in scripts, or to test a model.

Terminal
doublex chat "Explain what EBITDA is in two sentences" -m anthropic/claude-sonnet-5.5

Without -m, the CLI uses the default model: DoubleX Auto in organizations with platform credits, or the default model of your provider keys. See the available models with doublex models list.

Options#

OptionWhat it's for
-m, --model <provider/model>The model to use. openrouter/auto is DoubleX Auto.
-s, --system <text>System instruction. You can repeat it; the instructions are joined in order.
--message-stdin -Reads the message from stdin. With no message in the command and stdin redirected, the CLI also reads from stdin.
--max-tokens <n>Token limit for the response (up to 128,000).
--temperature <t>Temperature, from 0 to 2.
--stream / --no-streamForces a chunked or a full response. By default, it streams when the output is a terminal.
--args-file <file> / --args-json <json>Request body as JSON (for example, a history in messages). The message from the command is appended at the end.
--jsonReturns the full response (without streaming) or the NDJSON events (with --stream).

Examples#

Summarize a file:

Terminal
doublex chat -s "Summarize in short bullet points, in English" < ata-da-reuniao.txt

Use it in a script, with the full response as JSON:

Terminal
doublex chat "Classify the sentiment: 'Loved the service'" --no-stream --json | jq -r .text
JSON
{
  "provider": "openrouter",
  "model": "openrouter/auto",
  "text": "Positive",
  "usage": { "inputTokens": 21, "outputTokens": 3, "costUsd": 0.00002 },
  "servedModel": "google/gemini-3.8-flash"
}

servedModel shows the model that actually answered when you use DoubleX Auto.

Continue a conversation from a history:

Terminal
cat > historico.json <<'EOF'
{ "messages": [
  { "role": "user", "content": "My name is Ana." },
  { "role": "assistant", "content": "Nice to meet you, Ana!" }
] }
EOF
doublex chat "What is my name?" --args-file historico.json

Costs#

Each call consumes credits based on the model's cost, with the source Terminal (CLI) in the Usage and credits report. With no credits, the command fails with error 402.