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.
Install
Section titled “Install”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:
npm install -g dexto@nextIf 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:
dexto whoami --jsonSuccess 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.
Install script
Section titled “Install script”Alternative to npm, for machines where a global npm install needs sudo:
curl -fsSL https://dexto.ai/install | sh -s -- --version nextOn Windows, in PowerShell:
$env:DEXTO_VERSION = 'next'; irm https://dexto.ai/install.ps1 | iexNode.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.
Installing from a script or an agent
Section titled “Installing from a script or an agent”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.
First steps
Section titled “First steps”dexto # chat with an agent in your terminaldexto run "summarize this repository"dexto login # sign in to Dextodexto whoami # who commands act as- Without signing in,
dextoruns 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 cloudanddexto workspacecommands. See Sign in.
Update and remove
Section titled “Update and remove”npm install -g dexto@next # update to the latest 2.0 betanpm uninstall -g dexto # remove the command; your agents and settings in ~/.dexto stayFor 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.
Where to go next
Section titled “Where to go next”- Sign in: browser, code, API keys, profiles, and what works signed out.
- The harness: models, skills, MCP, plugins, and
dexto run. - Output and exit codes: the JSON contract every command follows.
- Dexto CLI for agents: the short version for an agent.
- Command reference: every command and option, generated from the CLI itself.