Skip to main content

CLI Overview

The Dexto CLI provides two ways to interact with AI agents:

ModeWhat It IsHow to Use
CLI ToolTerminal commands for managing agents, sessions, and configurationdexto agents install, dexto setup, dexto agents list
Interactive ModeChat session with slash commands for real-time control/model switch, /mcp add, /search

This guide covers the CLI Tool commands. For slash commands available during chat, see Interactive Commands.

What You Can Do

  • Talk to any LLM in your terminal or browser
  • Create long-lived AI agents with tools, knowledge, and memories
  • Turn any folder into a Dexto workspace with authored agents and skills
  • Deploy agents locally or on the cloud
  • Build custom integrations with Discord, Telegram, Slack, etc.
  • Scaffold new AI applications with dexto create-app

Main Command

Basic Usage

# Start interactive session (opens Web UI by default)
dexto

# Start interactive CLI mode
dexto --mode cli

# Run a single prompt (auto-uses CLI mode)
dexto "list files here"
dexto -p "create a snake game"

# Start as API server
dexto --mode server

# Run as MCP server
dexto --mode mcp
Mode Auto-Detection

dexto opens the Web UI by default. When you provide a prompt via -p or as a positional argument, Dexto automatically switches to CLI mode for one-shot execution.

Main Command Options

FlagDescriptionExample
-v, --versionShow versiondexto --version
-a, --agent <id|path>Use agent ID or path to config filedexto -a nano-banana-agent
-p, --prompt <text>Run single prompt and exitdexto -p "list files"
-m, --model <model>Specify LLM modeldexto -m gpt-5-mini
-c, --continueContinue most recent conversationdexto -c
-r, --resume <sessionId>Resume a specific session by IDdexto --resume my-session
--mode <mode>Run mode (web/cli/server/mcp, default: web)dexto --mode cli
--port <port>Server port (default: 3000 for web, 3001 for server mode)dexto --port 8080
--skip-setupSkip initial setup promptsdexto --skip-setup
-s, --strictRequire all MCP servers to connectdexto --strict
--no-verboseDisable verbose outputdexto --no-verbose
--no-interactiveDisable prompts/setupdexto --no-interactive
--no-auto-installDisable auto agent installdexto --no-auto-install
--auto-approveAuto-approve all tool executionsdexto --auto-approve

Note: The -a, --agent flag accepts both agent IDs from the registry and paths to agent config files. See the Agent Registry for available agents.

Subcommands

create-app - Scaffold New TypeScript App

Create a new Dexto TypeScript application from scratch.

dexto create-app

This command will:

  1. Create project structure
  2. Set up TypeScript configuration
  3. Prompt for LLM provider and API keys
  4. Install dependencies
  5. Generate example files

init - Initialize a Dexto Workspace

Turn the current folder into a Dexto workspace with visible authored folders for agents and skills.

# Initialize the current folder
dexto init

# Create a workspace agent (interactive if you omit the id)
dexto init agent
dexto init agent review-agent

# Create and auto-link a subagent to the current primary agent
dexto init agent explore-agent --subagent

# Set or change the workspace primary agent
dexto init primary review-agent

# Create a workspace skill
dexto init skill code-review

# Inspect the current workspace config and deploy preview
dexto init status

What dexto init creates:

  • AGENTS.md
  • agents/
  • skills/
  • skills/create-skill/ as a starter skill bundle for authoring more skills

What the follow-up commands do:

  • dexto init agent creates agents/<id>/<id>.yml
  • The first non-subagent agent becomes the workspace primary by default
  • dexto init agent --subagent creates a subagent and links it to the current primary agent when one exists
  • dexto init skill <id> creates skills/<id>/SKILL.md plus handlers/, scripts/, mcps/, and references/
  • dexto init status shows the current workspace structure, primary agent, skills, and what dexto deploy would use

init-app - Initialize Existing TypeScript App

Add Dexto to an existing TypeScript project.

dexto init-app

Requirements:

  • Must have package.json and tsconfig.json in current directory

setup - Configure Global Preferences

Configure global Dexto preferences including default LLM provider, model, and agent.

dexto setup
dexto setup --provider openai --model gpt-5-mini
dexto setup --force

Options:

  • --provider <provider> - LLM provider (openai, anthropic, google, groq, xai, cohere)
  • --model <model> - Model name (uses provider default if not specified)
  • --default-agent <agent> - Default agent name (default: coding-agent)
  • --force - Overwrite existing setup without confirmation
  • --no-interactive - Skip interactive prompts

See Global Preferences for detailed configuration guide.

deploy - Deploy the Current Workspace to Cloud

Deploy the current folder to a cloud sandbox and keep it linked to that deployment.

