DoubleX AgentesDocs

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#

Terminal
curl -fsSL https://doublex.ai/cli/install.sh | sh

The 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/bin and creates the shortcut ~/.local/bin/doublex, without sudo;
  • saves this app's address as the default in ~/.config/doublex/config.json. Installing again from another address replaces the default, and so does doublex login --base-url.

Check the installation and keep the CLI up to date:

Terminal
doublex --version
doublex update        # downloads the latest version from this server
Installer variableDefaultWhat it's for
DOUBLEX_HOME~/.doublexInstallation folder
DOUBLEX_BIN_DIR~/.local/binWhere 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:

Terminal
sudo apt install libsecret-tools gnome-keyring   # Debian and Ubuntu
sudo dnf install libsecret gnome-keyring         # Fedora

On servers and containers without a keychain, don't use doublex login: pass the key through the DOUBLEX_API_KEY variable (see Authentication).

Sign in#

Terminal
doublex login

The 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#

Terminal
doublex agents list

Pick an agent and talk to it:

Terminal
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:

Terminal
doublex triggers --help

Commands#

CommandWhat it does
doublex login / logout / whoamiSigns in, signs out and shows who's signed in.
doublex agentsLists, shows, creates, edits and deletes agents.
doublex sessionsTalks to agents: creates, continues, shows, cancels and deletes conversations.
doublex chatCalls a model directly, without an agent.
doublex models / creditsLists models and shows the credit balance and usage.
doublex mcpLists connectors and their tools, and runs tools.
doublex brainCreates, edits, moves, searches, uploads and deletes Brain notes.
doublex skillsDownloads and uploads skills as SKILL.md files.
doublex artifactsLists and downloads the files agents created.
doublex triggersCreates and manages scheduled, one-time, webhook and app triggers.
doublex teamsLists teams and their IDs.
doublex pluginTeaches Claude Code and Codex to use the CLI.
doublex updateUpdates the CLI to the server's version.

Global options#

OptionVariableWhat 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_URLThe app's address. The default comes from the installer.
-h, --help—Help for the group.
-V, --version—CLI version.
—DOUBLEX_API_KEYAPI key. Takes priority over the key in the keychain.
—DOUBLEX_LANGCLI 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.json writes clean JSON.
  • Long text through stdin. Options that take text accept - to read from stdin (--input -, --instructions -, --args -).
Terminal
cat relatorio.md | doublex sessions create agt_8f3a2b1c9d0e --input -
doublex agents list --json | jq -r '.agents[] | select(.scope == "team") | .id'

Exit codes#

CodeMeaning
0Success.
1Error in the command or the request (missing option, item not found, no permission, invalid JSON).
2No credentials: not signed in, invalid key, or no keychain on the system.
3Couldn't reach the server, or the server responded with a 5xx error.
130Interrupted with Ctrl+C.

Use with coding agents#

Claude Code, Codex and Cursor can use the CLI for you. One command installs the instructions:

Terminal
doublex plugin install

See Coding agents.