{
  "id": "factory-droid",
  "name": "Droid",
  "homepage": "https://factory.ai",
  "description": "Use the Droid CLI to run Factory from your terminal, editor, tests, and Git workflow.",
  "icon": "https://factory.ai/favicon.svg",
  "executables": [
    "droid"
  ],
  "dotfiles": {
    "paths": [
      "~/.factory/settings.json",
      "~/.factory/mcp.json",
      "~/.factory/commands/",
      "~/.factory/output-styles/"
    ],
    "exclude": [
      "~/.factory/settings.local.json",
      "~/.factory/worktrees/"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": "~/.factory/mcp.json",
        "match": {
          "key_path": [
            "mcpServers.*.env.*",
            "mcpServers.*.headers.*",
            "mcpServers.*.oauth.clientSecret"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Chat with Droid",
    "description": "Start the Droid coding agent with an optional first prompt, or run a task headlessly with the exec subcommand.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://docs.factory.ai/reference/cli-reference",
        "revision": "2026-10-27",
        "evidence": "From https://docs.factory.ai/reference/cli-reference (Droid CLI commands and flags tables)\ndroid | Start interactive REPL | droid |\ndroid \"query\" | Start REPL with initial prompt | droid \"explain this project\" |\ndroid exec \"query\" | Execute task without interactive mode | droid exec \"summarize src/auth\" |\ndroid exec -f prompt.md | Load prompt from file | droid exec -f .factory/prompts/review.md |\n-f, --file <path> | Read prompt from a file | droid exec -f plan.md |\n-m, --model <id> | Select a specific model ID | droid exec -m claude-opus-5-5 |\n-s, --session-id <id> | Continue an existing session | droid exec -s session-abc123 |\n--auto <level> | Set autonomy level (low, medium, high) | droid exec --auto medium \"run tests\" |\n--list-tools | Print available tools and exit | droid exec --list-tools |\n-o, --output-format <format> | Output format (text, json, stream-json, stream-jsonrpc) | droid exec -o json \"document API\" |\n-r, --resume [sessionId] | Resume a previous session. In interactive mode, -r is --resume; in droid exec, -r is --reasoning-effort. | droid -r |\n-r, --reasoning-effort <level> | Override reasoning effort; valid levels are model-dependent (see /models). In droid exec, -r maps to this flag. | droid exec -r high \"debug flaky test\" |\n--use-spec | Start in specification mode (plan before executing) | droid exec --use-spec \"add user profiles\" |\n--skip-permissions-unsafe | Skip all permission prompts; command blocks still apply (unsafe) | droid exec --skip-permissions-unsafe |\n--cwd <path> | Execute from a specific working directory (use an absolute path) | droid exec --cwd \"$PWD/service\" --auto medium \"run tests\" |\n--append-system-prompt <text> | Append custom text to the end of the system prompt | droid --append-system-prompt \"Always run tests.\" |\n--append-system-prompt-file <path> | Append the contents of a file to the end of the system prompt | droid --append-system-prompt-file .factory/system.md |\n"
      }
    ],
    "field": [
      {
        "id": "prompt",
        "label": "Prompt",
        "description": "Initial prompt. Leave empty to start with an empty chat.",
        "type": "string",
        "position": 0,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "append_system_prompt",
        "label": "Append to system prompt",
        "type": "string",
        "option": [
          "--append-system-prompt"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "append_system_prompt_file",
        "label": "Append system prompt from file",
        "type": "path",
        "option": [
          "--append-system-prompt-file"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "prompt"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "append_system_prompt",
          "append_system_prompt_file"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "exec"
        ],
        "label": "Run a task headlessly",
        "description": "Run one prompt non-interactively with droid exec. Mission mode, tool allow/deny lists, spec mode and session tagging are left out.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://docs.factory.ai/reference/cli-reference",
            "revision": "2026-10-27",
            "evidence": "From https://docs.factory.ai/reference/cli-reference (Droid CLI commands and flags tables)\ndroid | Start interactive REPL | droid |\ndroid \"query\" | Start REPL with initial prompt | droid \"explain this project\" |\ndroid exec \"query\" | Execute task without interactive mode | droid exec \"summarize src/auth\" |\ndroid exec -f prompt.md | Load prompt from file | droid exec -f .factory/prompts/review.md |\n-f, --file <path> | Read prompt from a file | droid exec -f plan.md |\n-m, --model <id> | Select a specific model ID | droid exec -m claude-opus-5-5 |\n-s, --session-id <id> | Continue an existing session | droid exec -s session-abc123 |\n--auto <level> | Set autonomy level (low, medium, high) | droid exec --auto medium \"run tests\" |\n--list-tools | Print available tools and exit | droid exec --list-tools |\n-o, --output-format <format> | Output format (text, json, stream-json, stream-jsonrpc) | droid exec -o json \"document API\" |\n-r, --resume [sessionId] | Resume a previous session. In interactive mode, -r is --resume; in droid exec, -r is --reasoning-effort. | droid -r |\n-r, --reasoning-effort <level> | Override reasoning effort; valid levels are model-dependent (see /models). In droid exec, -r maps to this flag. | droid exec -r high \"debug flaky test\" |\n--use-spec | Start in specification mode (plan before executing) | droid exec --use-spec \"add user profiles\" |\n--skip-permissions-unsafe | Skip all permission prompts; command blocks still apply (unsafe) | droid exec --skip-permissions-unsafe |\n--cwd <path> | Execute from a specific working directory (use an absolute path) | droid exec --cwd \"$PWD/service\" --auto medium \"run tests\" |\n--append-system-prompt <text> | Append custom text to the end of the system prompt | droid --append-system-prompt \"Always run tests.\" |\n--append-system-prompt-file <path> | Append the contents of a file to the end of the system prompt | droid --append-system-prompt-file .factory/system.md |\n"
          }
        ],
        "field": [
          {
            "id": "prompt",
            "label": "Prompt",
            "description": "Leave empty when reading the prompt from a file.",
            "type": "string",
            "position": 0,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "file",
            "label": "Prompt file",
            "type": "path",
            "option": [
              "--file",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "model",
            "label": "Model ID",
            "type": "string",
            "option": [
              "--model",
              "-m"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "auto",
            "label": "Autonomy level",
            "description": "Omit for read-only. Low allows safe edits, medium local development, high push and deploy.",
            "type": "enum",
            "option": [
              "--auto"
            ],
            "choices": [
              {
                "value": "low",
                "label": "Low (safe edits)"
              },
              {
                "value": "medium",
                "label": "Medium (local development)"
              },
              {
                "value": "high",
                "label": "High (CI/CD, push, deploy)"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "output_format",
            "label": "Output format",
            "type": "enum",
            "option": [
              "--output-format",
              "-o"
            ],
            "choices": [
              {
                "value": "text",
                "label": "Text"
              },
              {
                "value": "json",
                "label": "JSON"
              },
              {
                "value": "stream-json",
                "label": "Stream JSON"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "session_id",
            "label": "Continue session",
            "type": "string",
            "option": [
              "--session-id",
              "-s"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "cwd",
            "label": "Working directory",
            "type": "path",
            "option": [
              "--cwd"
            ],
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "reasoning_effort",
            "label": "Reasoning effort",
            "description": "Valid levels depend on the model.",
            "type": "string",
            "option": [
              "--reasoning-effort",
              "-r"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "use_spec",
            "label": "Plan first (spec mode)",
            "type": "boolean",
            "option": [
              "--use-spec"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "list_tools",
            "label": "List available tools",
            "type": "boolean",
            "option": [
              "--list-tools"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "skip_permissions",
            "label": "Skip all permission prompts",
            "description": "Unsafe: only in disposable sandboxes.",
            "type": "boolean",
            "option": [
              "--skip-permissions-unsafe"
            ],
            "effect": "exec",
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "review",
            "label": "Read-only analysis",
            "fields": [
              "prompt",
              "model",
              "output_format",
              "cwd"
            ],
            "required": [
              "prompt"
            ]
          },
          {
            "id": "edit",
            "label": "Make changes (medium autonomy)",
            "fields": [
              "prompt",
              "model",
              "auto",
              "cwd"
            ],
            "required": [
              "prompt"
            ],
            "set": {
              "auto": [
                "medium"
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "prompt",
              "file",
              "model",
              "auto",
              "output_format",
              "cwd"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "session_id",
              "reasoning_effort",
              "use_spec",
              "list_tools",
              "skip_permissions"
            ]
          }
        ]
      }
    ]
  }
}
