Skip to main content
Install Factory’s Droid CLI and connect it to GMI Cloud in under 5 minutes. Droid is Factory’s agent-native coding agent that runs in your terminal. Connect it to GMI Cloud and any model in the GMI catalog becomes available for reading files, reasoning about code, and making edits, directly from the CLI.

Prerequisites

  • A Mac, Linux, or Windows machine with a terminal
  • A GMI Cloud account at console.gmicloud.ai
  • About 5 minutes

Step 1. Install Droid

Run this command in your terminal:
curl -fsSL https://app.factory.ai/cli | sh
The installer prints a line to add Droid to your PATH. Append it to your shell config and reload:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Tip: Use ~/.zshrc instead of ~/.bashrc if you’re on zsh. On Linux, also install xdg-utils sudo apt-get install xdg-utils) so the browser sign-in works. Verify the install worked:
droid --version

Step 2. Sign in and choose BYOK

Launch Droid for the first time:
droid
A browser opens for onboarding. Sign in, select your organization, then choose how you’ll get models. Select Use Your Own API Keys, the BYOK path that lets Droid run on your GMI Cloud key. When you see the confirmation that the CLI is installed, close the tab and return to your terminal. Note: Signing in authenticates you to Factory. Your GMI Cloud key, configured next, is what actually runs inference. Choosing the managed plan instead routes requests through Factory’s own models, not GMI.

Step 3. Connect GMI Cloud

Store your GMI Cloud key as an environment variable so it stays out of the config file:
echo 'export GMI_API_KEY="your-gmi-key-here"' >> ~/.bashrc
source ~/.bashrc
Get your key from console.gmicloud.ai: open API Keys, create a key, and copy it. Then add GMI Cloud to Droid’s config at ~/.factory/settings.json:
mkdir -p ~/.factory
cat > ~/.factory/settings.json << 'EOF'
{
  "customModels": [
    {
      "model": "zai-org/GLM-5.2-FP8",
      "displayName": "GLM-5.2 (GMI Cloud)",
      "baseUrl": "https://api.gmi-serving.com/v1",
      "apiKey": "${GMI_API_KEY}",
      "provider": "generic-chat-completion-api",
      "maxOutputTokens": 16384
    }
  ]
}
EOF
Set model to the exact model ID from the Text catalog. The example uses GLM-5.2; swap in any model from the table in Step 4. Add more entries to the customModels array to keep several models on hand. Note: baseUrl is always https://api.gmi-serving.com/v1, and provider is generic-chat-completion-api because GMI Cloud is OpenAI-compatible. If ~/.factory/settings.json already has settings, add the customModels key alongside them instead of overwriting the file. GMI Cloud is now connected.

Step 4. Pick a model

Start Droid in any project:
cd your-project
droid
Type:
/model
The model picker opens. Your GMI Cloud models appear in the Custom models section at the bottom of the list, below Factory’s built-in models. Select your GMI model and press Enter. Recommended models for coding:
ModelBest for
Qwen3-Coder-480BBest coding quality
DeepSeek V4 ProComplex reasoning & hard problems
Claude Sonnet 4.6Balanced quality + speed
Claude Opus 4.7 FastFast, high-quality responses
DeepSeek V4 FlashLightweight, quick tasks
Tip: Factory recommends models with at least 30B parameters for agentic coding. Smaller models work for experimentation but struggle with multi-step engineering tasks.

Step 5. Start coding

You’re all set. Type any task in the prompt and hit Enter:
Fix the broken tests in this project
Explain what this codebase does
Refactor this function to be more readable
Droid reads your files, reasons about the code, and makes changes directly.

Useful commands

CommandWhat it does
/modelSwitch the active model
/limitsManage plan and usage preferences
/autoSet how much Droid can do without asking
Note: Seeing “No active subscription found” on startup? That’s expected with BYOK. Droid opens on a Factory-managed model that needs a paid plan. Select your GMI model from the Custom models section at the bottom of /model and the warning no longer applies to your session.

Next steps