# First deploy from any folder
dexto deploy

# List cloud deployments on your account
dexto deploy list

# Open the linked deployment in the dashboard
dexto deploy open

# Inspect the linked deployment
dexto deploy status

# Stop the linked cloud sandbox
dexto deploy stop

# Delete the linked deployment and unlink this workspace
dexto deploy delete

How first-run deploy works:

  • Creates .dexto/deploy.json in the current workspace
  • Uses the primary workspace agent from agents/registry.json when the workspace defines one
  • Falls back to the default cloud agent when the workspace does not define a primary workspace agent
  • Uploads the workspace snapshot and links the current folder to the created cloud deployment

Authentication:

  • Authenticate with dexto login or set DEXTO_API_KEY

Generated deploy config:

Default cloud agent:

{
"version": 1,
"agent": {
"type": "cloud-default"
},
"exclude": [".git", "node_modules", "dist", ".next", ".turbo", ".env*"]
}

Workspace agent:

{
"version": 1,
"agent": {
"type": "workspace",
"path": "agents/review-agent/review-agent.yml"
},
"exclude": [".git", "node_modules", "dist", ".next", ".turbo", ".env*"]
}

Notes:

  • dexto deploy deploys the whole workspace, not just git-tracked files
  • dexto deploy status, open, stop, and delete work from the linked workspace folder
  • dexto deploy list shows account deployments and highlights the one linked to the current folder
  • Dashboard links are printed after deploy and status so you can inspect the cloud workspace directly

agents install - Install Agents

Install agents from the registry or custom YAML files/directories.

# Install single agent from registry
dexto agents install nano-banana-agent

# Install multiple agents
dexto agents install podcast-agent coding-agent database-agent

# Install all available agents
dexto agents install --all

# Install custom agent from file
dexto agents install ./my-agent.yml

# Install from directory (interactive)
dexto agents install ./my-agent-dir/

Options:

  • --all - Install all available agents from registry
  • --force - Force reinstall even if agent is already installed
  • --no-inject-preferences - Skip injecting global preferences into installed agents

See the Agent Registry for available agents.

agents uninstall - Uninstall Agents

Remove agents from your local installation.

# Uninstall single agent
dexto agents uninstall nano-banana-agent

# Uninstall multiple agents
dexto agents uninstall agent1 agent2

# Uninstall all agents
dexto agents uninstall --all

Options:

  • --all - Uninstall all installed agents
  • --force - Force uninstall even if agent is protected (e.g., coding-agent)

upgrade - Upgrade Dexto CLI

Upgrade the Dexto CLI itself. If an older npm global install is detected, this command migrates to native installer automatically.

# Upgrade to latest
dexto upgrade

# Upgrade to a specific version
dexto upgrade 1.6.8

Options:

  • --dry-run - Print install/migration commands without executing
  • --force - Force reinstall for native install target

uninstall - Uninstall Dexto CLI

Uninstall the Dexto CLI binary (agent removal is handled by dexto agents uninstall).

# Remove CLI binary only (keeps ~/.dexto)
dexto uninstall

# Preview changes
dexto uninstall --dry-run

# Also remove ~/.dexto completely
dexto uninstall --purge

Options:

  • --purge - Remove ~/.dexto completely
  • --dry-run - Show what would be removed

agents sync - Sync Agent Configs

Sync installed agents with bundled versions after Dexto updates.

# Check status and prompt for updates
dexto agents sync

# List what would change (dry run)
dexto agents sync --list

# Force update all without prompts
dexto agents sync --force

Options:

  • --list - Show status without making changes
  • --force - Update all agents without confirmation

When to use: When Dexto shows "Agent updates available" notification after an update, or when you want to reset agents to their default configurations.

agents list - List Available Agents

List agents from the registry and locally installed agents.

# List all agents (registry + installed)
dexto agents list

# Show only installed agents
dexto agents list --installed

# Show only registry agents
dexto agents list --available

# Show detailed information
dexto agents list --verbose

Options:

  • --verbose - Show detailed agent information
  • --installed - Show only installed agents
  • --available - Show only available agents from registry

See the Agent Registry for detailed agent information.

which - Show Agent Path

Display the path to a specific agent's configuration file.

dexto which nano-banana-agent
dexto which coding-agent

session - Manage Sessions

Manage conversation sessions.

session list

List all available sessions.

dexto session list

session history

Show message history for a session.

# Show history for current session
dexto session history

# Show history for specific session
dexto session history my-session-id

session delete

Delete a specific session.

dexto session delete old-session-id

search - Search Session History

Search across all conversation messages in session history.

# Search all sessions
dexto search "bug fix"

