Skip to main content

Droid Adapter

CCS can delegate execution to alternative CLI targets beyond Claude Code. The Droid adapter routes profiles to the Droid CLI using the same CCS configuration system.

Quick Start

# Run with explicit target flag
ccs glm --target droid

# Use built-in alias (ccsd = droid target)
ccsd glm "your prompt"

# Custom aliases via env var
export CCS_DROID_ALIASES=mydroid,alt-droid
mydroid glm "your prompt"

Target Resolution Priority

CCS resolves the target CLI in this order:
PrioritySourceExample
1 (highest)--target flag--target droid
2Per-profile target fieldtarget: droid in config.yaml
3argv[0] binary namecalling via ccsd
4 (default)Fallbackclaude

Built-in Aliases

ccsd is the busybox-style argv0 shorthand — symlink or copy the ccs binary as ccsd and it auto-routes to the droid target:
# Create ccsd symlink
ln -s $(which ccs) /usr/local/bin/ccsd

# Then use directly
ccsd glm "your prompt"   # Equivalent to: ccs glm --target droid
Binary NameTarget
ccsddroid (built-in)
Custom via CCS_DROID_ALIASESdroid

Custom Aliases via CCS_DROID_ALIASES

Set comma-separated argv0 aliases that all map to the droid target:
export CCS_DROID_ALIASES=mydroid,alt-droid,factory-ccs
mydroid glm "prompt"      # Routes to droid
alt-droid agy "prompt"    # Also routes to droid

Droid Detection

CCS locates the Droid binary in order:
  1. CCS_DROID_PATH env var — explicit path override
  2. PATH lookup via which droid (Unix) or where.exe droid (Windows)
Install Droid CLI:
npm i -g @factory/cli

Environment Variables

VariableDescription
CCS_DROID_ALIASESComma-separated argv0 binary names that map to droid target
CCS_DROID_PATHExplicit absolute path to the droid binary

Config Integration

Droid adapter writes credentials to ~/.factory/settings.json using Droid’s config format:
  • Profiles stored as customModels[] entries with CCS -prefixed display names
  • Atomic file writes via temp file + rename
  • File locking prevents concurrent write races
  • Profile names validated: alphanumeric, underscore, and hyphen only

Per-Profile Target Config

Set target: droid on any API, variant, or composite profile to always route that profile to Droid without needing the --target flag:
# API profile
profiles:
  my-api:
    provider: openai
    target: droid    # Always use Droid for this profile

# CLIProxy variant
cliproxy:
  variants:
    my-variant:
      provider: gemini
      target: droid    # Routes this variant to Droid CLI

# Composite variant
cliproxy:
  variants:
    my-composite:
      composite: true
      opus: gemini
      sonnet: agy
      target: droid    # Routes composite to Droid CLI
Per-profile target is NOT supported for profile types: cliproxy, copilot, and account. Legacy glmt compatibility profiles now follow the normal settings-profile flow after runtime normalization, but new setups should still migrate to glm or km.

Unsupported Profile Types

The following profile types do not support droid routing:
Profile TypeWorkaround
cliproxy (raw)Use variant profiles instead
copilotNot supported
accountNot supported

Dashboard: Droid Page

The dashboard includes a dedicated Droid page at http://localhost:3000/droid with three tabs:

Overview Tab

  • Binary detection — shows whether Droid CLI is installed and its path
  • File status — checks ~/.factory/settings.json existence and validity
  • Warnings — alerts for missing binary, corrupt config, or stale locks
  • Auto-refreshes diagnostics every 10 seconds

BYOK Tab (Bring Your Own Key)

Register custom LLM endpoints for use with Droid: Quick Settings Card:
  • Toggle settings like enableThinking, enableArtifacts
  • Configure default model selection
Reasoning Controls Card:
  • Per-model reasoning effort settings
  • Provider-specific configuration:
    • Anthropic: thinking.budget_tokens (4K-64K tokens)
    • OpenAI: reasoning.effort (low/medium/high/max/xhigh)
    • Generic: reasoning_effort (string value)
Custom Models:
  • CCS-managed models (prefixed “CCS ”) registered in ~/.factory/settings.json
  • Three provider types supported:
    • anthropic — Anthropic Messages API
    • openai — OpenAI Responses API
    • generic-chat-completion-api — OpenAI-compatible (Groq, DeepInfra, Ollama, local)
  • Smart provider detection: explicit hint → URL inference → model name inference
Raw JSON Editor:
  • Direct editing of ~/.factory/settings.json
  • Conflict detection via mtime comparison (prevents overwriting external changes)

Docs Tab

  • Links to Factory Droid documentation
  • Provider API references
  • Quick access to relevant CCS docs

Reasoning Effort Sync

CCS syncs reasoning effort settings between CLI and dashboard:
# CLI override flags
ccs glm --target droid --thinking high
ccs km --target droid --effort medium
Dashboard reasoning controls write provider-specific config to ~/.factory/settings.json. The Droid CLI reads these at startup.

Security

  • No symlink traversal — refuses read/write if target is symlink
  • Atomic writes — temp file + rename prevents corruption
  • File locking — 10s stale timeout, exponential backoff
  • Corruption backup.bak file created before writes
  • File permissions — 0o600 (user-only read/write)

Usage Examples

ccs glm --target droid    # Run GLM on Droid (explicit flag)
ccs km --target droid     # Run Kimi for Coding on Droid
ccsd glm                   # Same via ccsd alias
ccs glm                    # Run GLM on Claude (default)
ccsd codex "prompt"        # Run Codex on Droid
ccsd agy "prompt"          # Run Antigravity on Droid