Factory Droid CLI
Point Factory Droid CLI at 58API: GPT models use Base URL https://api.58api.net/v1, and Claude models use https://api.58api.net without /v1.
Project Introduction
Command Line: Automation Across the SDLC. Script and parallelize Droids at massive scale for CI/CD, migrations, and maintenance. From automated code review to self-healing builds, integrate agents into every phase of development.
Droid CLI is a command-line tool developed by Factory AI, designed to operate as an AI software engineering agent. It allows users to interact with various large language models via the terminal, build, debug, and refactor code, and even create complete applications.
- Official Homepage: https://factory.ai/product/cli
- Official Documentation: https://docs.factory.ai/cli/getting-started/quickstart
- Installation Method: See the tutorial below on this page
Demonstration

Features
| Category | Feature | Value/Capability | Example/Notes |
|---|---|---|---|
| Quick Start & CLI | 30-second installation; launch droid interactive session in the project directory; supports macOS/Linux and Windows | Rapid integration into the current project, no new tools required | Windows Installation: irm https://app.factory.ai/cli/windows | iex; Launch: droid |
| End-to-End Feature Development | Full-process automation from planning to implementation to testing; transparent review process | Increase delivery speed while maintaining human control | Native diff viewing and approval workflow (see "Transparency and Control") |
| Deep Codebase Understanding | Integrates shared organizational knowledge across codebases, documentation, and issue tracking; context-aware, performance improves over time | More accurate suggestions and changes | Continuously leverages knowledge across repositories and documentation |
| Engineering System Integration | Natively integrates tools like Jira, Notion, Slack, etc.; development work stays synchronized with team processes | Reduce tool switching and information silos | "etc." indicates more integrations |
| Production-Grade Automation | Workflows reusable locally and in CI/CD; built-in enterprise-grade security and compliance | Consistency and auditability | Adapts to pipelines and enterprise environments |
| Enterprise Capabilities | Private deployment options, SOC-2 compliance, air-gapped environments | Meets security and compliance requirements | Prioritizing security and quality |
| Existing Tool Enhancement | Works in terminals, IDEs, and existing development environments; no need to switch editors or learn new interfaces | Maintain existing work habits, low migration cost | Deep integration with familiar tools |
| Transparency and Control | Every decision is visible and reviewable; maintain full oversight over code changes; native diff viewing and approval workflow | Reduce risk, enhance controllability | Audit-friendly, traceable |
| Model Flexibility | Not locked to a single AI provider; select the best model per task; consistent organizational behavior and memory | Optimal choice between performance and cost | Supports multi-model routing |
| Next Steps and Resources | Quickstart, Common Use Cases, IDE Integration, Configuration, AGENTS.md | Facilitates implementation and practice | See page “Next steps/Additional resources” |
AI Model Configuration Method
Windows Graphical Guide
1. Open Terminal

2. Install Factory Droid CLI
Official one-click installation command:
One-Click Installation Command
irm https://app.factory.ai/cli/windows | iex

3. Modify Configuration File
Droid CLI connects to third-party APIs through custom models (BYOK). The one-click script merges 58API models into customModels in ~/.factory/settings.json, Factory’s current configuration format. It replaces only 58API-related models, preserves other settings and custom models, backs up an existing configuration as settings.json.bak.<timestamp>, and cleans up the related entries in the legacy ~/.factory/config.json. It adds these models:
- GPT models (
gpt-6.1-sol,gpt-6-astra): provideropenai, Base URLhttps://api.58api.net/v1 - Claude models (
claude-fable-5-1,claude-opus-5-5,claude-sonnet-5-5): provideranthropic, Base URLhttps://api.58api.net(without /v1)

