Skip to content

Dexto CLI

Install the dexto command and use it from a terminal, a script, or an agent.

dexto is one command for two jobs: it runs an AI agent on your machine, and it works with your Dexto account from the terminal, including Dexto Cloud, your workspace, and your credits.

It is built for agents as much as for people. Account and Cloud commands print JSON when their output is not a terminal, reports failures as JSON, and exits with a code you can branch on. Agents that drive the CLI should start with Dexto CLI for agents.

Node.js 20, 22 or 24 works; 22 is recommended. Use npm. @next selects the Dexto 2.0 beta; @latest selects 1.x. Install once:

Terminal window
npm install -g dexto@next

If npm fails with EACCES, don’t use sudo; use the install script (installs under ~/.dexto, no admin).

dexto login --device prints a link and code on stderr, then waits for approval. Run it so you can read its output while it waits, and pass both to the person. Do not approve sign-in on their behalf. Check the first account result:

Terminal window
dexto whoami --json

Success is exit 0 with your account identity. Signed-out account commands exit 3 with needs_sign_in; for a headless machine, run dexto login --device and retry. Installation and dexto --version need no sign-in. Account and workspace requests do; model runs also need a configured model or credits. This check starts no model run.

Alternative to npm, for machines where a global npm install needs sudo:

Terminal window
curl -fsSL https://dexto.ai/install | sh -s -- --version next

On Windows, in PowerShell:

Terminal window
$env:DEXTO_VERSION = 'next'; irm https://dexto.ai/install.ps1 | iex

Node.js 20, 22 or 24 works; 22 is recommended. The installer needs npm and no admin rights. It downloads the release from npm, checks it against the registry’s checksum, and installs it under ~/.dexto/cli. It links dexto into ~/.local/bin (or --install-dir, or DEXTO_INSTALL_DIR) and edits no shell files; if that folder is not on your PATH, it prints the line to add. On Windows it writes %USERPROFILE%\.dexto\bin and adds that folder to your user PATH.

To pin a version, pass an exact one, such as --version 2.0.0, or set DEXTO_VERSION=2.0.0.

The script defaults to latest for existing 1.x upgrades. Always select next for 2.0. After adding the printed bin directory to PATH, run dexto login --device, then dexto whoami --json.

The installer never prompts and never reads credentials. --yes, --non-interactive and --json are accepted and do nothing, because it already behaves that way. --dry-run says what would change without changing it. Progress goes to stderr, and the last line on stdout is always one JSON object:

{
"installed": {
"action": "installed",
"version": "2.0.0",
"previous_version": null,
"path": "/home/me/.local/bin/dexto",
"on_path": true,
"shadowed_by": null,
"dry_run": false
}
}

Running it again with the same version does nothing and reports "action":"unchanged"; --force reinstalls. A failure prints {"error":{"code","message","fix"}} and exits with the CLI’s exit codes: 2 for invalid input, 5 when no release matches the version, and 1 for everything else, such as a missing or old Node.js, an unreachable registry, or a failed checksum. A failed install leaves the current one alone.

Terminal window
dexto # chat with an agent in your terminal
dexto run "summarize this repository"
dexto login # sign in to Dexto
dexto whoami # who commands act as
  • Without signing in, dexto runs agents with your own model provider keys. See the harness.
  • Signed in, you also get Dexto models billed to your credits, the Dexto MCP in every session, and the dexto cloud and dexto workspace commands. See Sign in.
Terminal window
npm install -g dexto@next # update to the latest 2.0 beta
npm uninstall -g dexto # remove the command; your agents and settings in ~/.dexto stay

For script installs, use dexto upgrade next to stay on the beta channel and dexto uninstall to remove the installed command. For npm installs, use the npm commands above.

Coming from 1.x? Read Upgrading from 1.x.