インストール & セットアップ
お好みのターミナルでDroid CLIをインストールして開始しましょう。初回認証
初回実行時には、オンボーディング画面が表示されます:- アカウントの作成またはログインを選択します
- ブラウザで認証コードを確認します
- ターミナルに戻って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 または exit | droidを終了 |
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 →
Spec Mode (Research & Plan Only)
Spec Mode (Research & Plan Only)
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
Low Mode (Read-Only + Safe Commands)
Low Mode (Read-Only + Safe Commands)
Allows reading files and executing low-risk, read-only commands.
- File reading
- Directory listing
- Safe diagnostic commands
- No modifications
Medium Mode (File Edits Allowed)
Medium Mode (File Edits Allowed)
Enables file modifications and medium-risk commands that are easily reversible.
- Create/edit/delete files
- Run build commands
- Execute tests
- Reversible operations
High Mode (All Commands with Safeguards)
High Mode (All Commands with Safeguards)
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
スラッシュコマンド
/を押してコマンドメニューにアクセスします。以下のオプションがあります:
- 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でモデルメニューにアクセス:
- 利用可能なモデルを表示
- 異なるタスクに応じてモデルを切り替え
- 該当する場合は推論レベルを設定
セッション管理
/sessionsでアクセス:
- すべての過去のセッションを表示
- 任意の過去のセッションにナビゲート
- 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
詳細設定
Droid Co-Author on PRs
Droid Co-Author on PRs
Droid Shield
Droid Shield
Protects environment variables and secrets in your code. Prevents accidental commits of sensitive information like API keys, passwords, and tokens.Learn more about Droid Shield →
Save Spec as Markdown
Save Spec as Markdown
Automatically saves specifications generated in Spec Mode as markdown files on your machine for reference and documentation.Learn more about Specification Mode →
Allow List & Deny List
Allow List & Deny List
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/フォルダにナビゲートします。
ディレクトリ構造
config.json - Bring Your Own Key
独自のAPIキーを使用してカスタムモデルを構成:Find Provider Documentation
Visit Bring Your Own Key documentation and select your provider (OpenRouter, Fireworks, etc.)
settings.json - 許可 & 拒否リスト
高自律モードで承認が必要なコマンドを構成:autoModeDenyリストのコマンドは常に実行前に明示的な承認が必要です。
mcp.json - MCP統合
MCPツールを個別に有効または無効にします:"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 →Choose Scope
Decide if the droid should be project-level (specific repository) or personal (available across all projects)
Generation Method
Choose to create manually or generate with droid’s help:Droid will generate an appropriate description and configuration
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)
使用例
- Code Review Droid - プルリクエストの自動コードレビュー
- Documentation Droid - ドキュメントの生成と保守
- Test Generation Droid - 包括的なテストスイートの作成
- Security Audit Droid - 脆弱性とセキュリティ問題のスキャン
MCP統合
Model Context Protocol (MCP)により、droidは外部ツールやデータソースと統合できます。CLI経由でのMCP追加
/mcp addコマンドを使用:
- Name: MCPの識別子
- Command: 実行可能コマンド(例:
npx、python) - Args: コマンド引数
- Environment Variables: APIキーと構成
構成済みMCPのリスト表示
After adding or modifying MCPs, you may need to restart the CLI for changes to take effect.
構成ファイル経由でのMCP追加
~/.factory/mcp.jsonを直接編集することもできます:
人気のMCP統合
- Brave Search - Web検索機能
- Playwright - ブラウザ自動化
- GitHub - リポジトリと課題管理
- Filesystem - 拡張ファイルシステムアクセス
- Postgres - データベースクエリ
- Slack - チームコミュニケーション
ワークフロー例:Specモードから実装まで
droidの機能を実演する完全なワークフローです:Review the Plan
Droid generates a detailed specification:
- Architecture decisions
- Files to create/modify
- Dependencies needed
- Implementation steps
Iterate on the Spec
Refine the plan before implementation:Droid updates the specification accordingly
まとめ
以下を学習しました:- Droid CLIのインストールと認証
- インターフェースのナビゲーションとキーボードショートカットの使用
- 自律モードの理解と切り替え
- 設定と設定の構成
- BYOKでカスタムモデルの追加
- カスタムdroid(サブエージェント)の作成と管理
- MCP経由での外部ツールの統合
- 実装前の計画のためのspecモードの使用
