メインコンテンツへスキップ

インストール & セットアップ

お好みのターミナルでDroid CLIをインストールして開始しましょう。
curl -fsSL https://app.factory.ai/cli | sh
インストールを確認します:
which droid
Droid CLIを開始します:
cd /path/to/your/project
droid

初回認証

初回実行時には、オンボーディング画面が表示されます:
  1. アカウントの作成またはログインを選択します
  2. ブラウザで認証コードを確認します
  3. ターミナルに戻ってdroidの使用を開始します

インターフェース & ショートカット

ヘルプメニュー

Shift + ?を押してヘルプメニューを開きます。表示される内容:
  • メッセージの送信方法と改行の作成方法
  • 利用可能なキーボードショートカット
  • 基本的なナビゲーションコマンド
  • 自律モードオプション
Terminal-specific key bindings: The default for new lines is \ + Enter, but you can configure this to Shift + Enter or other combinations based on your terminal’s key bindings. Check /terminal-setup in the CLI for configuration options.

基本的なキーボードショートカット

ショートカットアクション
Enterメッセージを送信
\ + Enter (または Shift + Enter)メッセージ内で改行
Esc (ダブルタップ)現在の入力をクリア
Shift + ?ヘルプメニューを開く
Shift + Tab自律モードを切り替え
/コマンドメニューを開く
Cmd + Shift + Hルートディレクトリを表示
Cmd + Shift + .隠しファイル/フォルダを表示
Ctrl + C または exitdroidを終了
Ctrl + V画像を貼り付け
The paste image shortcut works across all terminals, though the specific key binding may vary based on your terminal configuration.

自律モード

Shift + Tabを押して異なる自律レベルを切り替えます: Learn more about Specification Mode →
Droid will research and create a plan without making any changes. Perfect for understanding what will happen before execution.
  • No file edits
  • No command execution
  • Creates detailed specifications
  • Allows iteration on plans before proceeding
Allows reading files and executing low-risk, read-only commands.
  • File reading
  • Directory listing
  • Safe diagnostic commands
  • No modifications
Enables file modifications and medium-risk commands that are easily reversible.
  • Create/edit/delete files
  • Run build commands
  • Execute tests
  • Reversible operations
Allows all commands but still maintains safety through allow/deny lists.
  • Full command execution
  • File removal operations (with confirmation)
  • Git operations
  • Configurable via allow/deny lists
Even in High mode, certain dangerous operations (like removing files) will always require your approval unless you explicitly configure them in the allow list.
Configure autonomy settings →

スラッシュコマンド

/を押してコマンドメニューにアクセスします。以下のオプションがあります:
  • Account & Billing - Factoryアカウントを管理
  • Model - AIモデルの切り替えと推論レベルの設定
  • Sessions - 過去のセッションの表示とナビゲーション
  • Settings - CLI設定の構成
  • Terminal Setup - キーバインドの構成
  • Custom Commands - custom slash commandsにアクセス
  • Droids - custom sub-agentsの管理
  • MCP - Model Context Protocol integrationsの構成

モデルの切り替え

/modelでモデルメニューにアクセス:
  1. 利用可能なモデルを表示
  2. 異なるタスクに応じてモデルを切り替え
  3. 該当する場合は推論レベルを設定
Different models excel at different tasks. Use reasoning models for complex planning and faster models for routine edits.
Learn about choosing your model →

セッション管理

/sessionsでアクセス:
  • すべての過去のセッションを表示
  • 任意の過去のセッションにナビゲート
  • Webインターフェースでセッションを開く
  • 中断したところから作業を続行
セッションがWebインターフェースに表示されるには、設定でクラウド同期が有効になっている必要があります。

設定 & 構成

/settingsで設定にアクセスし、エクスペリエンスをカスタマイズできます: Full settings documentation →

コア設定

Model & Reasoning

Choose your default model and reasoning level for new sessions

Diff Mode

Configure how code changes are displayed

GitHub Completion

Enable/disable GitHub Copilot-style completions

Cloud Sync

Sync sessions to Factory web platform

詳細設定

When enabled, droid will be added as a co-author on pull requests it helps create. You can disable this if you prefer to be the sole author.
Protects environment variables and secrets in your code. Prevents accidental commits of sensitive information like API keys, passwords, and tokens.
Keep this enabled to protect against security vulnerabilities.
Learn more about Droid Shield →
Automatically saves specifications generated in Spec Mode as markdown files on your machine for reference and documentation.Learn more about Specification Mode →
Configure which commands require approval even in High autonomy mode. Even on High, file removal operations require confirmation by default.Learn more about auto-run settings →

IDE統合

設定メニューから直接VS Code、Cursor、その他のIDEのdroidエクステンションをインストールできます。 Learn more about IDE integration →

構成ファイル

Cmd + Shift + Hを押してルートディレクトリを表示し、次にCmd + Shift + .を押して隠しファイルを表示して構成ディレクトリにアクセスします。~/.factory/フォルダにナビゲートします。

ディレクトリ構造

