CLI › DoubleX in the terminal
Overview
Use agents, conversations, models, connectors, the Brain, skills, creations and triggers straight from the shell.
doublex is the DoubleX Agentes command line. You sign in once and, from then on, you talk to agents, call models, use connector tools, feed the Brain and manage skills and triggers from the terminal. Every command has a --json option, so you can pipe the result into scripts, cron jobs or any other tool.
Installation#
curl -fsSL https://doublex.ai/cli/install.sh | shThe installer:
- checks that Node.js 18 or newer is installed (the CLI is a single JavaScript file with no dependencies);
- puts the command in
~/.doublex/binand creates the shortcut~/.local/bin/doublex, withoutsudo; - saves this app's address as the default in
~/.config/doublex/config.json. Installing again from another address replaces the default, and so doesdoublex login --base-url.
Check the installation and keep the CLI up to date:
doublex --version
doublex update # downloads the latest version from this server| Installer variable | Default | What it's for |
|---|---|---|
DOUBLEX_HOME | ~/.doublex | Installation folder |
DOUBLEX_BIN_DIR | ~/.local/bin | Where the doublex shortcut goes |
Supported systems#
The CLI runs on macOS and Linux. On Windows, use WSL and install it inside the Linux distribution.
The key lives in the system keychain: on macOS, the Keychain, which comes preinstalled; on Linux, the Secret Service, through the secret-tool command:
sudo apt install libsecret-tools gnome-keyring # Debian and Ubuntu
sudo dnf install libsecret gnome-keyring # FedoraOn servers and containers without a keychain, don't use doublex login: pass the key through the DOUBLEX_API_KEY variable (see Authentication).
Sign in#
doublex loginThe browser opens the app's authorization page. Click Allow and go back to the terminal. The details, including how to sign in on a remote server, are in Authentication.
First command#
doublex agents listPick an agent and talk to it:
doublex sessions create agt_8f3a2b1c9d0e --input "What meetings do I have tomorrow?"Every command follows the format doublex <group> <action>. Use --help on any group to see its options:
doublex triggers --helpCommands#
| Command | What it does |
|---|---|
doublex login / logout / whoami | Signs in, signs out and shows who's signed in. |
doublex agents | Lists, shows, creates, edits and deletes agents. |
doublex sessions | Talks to agents: creates, continues, shows, cancels and deletes conversations. |
doublex chat | Calls a model directly, without an agent. |
doublex models / credits | Lists models and shows the credit balance and usage. |
doublex mcp | Lists connectors and their tools, and runs tools. |
doublex brain | Creates, edits, moves, searches, uploads and deletes Brain notes. |
doublex skills | Downloads and uploads skills as SKILL.md files. |
doublex artifacts | Lists and downloads the files agents created. |
doublex triggers | Creates and manages scheduled, one-time, webhook and app triggers. |
doublex teams | Lists teams and their IDs. |
doublex plugin | Teaches Claude Code and Codex to use the CLI. |
doublex update | Updates the CLI to the server's version. |
Global options#
| Option | Variable | What it's for |
|---|---|---|
--json | — | Output as JSON (or NDJSON, for streaming commands). Use it whenever another program will read the output. |
--base-url <url> | DOUBLEX_BASE_URL | The app's address. The default comes from the installer. |
-h, --help | — | Help for the group. |
-V, --version | — | CLI version. |
| — | DOUBLEX_API_KEY | API key. Takes priority over the key in the keychain. |
| — | DOUBLEX_LANG | CLI language: pt, en or es. Without it, the CLI follows LANG. |
The address is resolved in this order: --base-url, then DOUBLEX_BASE_URL, then the ~/.config/doublex/config.json file and, last, https://doublex.ai.
Input and output#
- Tables for people, JSON for programs. Without
--json, the CLI shows aligned tables and truncates long text. With--json, it shows everything. - Progress messages go to stderr. stdout holds only the result, so
doublex ... --json > saida.jsonwrites clean JSON. - Long text through stdin. Options that take text accept
-to read from stdin (--input -,--instructions -,--args -).
cat relatorio.md | doublex sessions create agt_8f3a2b1c9d0e --input -
doublex agents list --json | jq -r '.agents[] | select(.scope == "team") | .id'Exit codes#
| Code | Meaning |
|---|---|
0 | Success. |
1 | Error in the command or the request (missing option, item not found, no permission, invalid JSON). |
2 | No credentials: not signed in, invalid key, or no keychain on the system. |
3 | Couldn't reach the server, or the server responded with a 5xx error. |
130 | Interrupted with Ctrl+C. |
Use with coding agents#
Claude Code, Codex and Cursor can use the CLI for you. One command installs the instructions:
doublex plugin installSee Coding agents.