Skip to content

Sign in

Sign the Dexto CLI in with a browser, a code on any device, or an API key, and switch between accounts and organizations.

dexto login signs you in as yourself. After that, commands act as you: in your organization, and in the Cloud project you chose.

Terminal window
dexto login

The CLI opens your browser, you approve, and it saves the sign-in on this machine. A first sign-in only reads your workspace and Cloud. Ask for more permission with --scope:

Terminal window
dexto login --scope drive:write

Signing in again keeps the permissions you granted before. When a command needs a permission you have not granted, it exits 3 and prints the dexto login --scope … command that fixes it.

Use a code when you are on SSH, in a sandbox, or on any machine without a browser. The CLI chooses this by itself when it cannot open a browser, or you can ask for it:

Terminal window
dexto login --device

It prints a link and a code to stderr, then waits:

To sign in, open this link on any device and check it shows ABCD-EFGH:
https://app.dexto.ai/auth/device?user_code=ABCD-EFGH
Only approve this if you just ran dexto login.

Open the link on any device where you are signed in to Dexto, check the code matches, and approve. When you do, the command finishes and prints one JSON result on stdout:

{
"profile": "default",
"current": true,
"account": { "email": "ada@example.com" },
"organization": { "name": "Acme" },
"cloud_project": { "id": "…", "name": "Default" },
"scopes": ["…"]
}

--no-browser is for a machine that has a browser but where you want the link printed instead of opened.

For CI and deployed code, use a developer key from your Cloud project. A key acts only in its own Cloud project; it is not a person and cannot use your workspace.

Terminal window
# For one command or one shell
export DEXTO_API_KEY=…
dexto cloud agents list
# Or save it as a profile
dexto login --api-key "$KEY"

--api-key <key> also works on any command that takes the shared options. A key Dexto refuses fails with exit 3. The environment variable and the flag take precedence over a saved sign-in.

A sign-in is one account in one organization. Each is saved as a profile in ~/.dexto/accounts/.

Terminal window
dexto login --org acme # sign in for an organization; it becomes your current profile
dexto accounts list # saved sign-ins; * marks the one in use
dexto accounts use acme # use this one from now on
dexto --profile personal whoami # use another one for one command (or set DEXTO_PROFILE)
dexto accounts remove acme --yes

dexto whoami shows who commands act as. It prints "as": "person" for a sign-in and "as": "api_key" (with the key masked) for a key.

Dexto models and dexto cloud commands bill and act in one Cloud project. Login picks your organization’s default. Change it for good, or for one command:

Terminal window
dexto cloud projects list
dexto cloud projects use <project>
dexto cloud agents list --project <project> # or set DEXTO_CLOUD_PROJECT
VariableUse
DEXTO_API_KEYA developer key to use instead of a saved sign-in
DEXTO_PROFILEThe saved sign-in to use
DEXTO_CLOUD_PROJECTThe Cloud project to act in
DEXTO_API_BASE_URLThe API origin; the default is https://api.dexto.ai
Terminal window
dexto logout

This ends the sign-in on the server and forgets it on this machine, so a copy of its tokens stops working. It prints {"profile": "default", "logged_out": true}. If the server cannot be reached, the sign-in is still forgotten here, and the CLI says where to end it instead: Settings → Sign-ins in the Dexto dashboard.

Chats and Loops the CLI started keep running after dexto logout, and it no longer appears in Settings → Sign-ins. To stop them as well, sign the CLI out in Settings → Sign-ins instead of running dexto logout: that stops the chats it’s running and pauses its Loops.

Signed out, you can still run agents on your own model provider keys. Everything that talks to Dexto exits 3 with needs_sign_in if it has no sign-in. An API key covers the middle column. The right column acts as you, so it needs your own sign-in and refuses an API key:

Works signed outNeeds a sign-in or API keyNeeds your sign-in
dexto, dexto run, dexto chat, dexto searchDexto models (dexto/<model>), dexto models listdexto workspace, dexto find
dexto agents, dexto plugin, dexto mcp, dexto initdexto billing, dexto whoamidexto chat start, dexto projects
dexto accounts list, dexto login, dexto logoutdexto cloud …dexto publish, dexto profile
dexto skills push
{
"error": {
"code": "needs_sign_in",
"message": "Not signed in. Sign in, or set DEXTO_API_KEY to a developer key from your Cloud project.",
"fix": "dexto login --device"
}
}

The fix field is the command to run next.

A saved 1.x API key and a dexto-cloud sign-in carry over the first time you run 2.0. dexto auth login|logout|status are gone; use dexto login, dexto logout and dexto whoami.