~/.factory/
├── config.json          # Model configuration and BYOK
├── settings.json        # CLI settings and allow/deny lists
├── mcp.json            # MCP integrations
├── droids/             # Custom sub-agents
├── commands/           # Custom slash commands
├── logs/               # Session logs
└── bug-reports/        # Crash reports

config.json - Bring Your Own Key

独自のAPIキーを使用してカスタムモデルを構成:
{
  "models": [
    {
      "provider": "openrouter",
      "name": "anthropic/claude-3.5-sonnet",
      "apiKey": "your-api-key-here",
      "displayName": "Claude 3.5 Sonnet (OpenRouter)"
    }
  ]
}
1

Find Provider Documentation

Visit Bring Your Own Key documentation and select your provider (OpenRouter, Fireworks, etc.)
2

Copy Configuration Template

Copy the JSON configuration for your chosen provider
3

Add to config.json

Paste the configuration into ~/.factory/config.json and add your API key
4

Select Model

Use /model in the CLI to select your newly added model
See all BYOK providers →

settings.json - 許可 & 拒否リスト

高自律モードで承認が必要なコマンドを構成:
{
  "autoModeAllow": [],
  "autoModeDeny": [
    "git push",
    "rm -rf",
    "npm publish"
  ]
}
高モードでも、autoModeDenyリストのコマンドは常に実行前に明示的な承認が必要です。

mcp.json - MCP統合

MCPツールを個別に有効または無効にします:
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "your-api-key"
      }
    },
    "playwright": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-playwright"],
      "disabled": true
    }
  }
}
"disabled": trueを設定して、構成を削除せずに一時的にMCPを無効にできます。 Learn more about MCP configuration →

カスタムDroid(サブエージェント)

カスタムdroidは特定のタスクを処理する専門的なAIエージェントです。/droidsでdroidメニューにアクセス:

Droidの管理

  • Import (i) - 他のエージェントからビルド済みdroidをインポート
  • Create (c) - 新しいカスタムdroidを作成
  • Edit - 既存のdroid構成を変更
  • Enable/Disable - droidのオン/オフを切り替え

カスタムDroidの作成

Learn more about custom droids →
1

Choose Scope

Decide if the droid should be project-level (specific repository) or personal (available across all projects)
2

Generation Method

Choose to create manually or generate with droid’s help:
I want a code review droid that checks for security issues and coding standards
Droid will generate an appropriate description and configuration
3

Configure Model

  • Inherit: Use the same model as the parent session
  • Specific Model: Choose a dedicated model for this droid (e.g., use a reasoning model for complex analysis)
4

Enable Tools

Select which tools and capabilities the droid should have access to
5

Save & Edit

Confirm the configuration and optionally edit the details

使用例

  • Code Review Droid - プルリクエストの自動コードレビュー
  • Documentation Droid - ドキュメントの生成と保守
  • Test Generation Droid - 包括的なテストスイートの作成
  • Security Audit Droid - 脆弱性とセキュリティ問題のスキャン

MCP統合

Model Context Protocol (MCP)により、droidは外部ツールやデータソースと統合できます。

CLI経由でのMCP追加

/mcp addコマンドを使用:
/mcp add
次にMCPの詳細を提供:
  • Name: MCPの識別子
  • Command: 実行可能コマンド(例:npxpython
  • Args: コマンド引数
  • Environment Variables: APIキーと構成

構成済みMCPのリスト表示

/mcp list
これにより、すべての構成済みMCPとそれらの有効/無効ステータスが表示されます。
After adding or modifying MCPs, you may need to restart the CLI for changes to take effect.

構成ファイル経由でのMCP追加

~/.factory/mcp.jsonを直接編集することもできます:
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/directory"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

人気のMCP統合

  • Brave Search - Web検索機能
  • Playwright - ブラウザ自動化
  • GitHub - リポジトリと課題管理
  • Filesystem - 拡張ファイルシステムアクセス
  • Postgres - データベースクエリ
  • Slack - チームコミュニケーション
Browse all MCP servers →

ワークフロー例:Specモードから実装まで

droidの機能を実演する完全なワークフローです:
1

Start in Spec Mode

Press Shift + Tab until you’re in Spec mode
Create an authentication system with GitHub and Google OAuth
2

Review the Plan

Droid generates a detailed specification:
  • Architecture decisions
  • Files to create/modify
  • Dependencies needed
  • Implementation steps
3

Iterate on the Spec

Refine the plan before implementation:
Change the plan to only include Github auth and not Google auth
Droid updates the specification accordingly
4

Approve and Proceed

Once satisfied with the plan, proceed with High mode to implement
5

Review Changes

Droid shows exactly what will change and waits for your approval
Spec mode is especially powerful for complex features. It allows you to validate the approach before any code is written.
Read the full Specification Mode guide → Learn about implementing large features →

まとめ

以下を学習しました:
  • Droid CLIのインストールと認証
  • インターフェースのナビゲーションとキーボードショートカットの使用
  • 自律モードの理解と切り替え
  • 設定と設定の構成
  • BYOKでカスタムモデルの追加
  • カスタムdroid(サブエージェント)の作成と管理
  • MCP経由での外部ツールの統合
  • 実装前の計画のためのspecモードの使用

次のステップ