# Search in specific session
dexto search "error" --session my-session

# Filter by role
dexto search "help" --role assistant

# Limit results
dexto search "code" --limit 20

Options:

  • --session <sessionId> - Search in specific session only
  • --role <role> - Filter by role (user, assistant, system, tool)
  • --limit <number> - Limit number of results (default: 10)

mcp - MCP Server Mode

Start Dexto as an MCP server to aggregate and re-expose tools from configured MCP servers.

# Start MCP tool aggregation server
dexto mcp --group-servers

# Start in strict mode
dexto mcp --group-servers --strict

Options:

  • --group-servers - Aggregate and re-expose tools from configured MCP servers
  • -s, --strict - Require all MCP server connections to succeed
  • --name <name> - MCP server name (default: 'dexto-tools')
  • --version <version> - MCP server version (default: '1.0.0')

Note: In the future, dexto --mode mcp will be moved to this subcommand to expose the agent as an MCP server by default.


Common Usage Patterns

Quick Start

# Interactive session with default settings (opens Web UI)
dexto

# Interactive CLI mode
dexto --mode cli

# Use a specific agent (opens Web UI)
dexto --agent nano-banana-agent

# Start with a specific model (opens Web UI)
dexto -m claude-sonnet-4-5-20250929

One-Shot Prompts

# Run single task and exit (auto-uses CLI mode)
dexto "list all TypeScript files in src/"
dexto -p "create a README for this project"

# With auto-approve for automation
dexto --auto-approve "format all JavaScript files"

# With specific agent
dexto --agent coding-agent "create a landing page for my coffee shop"

# Combine agent, model, and auto-approve
dexto --agent coding-agent -m gpt-5 --auto-approve "build a todo app with React"

Session Continuation

# Continue most recent conversation (opens Web UI)
dexto --continue

# Continue in CLI mode
dexto --continue --mode cli

# Continue with a one-shot prompt, then exit
dexto -c -p "now add error handling"

# Resume specific session (opens Web UI)
# Get session id from the web UI or session list command
dexto --resume my-project-session

# Resume session in CLI mode
dexto --resume my-project-session --mode cli

# Resume and run a one-shot prompt
dexto -r my-project-session "fix the bug we discussed"

Agent Management

# Install agents for specific use cases
dexto agents install podcast-agent music-agent coding-agent

# Install all available agents
dexto agents install --all

# List what's installed
dexto agents list --installed

# Find agent config location
dexto which coding-agent

# Use custom agent file
dexto --agent ./agents/my-custom-agent.yml

Web UI

# Launch on default port (3000)
dexto

# Custom port
dexto --port 8080

# With specific agent
dexto --agent database-agent

API Server

# Start REST + SSE streaming server (default port 3001)
dexto --mode server

# With custom port
dexto --mode server --port 8080

# With specific agent and strict mode
dexto --mode server --agent my-agent --strict

# For production with custom agent
dexto --mode server --agent ./production-agent.yml --port 3001

Content Generation

# Generate podcast content
dexto --agent podcast-agent "create a 5-minute podcast about space exploration"

# Generate images
dexto --agent nano-banana-agent "create a futuristic cityscape"

# Create code with specific instructions
dexto --agent coding-agent "build a REST API with Express and TypeScript"

# Interactive mode for complex tasks
dexto --agent coding-agent
# Then in the UI: "Let's build a full-stack app step by step"

Automation & CI/CD

# Automated code review (no confirmation prompts)
dexto --auto-approve "review all files in src/ and suggest improvements"

# Generate documentation
dexto --auto-approve "create API documentation from the code in src/api/"

# Run tests and analyze results
dexto "run the test suite and explain any failures"

# Git commit message generation
git diff | dexto -p "generate a conventional commit message for these changes"

Cloud Workspace Deploys

# Deploy any folder with the managed cloud agent
dexto deploy

# List your cloud deployments
dexto deploy list

# Deploy a repo that already defines a workspace primary agent
cd my-project
dexto deploy

# Open the linked deployment in the dashboard
dexto deploy open

# Check the linked deployment later
dexto deploy status

# Stop or delete the linked deployment
dexto deploy stop
dexto deploy delete

Multi-Agent Workflows

# Start researcher agent as MCP server (Terminal 1)
dexto --mode mcp --port 4000 --agent researcher-agent

# Start coordinator agent that uses researcher (Terminal 2)
dexto --agent coordinator-agent --port 5000

Search & History

# Search all conversations
dexto search "database schema"

# Search in specific session
dexto search "bug fix" --session my-session-id

# Filter by role
dexto search "error" --role assistant

# View session history
dexto session history my-session-id

Next Steps