.do
Development

cli

Command-line interface tools and utilities

cli

Command-line interface for managing all platform operations, from deploying services to querying databases, with interactive prompts and scripting support.

Overview

The CLI primitive provides a powerful command-line interface for all platform operations, with features like auto-completion, interactive wizards, and scriptable commands for automation.

Quick Example

# Install CLI
npm install -g cli.do

# Authenticate
do auth login

# Deploy a service
do deploy ./workers/api

# Query database
do db query "SELECT * FROM users LIMIT 10"

# Manage agents
do agent create sales-assistant --role SDR

Core Capabilities

  • Complete Platform Access - All features available via CLI
  • Interactive Mode - Guided prompts for complex operations
  • Scriptable - Use in CI/CD pipelines and automation
  • Auto-Completion - Tab completion for commands and options
  • Configuration - Project-level and global configuration files

Access Methods

SDK

TypeScript/JavaScript library for CLI operations

await cli.run('deploy', { path: './workers/api' })

SDK Documentation

CLI

Native command-line interface

do deploy ./workers/api --env production

CLI Documentation

API

REST/RPC endpoints for CLI command execution

curl -X POST https://api.do/v1/cli/execute -d '{"command":"deploy","args":["./workers/api"]}'

API Documentation

MCP

Model Context Protocol for AI-driven CLI operations

Deploy the API worker to production environment

MCP Documentation