Overview
The Droidrun CLI lets you control Android and iOS devices using natural language commands powered by LLM agents.Quick Start
Auto-configuration: If
config.yaml doesn’t exist, Droidrun creates it from config_example.yaml automatically.Command shorthand: droidrun "task" is equivalent to droidrun run "task"Commands
- run
- Device Management
- Macros
Execute natural language commands on your device.
Usage
Common Flags
| Flag | Description | Default |
|---|---|---|
--provider, -p | LLM provider (GoogleGenAI, OpenAI, Anthropic, etc.) | From config |
--model, -m | Model name | From config |
--device, -d | Device serial or IP | Auto-detect |
--steps | Max execution steps | 15 |
--reasoning | Enable planning mode | false |
--vision | Enable vision for all agents | From config |
--tcp | Use TCP instead of content provider | false |
--debug | Verbose logging | false |
--save-trajectory | Save execution (none, step, action) | none |
--config, -c | Custom config path | config.yaml |
Examples
- Basic
- LLM Providers
- Advanced
Provider Options
| Provider | Install | Environment Variable |
|---|---|---|
| GoogleGenAI | uv pip install 'droidrun[google]' | GOOGLE_API_KEY |
| OpenAI | uv pip install 'droidrun[openai]' | OPENAI_API_KEY |
| Anthropic | uv pip install 'droidrun[anthropic]' | ANTHROPIC_API_KEY |
| DeepSeek | uv pip install 'droidrun[deepseek]' | DEEPSEEK_API_KEY |
| Ollama | uv pip install 'droidrun[ollama]' | None (local) |
Configuration
Override Priority
- CLI flags (highest)
- Config file (
config.yaml) - Defaults (lowest)
Common Patterns
Troubleshooting
No devices found
No devices found
Portal not accessible
Portal not accessible
LLM provider errors
LLM provider errors
Command times out
Command times out
TCP connection fails
TCP connection fails
Environment Variables
| Variable | Description | Default |
|---|---|---|
GOOGLE_API_KEY | Google Gemini API key | None |
OPENAI_API_KEY | OpenAI API key | None |
ANTHROPIC_API_KEY | Anthropic API key | None |
DEEPSEEK_API_KEY | DeepSeek API key | None |
DROIDRUN_CONFIG | Config file path | config.yaml |
Next Steps
- Configuration Guide - Customize behavior
- Device Setup - Detailed setup instructions
- Agent Architecture - How it works
- Custom Tools - Extend functionality