Skip to main content

CLI Guide

This guide helps you get started with the Dexto CLI and includes a comprehensive list of commands you can run with Dexto CLI.

Dexto CLI is the easiest way to get started with AI agents.

Some of the cool things you can do with Dexto CLI:

  • Talk to any LLM in your terminal
  • Create long-lived AI agents with tools, knowledge and memories. Example: a productivity agent that integrates with your linear and github.
  • Deploy these agents either locally or on the cloud
  • Talk to these agents on any application - discord, telegram, slack, cursor, claude desktop, etc.
  • Start building your own AI applications - get started with building your own Cursor! dexto create-app

Complete CLI Reference

Main Commands & Options

CommandDescriptionExample
dextoStart interactive CLIdexto
dexto "prompt"Run single promptdexto "list files here"
dexto -p "prompt"Run single prompt (explicit)dexto -p "create a file"
dexto --mode webLaunch web UIdexto --mode web --web-port 8080
dexto --mode serverStart as API serverdexto --mode server
dexto --mode mcpRun as MCP serverdexto --mode mcp
dexto --mode discordStart Discord botdexto --mode discord
dexto --mode telegramStart Telegram botdexto --mode telegram

CLI Flags & Options

FlagDescriptionExample
-v, --versionShow versiondexto --version
-a, --agent <path>Use custom agent configdexto -a ./my-agent.yml
-m, --model <model>Specify LLM modeldexto -m claude-4-sonnet-20250514
-r, --router <router>Specify router (vercel/in-built)dexto -r in-built
--new-session [id]Start new sessiondexto --new-session my-session
--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 -p "format my repo"
--web-port <port>Web UI portdexto --mode web --web-port 3001

Subcommands

CommandDescriptionExample
create-appScaffold new Dexto TypeScript appdexto create-app
init-appAdd Dexto to existing TypeScript appdexto init-app
setupConfigure global preferencesdexto setup
install [agents...]Install agents from registrydexto install nano-banana-agent
uninstall [agents...]Uninstall local agentsdexto uninstall nano-banana-agent
list-agentsList available/installed agentsdexto list-agents --installed
which <agent>Show path to agentdexto which nano-banana-agent
mcp --group-serversStart MCP server aggregatordexto mcp --group-servers

Interactive CLI Commands

Once in interactive mode (dexto), use these slash commands:

CommandDescriptionExample
/help [command]Show help information/help session
/exit, /quit, /qExit CLI/exit
/clear, /resetClear conversation history/clear
/session listList all sessions/session list
/session create [id]Create new session/session create work-session
/session load <id>Load session/session load work-session
/session delete <id>Delete session/session delete old-session
/session export <id>Export session data/session export work-session
/history [limit]Show conversation history/history 10
/search <query>Search conversation history/search "code review"
/model listList available models/model list
/model switch <model>Switch LLM model/model switch gpt-4o
/model currentShow current model/model current
/mcp listList MCP servers/mcp list
/mcp connect <name>Connect MCP server/mcp connect filesystem
/mcp disconnect <name>Disconnect MCP server/mcp disconnect web
/mcp statusShow connection status/mcp status
/tools listList available tools/tools list
/tools search <query>Search tools/tools search file
/prompt showShow current system prompt/prompt show
/prompt reloadReload system prompt/prompt reload
/log level <level>Set log level/log level debug
/log tail [lines]Show recent logs/log tail 50
/config validateValidate configuration/config validate
/config reloadReload configuration/config reload
/statsShow system statistics/stats

Common Usage Patterns

See all available options and flags:

dexto --help

Launch the interactive CLI:

dexto

Start dexto CLI with a different LLM

# openai
dexto -m gpt-5-mini

# anthropic
dexto -m claude-sonnet-4-5-20250929

# google
dexto -m gemini-2.5-flash

Start dexto with a different config file

This allows you to configure dexto CLI to use a different AI agent

dexto --agent <path_to_agent_config_file>

Check Configuration Guide to understand more about dexto config files

Require all MCP servers to connect successfully

By default, Dexto uses "lenient" mode where individual servers can fail to connect without preventing startup. Use the --strict flag to require all servers to connect successfully:

dexto --strict

This overrides any individual connectionMode settings in your MCP server configurations. See MCP Configuration for more details on connection modes.

Skip tool confirmation prompts during development

dexto --auto-approve "refactor my project using the filesystem and browser tools"

Use the --auto-approve flag when you trust the tools being triggered and want to bypass interactive confirmation prompts. This flag overrides the toolConfirmation.mode defined in your agent config for the current run only.

Run a specific command with Dexto CLI:

dexto "find all .sh files in this directory"
# or use explicit -p flag
dexto -p "find all .sh files in this directory"

or do the same with gemini:

dexto -m gemini-2.0-flash "find all files in this directory"
# or with explicit -p flag
dexto -m gemini-2.0-flash -p "find all files in this directory"

Dexto CLI can accept any command - if it doesn't see it as an in-built command, it will fire a single run CLI with that request

For instance, in the above command, the query "find all .sh files in this directory" will start Dexto Agent, send it this query, process the response, and then exit.

