@factory/cli

中文文档
1.12.1发布于 2026/11/14UNLICENSEDCommonJS零依赖近 30 天下载 11.6万

Factory Droid CLI - AI-powered software engineering agent

原始使用文档
文档目录5 节
  1. Installation
  2. What droid brings to your workflow
  3. Why teams choose Factory
  4. Documentation
  5. Full Documentation Index

@factory/cli

The power of Factory in your terminal

Installation

npm install -g @factory/cli

If the droid command is not found after installing, your npm global bin directory may not be in your PATH. Run the following to fix it:

# For zsh (macOS default)
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

# For bash (Linux)
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

# For bash (macOS)
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile

# For fish
echo 'fish_add_path "$(npm prefix -g)/bin"' >> ~/.config/fish/config.fish && source ~/.config/fish/config.fish

On Windows, run in PowerShell:

[Environment]::SetEnvironmentVariable('Path', $env:PATH + ';' + (npm prefix -g), 'User')

Then restart your terminal.

Then navigate to your project and start the droid CLI:

cd /path/to/your/project
droid

You're now connected to Factory's development agent from your terminal.

Quick tip: Press ! to toggle bash mode and run shell commands directly without AI interpretation. Press Esc to return to normal mode.

What droid brings to your workflow

  • End-to-end feature development: From planning to implementation to testing - droid handles the complete development lifecycle while keeping you in control through transparent review workflows.
  • Deep codebase understanding: Leverages your organization's shared knowledge across repositories, documentation, and issue tracking to provide contextually aware assistance that improves over time.
  • Engineering system integration: Connects directly to your existing tools — with native integrations to Jira, Notion, Slack, and many more tools — so development work stays synchronized with your team's processes.
  • Production-ready automation: Deploy the same workflows locally during development or in CI/CD pipelines, with enterprise security and compliance built-in from day one.

Why teams choose Factory

  • Built for enterprise: On-premise deployment options, SOC-2 compliance, and air-gapped environments.
  • Your tools, enhanced: Works within your existing terminal, IDE, and development environment.
  • Transparent and controllable: Every decision droid makes is visible and reviewable. You maintain full oversight of code changes with our native diff viewer and approval workflows.
  • Model flexibility: Not locked into a single AI provider. Factory allows you to route tasks to the best model for each job while maintaining consistent behavior and memory across your organization.

Documentation

Full Documentation Index

Fetch the complete documentation index at: https://docs.factory.ai/llms.txt

版本与发布记录

@factory/cli 共发布 283 个版本,首次发布于 2025/08/08;过去 12 个月发布了 280 个版本。

版本发布日期距今
1.12.1latest2026/11/14今天
1.12.02026/11/14今天
1.11.02026/11/14今天
1.10.12026/11/14今天
1.10.02026/11/131 天前
1.9.12026/11/131 天前

关于 @factory/cli 的常见问题

@factory/cli 是什么?

Factory Droid CLI - AI-powered software engineering agent

如何安装 @factory/cli?

在项目目录运行 npm install @factory/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 droid,可以用 npx droid 直接运行。

@factory/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/factory__cli 是否存在。

@factory/cli 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@factory/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@factory/cli 可以商用吗?

@factory/cli 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@factory/cli 的下载量有多少?

根据 npm 官方下载统计,@factory/cli 在 2026/10/14 – 2026/11/12 这 30 天内被下载 115,956 次,日均约 3,865 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@factory/cli 还在维护吗?

最新版本 1.12.1 发布于 2026/11/14(今天);至今共发布 283 个版本,其中过去 12 个月发布了 280 个;首次发布于 2025/08/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。