Skip to content
FunCoding

Search

Search docs, agents, posts, Skills and MCP servers

Droid 快速上手:安装、登录和第一次可审查的改动

安装 Droid CLI、登录 Factory,先让它读懂代码库,再完成一次小而可验证的改动,并熟悉模式切换等日常操作。

安装

方式命令
macOS / Linuxcurl -fsSL https://app.factory.ai/cli | sh
Homebrewbrew install --cask droid
Windowsirm https://app.factory.ai/cli/windows | iex
npmnpm install -g droid

Linux 用户需要先装好 xdg-utils:

sudo apt-get install xdg-utils

启动并登录

在项目目录里运行:

cd /path/to/your/project
droid

会进入全屏的终端界面。首次启动会提示在浏览器里登录 Factory 账号。

建议在 Git 仓库里使用,这样才能体验完整的「提议、审查、提交」流程。

第一步:让它读懂代码库

先别急着改东西,让它把项目摸一遍:

> analyze this codebase and explain the overall architecture
> where are the main entry points, test commands, and code conventions?

它会读取需要的文件,总结架构,并找出改动前应该跑的检查命令。

第二步:一次小的、可验证的改动

> add structured logging to the app entry point and replace the existing console calls

Droid 的处理顺序是:

  1. 检查当前实现
  2. 任务需要时先给出计划
  3. 展示确切的 diff
  4. 等你批准后才修改
  5. 按要求跑相关的校验

审查 diff、跑过测试再接受。这个「提议、批准」的循环,是把更多工作交给它时仍然保持掌控的关键。

第三步:Git 操作

> review my uncommitted changes and suggest improvements before I commit
> create a well-structured commit with a descriptive message following our team conventions

日常操作

操作方法
发送消息输入后按 Enter
多行输入Shift+Enter 换行
切换模式Shift+Tab
Bash 模式(直接执行命令,不经过 AI)输入框为空时按 !,按 Esc 返回
查看完整记录Ctrl+O
选择模型/model
查看费用/cost

接下来

  • 多步骤的功能用 Specification Mode,先出计划再实现
  • 重复性的流程放进 Droid Exec,用于脚本、CI 和定时任务
  • 想用自己的 Key 接入其他模型,看官方文档