Start a telegram bot

dexto --mode telegram

To use a specific agent config file for the telegram bot:

dexto --mode telegram --agent ./telegram-agent-config.yml

Start a discord bot

dexto --mode discord

To use a specific agent config file for the discord bot:

dexto --mode discord --agent ./discord-agent-config.yml

Start dexto as an MCP server

dexto --mode mcp

With this, you can now connect this agent to Cursor, claude desktop, or even other Dexto agents!

Check Dexto Agents as MCP Servers to understand more about MCP servers.

Group MCP servers with dexto

dexto mcp --group-servers

This starts Dexto as an MCP server that aggregates and re-exposes tools from multiple configured MCP servers. This is useful when you want to access tools from multiple MCP servers through a single connection.

To use a specific config file:

dexto mcp --group-servers -a ./dexto-tools.yml

Check Using Dexto to group MCP servers to understand more about MCP server aggregation.

Environment variables

Dexto reads settings from the layered environment loader (process.env, .env, .dexto/.env). After you run dexto setup, your LLM credentials live in ~/.dexto/.env, so you rarely need to touch these variables unless you are customizing runtime behaviour.

General runtime controls

VariableDefaultPurpose
DEXTO_LOG_LEVELinfoControls log verbosity (error, warn, info, debug, silly).
DEXTO_LOG_TO_CONSOLEfalseForce console logging even when logs are redirected to file (set to true).
DEXTO_ANALYTICS_DISABLEDfalseOpt out of analytics when truthy (1, true, yes).

Analytics overrides

VariableDefaultPurpose
DEXTO_POSTHOG_KEYBuilt-in public keySupply a custom PostHog project key.
DEXTO_POSTHOG_HOSThttps://app.posthog.comPoint analytics to a self-hosted PostHog instance.

Web UI & server configuration

VariableDefaultPurpose
HOSTNAME0.0.0.0Hostname used when launching the Web UI.
FRONTEND_PORT3000Overrides the Next.js port when running --mode web.
PORT3000Fallback port used by the API server if API_PORT is not set.
API_PORT3001Controls the REST/WebSocket API port for web/server modes.
API_URLhttp://localhost:<API_PORT>Overrides the API base URL passed to the Web UI.
FRONTEND_URLhttp://localhost:<FRONTEND_PORT>Overrides the URL opened in the browser when the Web UI starts.
NEXT_PUBLIC_API_URLDerived from API_URLInjects a custom API URL into the Web UI bundle.
NEXT_PUBLIC_WS_URLws://localhost:<API_PORT>Injects a custom WebSocket URL into the Web UI bundle.
NEXT_PUBLIC_FRONTEND_URLDerived from FRONTEND_URLInjects a custom frontend URL into the Web UI bundle.
DEXTO_BASE_URLhttp://localhost:<PORT>Base URL used by the REST server when generating absolute links.
DEXTO_MCP_TRANSPORT_TYPEhttpSwitch between http and stdio transports for the MCP aggregation server.

Discord integration

VariableDefaultPurpose
DISCORD_BOT_TOKENRequired to enable --mode discord.
DISCORD_RATE_LIMIT_ENABLEDtrueDisable Discord rate limiting by setting to false.
DISCORD_RATE_LIMIT_SECONDS5Cooldown window for rate limiting in seconds.

Telegram integration

VariableDefaultPurpose
TELEGRAM_BOT_TOKENRequired to enable --mode telegram.
TELEGRAM_INLINE_QUERY_CONCURRENCY4Maximum concurrent inline queries handled by the bot.

Change log level on the fly

DEXTO_LOG_LEVEL=debug dexto what is the time

Project setup commands

These commands will help you get started creating your own AI application using Dexto

Setup a fresh typescript project using dexto-core

dexto create-app

Add dexto into an existing typescript project

dexto init-app

Check Building with Dexto Guide for more information!

Agent Management

Install Pre-built Agent Templates

Dexto provides ready-to-use agent templates from the registry:

# List available agents
dexto list-agents

# Install specific agents
dexto install nano-banana-agent podcast-agent database-agent

# Use an installed agent
dexto --agent nano-banana-agent "create a futuristic cityscape"
dexto --agent podcast-agent "generate a podcast intro"

# Find where an agent is installed
dexto which nano-banana-agent

# Remove agents you no longer need
dexto uninstall nano-banana-agent

Available Agent Templates

  • Nano Banana Agent – Advanced image generation and editing using Google's Nano Banana (Gemini 2.5 Flash Image)
  • Podcast Agent – Advanced podcast generation using Google Gemini TTS for multi-speaker audio content
  • Database Agent – Demo agent for SQL queries and database operations
  • Image Editor Agent – Image editing and manipulation
  • Music Agent – Music creation and audio processing
  • PDF Agent – Document analysis and conversation
  • Product Researcher – Product naming and branding research
  • Triage Agent – Demo multi-agent customer support routing system

See the full list with dexto list-agents and examples in the agents/ folder.

Coming soon!

Deploy config files as AI agents with dexto CLI