The script's prompts are in Chinese; the values are the same as in the text.
One-Click Configuration File Modification
iex (irm 'https://58api.net/helper/factory-cli-setup.ps1')Follow the prompts: press Enter at Base URL (default https://api.58api.net). The script handles each protocol separately: GPT uses https://api.58api.net/v1, while Claude uses https://api.58api.net without /v1. Paste the key created in the 58API console at API Key; input is hidden. Run the same script again to change the API Key or base URL later.
4. Start Using Droid CLI
You can now start using Droid CLI!
# Go to your project directory (optional)
cd C:\path\to\your\project
# Launch Droid CLI
droidSwitch to an 58API Model
After starting droid, type /model and choose a model marked [58API] in the Custom models section below the list (for example GPT-6.1 Sol [58API] or Claude Opus 5.5 [58API]). If you do not switch, Droid uses Factory's own models and requests do not go through 58API. To use Claude models, the group of your 58API key must include those Claude models.
Droid CLI requires users to log in to an official account (free) before use.
5. Windows Common Issues Troubleshooting
permission denied error during installation
This is usually a permission issue. Try the following solutions:
- Run
PowerShellas administrator, then run the installation command again - If you install with npm instead, configure
npmto use the user directory:npm config set prefix "$env:APPDATA\npm"
PowerShell Execution Policy Error
If you encounter execution policy restrictions, run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
macOS/Linux Graphical Guide
1. Install Droid CLI
Install Droid CLI
Open the terminal and run the following command: curl -fsSL https://app.factory.ai/cli | sh


Modify environment variables according to the installation prompts (copy the installation prompt code directly):
For Linux, choose ~/.bashrc or ~/.zshrc as appropriate.
Droid CLI Environment Variables (Example Only)
echo 'export PATH=/Users/YOUR_USERNAME/.local/bin:$PATH' >> ~/.zshrc
source ~/.zshrc2. Modify Configuration File
Droid CLI connects to third-party APIs through custom models (BYOK). The one-click script merges 58API models into customModels in ~/.factory/settings.json, Factory’s current configuration format. It replaces only 58API-related models, preserves other settings and custom models, backs up an existing configuration as settings.json.bak.<timestamp>, and cleans up the related entries in the legacy ~/.factory/config.json. It adds these models:
- GPT models (
gpt-6.1-sol,gpt-6-astra): provideropenai, Base URLhttps://api.58api.net/v1 - Claude models (
claude-fable-5-1,claude-opus-5-5,claude-sonnet-5-5): provideranthropic, Base URLhttps://api.58api.net(without /v1)
One-Click Configuration File Modification
curl -fsSL https://58api.net/helper/factory-cli-setup.sh | bashFollow the prompts: press Enter at Base URL (default https://api.58api.net). The script handles each protocol separately: GPT uses https://api.58api.net/v1, while Claude uses https://api.58api.net without /v1. Paste the key created in the 58API console at API Key; input is hidden. Run the same script again to change the API Key or base URL later.

The script's prompts are in Chinese; the values are the same as in the text.
3. Start Using Droid CLI
You can now start using Droid CLI!
# Go to your project directory (optional)
cd /path/to/your/project
# Launch Droid CLI
droidSwitch to an 58API Model
After starting droid, type /model and choose a model marked [58API] in the Custom models section below the list (for example GPT-6.1 Sol [58API] or Claude Opus 5.5 [58API]). If you do not switch, Droid uses Factory's own models and requests do not go through 58API. To use Claude models, the group of your 58API key must include those Claude models.
Droid CLI requires users to log in to an official account (free) before use.
custom_models,base_url, and other snake_case fields in~/.factory/config.jsonbelong to the legacy format. Droid migrates these models tosettings.jsonon startup, so later changes to the old file may have no effect. UsecustomModelsinsettings.jsonas the source of truth. The script does not overwrite the entire existing configuration.
Manual Configuration (Optional)
Without the one-click script, you can add 58API models manually to the customModels array in ~/.factory/settings.json (on Windows: %USERPROFILE%\.factory\settings.json). If the file already exists, merge only customModels and keep your other settings:
{
"customModels": [
{
"model": "gpt-6.1-sol",
"displayName": "GPT-6.1 Sol [58API]",
"baseUrl": "https://api.58api.net/v1",
"apiKey": "sk-your-58API-key",
"provider": "openai",
"maxOutputTokens": 128000
},
{
"model": "claude-opus-5-5",
"displayName": "Claude Opus 5.5 [58API]",
"baseUrl": "https://api.58api.net",
"apiKey": "sk-your-58API-key",
"provider": "anthropic",
"maxOutputTokens": 32000
}
]
}Note: with provider openai, baseUrl must include /v1; with provider anthropic, use https://api.58api.net (without /v1). After saving, restart droid and select the model with /model.
Memoh - Containerized AI Agent Platform
Memoh integration guide — Connect the self-hosted containerized AI agent platform to 58API, creating AI bots with long-term memory for Telegram, Discord, Lark, QQ, WeChat, and more.
OpenAI Chat Format (Chat Completions)
Call 58API with OpenAI Chat Completions: POST https://api.58api.net/v1/chat/completions and an Authorization API key.