Installation
- Interactive (
droid) - Chat-first REPL with slash commands - Non-interactive (
droid exec) - Single-shot execution for automation and scripting
Installing a specific version
Pin a version when upgrades must be reviewed and applied intentionally, such as in CI runners, provisioned development environments, or other reproducible systems.npm
Specify an exact package version:Built-in updater
After installing Droid through the standalone installer, select a version with:droid update --check to check for an
available update without installing it.
Standalone installations enable automatic updates by default. After selecting a version, follow
the auto-update guidance to keep it pinned.
Direct binary download
Release binaries and their SHA256 checksums use the following paths:<platform>:linux,darwin, orwindows<arch>:x64,arm64, orx64-baseline<binary>:droidon Linux and macOS, ordroid.exeon Windows
PATH. The download URL layout is an implementation
detail, so always pin a version and verify its checksum.
Droid CLI commands
Droid CLI flags
Customize droid’s behavior with command-line flags:Autonomy levels
droid exec uses tiered autonomy to control what operations the agent can perform. Only raise access when the environment is safe.
Examples:
Model IDs
Use any available model ID with-m, --model or --spec-model. For custom models, see Bring Your Own Key (BYOK).
See Available Models for guidance on which model to use for different tasks.
Interactive mode features
Keyboard shortcuts
The interactive REPL supports a rich set of keyboard shortcuts for navigation, overlays, and input control:Bash mode
Press! when the input is empty to toggle bash mode. In bash mode, commands execute directly in your shell without AI interpretation—useful for quick operations like checking git status or running npm test.
- Toggle on: Press
!(when input is empty) - Execute commands: Type any shell command and press Enter
- Toggle off: Press
Escto return to normal AI chat mode
> to $ when bash mode is active.
Mermaid diagram rendering
Droid automatically renders Mermaid diagram code blocks as ASCII art directly in the terminal — no external viewer or browser required. When a response contains a fenced```mermaid block of a supported diagram type, the diagram is drawn inline in the transcript.
Supported diagram types:
flowchart(andgraph)sequenceDiagramstateDiagramclassDiagramerDiagram
gantt, pie, mindmap, timeline, journey, gitGraph) fall back to displaying the raw Mermaid source and a link to view the diagram externally.
Slash commands
Available when runningdroid in interactive mode. Type the command at the prompt:
For detailed information on slash commands, see the interactive mode documentation.
Git worktrees
Use-w, --worktree [name] to run a session inside a native git worktree so you can work on multiple branches of the same repository in parallel without file conflicts. This flag is available on both droid (interactive) and droid exec.
Each worktree is created as a sibling directory next to your repo (../<repo>-wt-<branch>/) with its own checkout and dedicated branch.
Branch naming:
--worktree(no value) — Creates/reuses a worktree on a branch named<current-branch>-wt.--worktree <name>— Uses<name>as the branch. If the branch already exists, it is checked out in the worktree; otherwise it is created fromHEAD.- If the target branch is already checked out in another worktree, the command fails with a clear error.
- Interactive mode — The worktree persists after the session ends so you can resume work, inspect changes, or push the branch.
droid execmode — On exit, a clean worktree (no uncommitted changes) is removed automatically; a dirty worktree is preserved and its path is printed so you can review the work.- The underlying git branch is never deleted by Droid — only the worktree directory is removed during cleanup.
When
--worktree is active, Droid operates entirely inside the worktree directory. Run follow-up
commands (tests, builds, installs) from that directory rather than the original repo root. Fresh
worktrees may not have dependencies installed yet (for example node_modules) — set them up if
builds or tests fail with missing-module errors.Subcommand flags
In addition to the global flags above, severaldroid subcommands accept their own flags.
droid update flags
droid search flags
droid mcp add flags
droid plugin flags
droid computer register flags
MCP command reference
The/mcp slash command opens an interactive manager UI for browsing and managing MCP servers.
Quick start: Type /mcp and select “Add from Registry” to browse 40+ pre-configured servers (Linear, Sentry, Notion, Stripe, Vercel, and more). Select a server, authenticate if required, and you’re ready to go.
CLI commands for scripting and automation:
--env, --header), configuration files, and how user vs project config layering works.
Authentication
- Generate an API key at app.factory.ai/settings/api-keys
- Set the environment variable:
~/.bashrc, ~/.zshrc, or PowerShell $PROFILE) for long-term use.
Auto-updates
Standalone Droid installations check for and install CLI updates automatically. Rundroid update
to trigger an update on demand.
To keep a standalone installation pinned, disable its in-process updater:
droid update does not install another
version. Set it in the environment that launches every Droid process, including droid daemon.
The npm distribution has auto-updates disabled at build time and does not require this variable.
Running droid update from an npm installation reports that auto-update is unavailable. Setting
FACTORY_DROID_AUTO_UPDATE_ENABLED=true explicitly overrides the npm build default.
Enterprise administrators can disable CLI auto-updates for all organization members with the
disableAutoUpdate organization setting. See the release notes and
enterprise control change history API.
Exit codes
Common workflows
Code review
Testing and debugging
Refactoring
Parallel sessions on one repo
CI/CD integration
See also
- Quickstart guide - Getting started with the Droid CLI
- Interactive mode - Shortcuts, input modes, and features
- Available Models - Model selection guidance
- Settings - Configuration options
- Custom commands - Create your own shortcuts
- Custom droids - Build specialized agents
- Droid Exec overview - Detailed automation guide
- MCP configuration - External tool integration
