Factory Droid CLI
Factory Droid CLI (Droid CLI) is a terminal-based intelligent software engineering agent developed by Factory AI. It deeply understands large codebase contexts and engineering conventions, autonomously executing requirement planning, code implementation, test running, and refactoring directly from the command line to deliver an immersive local autonomous programming experience for developers.
✨ One-Click AI Setup
Copy the prompt below and send it to your AI assistant to automatically detect your environment and complete the setup:
🔑 Prerequisites
sk-...🚀 Steps
Install CLI Globally
Select the official one-click installation command based on your operating system. Once installed, you can invoke the droid command in your terminal:
curl -fsSL https://app.factory.ai/cli | shAfter installation, follow the terminal prompts to ensure that the Droid path is appended to your shell configuration file (such as ~/.zshrc or ~/.bashrc).
Open PowerShell as Administrator and run:
irm https://app.factory.ai/cli/windows | iexConfigure Endpoints and Keys
Factory Droid CLI uses ~/.factory/config.json in the user's home directory to store third-party custom model endpoints:
In your terminal, run the following commands to create the configuration directory and write the configuration file:
# 1. Create configuration directory
mkdir -p ~/.factory
# 2. Write custom model configuration file (pointing to OpenRely)
cat > ~/.factory/config.json <<EOF
{
"custom_models": [
{
"model_display_name": "OpenRely",
"model": "<model_id_from_pricing_center>",
"base_url": "https://api.openrely.ai/v1",
"api_key": "sk-your-openrely-api-key",
"provider": "openai",
"max_tokens": 128000
}
]
}
EOF
chmod 600 ~/.factory/config.jsonIn a PowerShell window, run the following commands to write the configuration:
# 1. Create configuration directory
New-Item -ItemType Directory -Force -Path "$HOME\.factory"
# 2. Write custom model configuration file (pointing to OpenRely)
@"
{
"custom_models": [
{
"model_display_name": "OpenRely",
"model": "<model_id_from_pricing_center>",
"base_url": "https://api.openrely.ai/v1",
"api_key": "sk-your-openrely-api-key",
"provider": "openai",
"max_tokens": 128000
}
]
}
"@ | Out-File -Encoding utf8 "$HOME\.factory\config.json"Launch and Verification
Navigate to the root directory of your codebase and run droid to launch an interactive session:
droidAfter entering the session for the first time, send a test prompt to verify endpoint connectivity:
> Analyze the overall architecture of this project and list the key entry filesIf the code analysis response streams back normally, OpenRely has been successfully integrated.
💡 Common Commands
Frequently used built-in shortcut commands in Factory Droid CLI interactive sessions:
| Command | Description |
|---|---|
/help | View all built-in commands and configuration options |
/model | Interactively view or switch the currently used model |
/clear | Clear the current conversation context and start a new task |
/exit | Exit the Droid CLI session |
❓ FAQ
Encountering other API errors or billing questions? Please refer to the complete FAQ and Troubleshooting Guide.
Was this page helpful?
Codex CLI
Codex CLI is the official terminal AI coding assistant (CLI Agent) from OpenAI. It autonomously inspects code repositories, runs terminal commands, and edits files cleanly with atomic patch operations.
OpenClaw
OpenClaw is an open-source, self-hosted personal AI agent and gateway platform. It seamlessly connects multi-channel messages from Telegram, Discord, WhatsApp, and more to AI agents running on local hardware, supporting multi-agent cooperative routing, persistent memory, and autonomous tool calling, allowing developers to take full control of their private AI assistants.