@buyong/pi-codex

中文文档
0.6.4发布于 2026/11/07Apache-2.0ES Module构建来源已验证近 30 天下载 2360

Codex bundle for Pi: installs automatic approval review, Computer Use, Fast mode, image generation, and memory together.

原始使用文档
文档目录8 节
  1. Before installing
  2. Install a published release
  3. Switch from individual packages
  4. Confirm setup before running feature tasks
  5. Protected startup is a separate choice
  6. Build and load from source
  7. Package contents and release order (maintainers)
  8. License

@buyong/pi-codex

English | 한국어

Install automatic approval review, Computer Use and Browser Use, OpenAI Fast mode, image generation, and memory v2 in one Pi package. The bundle includes the five individual Codex extensions (@buyong/pi-codex-auto-review, @buyong/pi-codex-computer-use, @buyong/pi-codex-fast-mode, @buyong/pi-codex-image-gen, and @buyong/pi-codex-memory) and the imagegen skill; each component keeps its own commands and settings.

Use the bundle when you want several of these features together. If you need only one, use its individual package guide below. The bundle adds no separate automation or approval engine and does not supply Codex Desktop or account access.

Before installing

  • Node.js 22.19 or later and a configured Pi conversation provider/model.
  • Pi 1.4.0 or later for the complete bundle. Memory uses Pi 1.4.0 APIs; the other components retain their own compatibility requirements.
  • The feature-specific requirements in the table. You can leave unused features off.
FeatureAdditional requirementInitial state without saved settings
Automatic reviewModel access for automatic review, or user confirmation for calls needing approvalApprove for me; not an OS sandbox
Computer UseInstalled Codex Desktop runtime; Browser Use in Chrome also needs the ChatGPT Chrome extension and its native messaging host. Checked live on macOS; Windows is unverified; Linux is unsupported.Computer Use and Browser Use both on, so the extension can start the Desktop runtime; turn them off with /computer-use
Fast modeAn openai or openai-codex model in Fast mode's allowlist; Ultrafast has extra authentication and endpoint requirementsStandard; no acceleration selected
Image generationPi's openai-codex subscription loginTool and skill hidden without login
Memory v2Pi 1.4.0; explicitly selected extraction/consolidation modelsRepository-scoped recall, shared across its worktrees; generation off until enabled in /codex-memory

Do not enable the bundle alongside the same individual extensions. Tools, commands, and event handlers can register twice. If those packages are already installed, follow migration before loading the bundle.

Install a published release

pi install npm:@buyong/pi-codex
pi list
pi

pi list shows npm:@buyong/pi-codex and its installed path under User packages:. pi then starts a session with the bundle loaded; continue with Confirm setup before running feature tasks.

An unversioned source selects the latest published release; append @<version> to pin one. To install for the current project only, add --local (pi install --local npm:@buyong/pi-codex); this requires project trust, and pi list shows the entry under Project packages:. The version in a repository checkout may not be on npm yet. To run unreleased changes, build and load from source.

Switch from individual packages

  1. Run pi list and find any of the five individual packages listed above in global or project settings.
  2. Remove those entries with pi remove <source>, or pi remove --local <source> for a project entry.
  3. Install the bundle in the intended scope and restart Pi.

Use the sources reported by pi list, not a guessed version string. Component settings paths do not change, so existing preferences remain available after switching.

Confirm setup before running feature tasks

Inside Pi, configure conversation access with /login if needed. Then run /approve and choose Approve for me or Ask for approval. To try a bounded approval-review task, send:

Use bash to run exactly node --version and report the result. Do not install anything or change files.

Under the default policy, the command requires review. A successful run reports the installed Node.js version; custom rules and saved approvals can change the route. Automatic review makes additional model calls.

Configure other features separately:

GoalEntry pointWhat to do and check
Operate apps or Chrome/computer-use-check, then /computer-useResolve missing prerequisites and keep on only the features you need: Computer Use, Browser Use, or both (both are on initially). A connected runtime exposes mcp__cua_repl__js; runtime approval governs app/origin access.
Request a faster service tier/codex-fast, then /codex-fast statusSelect a tier, then check both the selected tier and whether it is active for the current model. The status shows the tier added to the last request, which does not confirm how the server processed or billed it.
Generate an image/login openai-codex, then /codex-imagenSign in, choose an image model, and ask Pi to use image_gen. The result includes the image. The extension also tries to save a PNG under <agentDir>/generated_images/; a failed save does not remove the image from the result.

If you do not use Computer Use, turn off both Computer Use and Browser Use in /computer-use. Choosing a service tier or image model does not switch the conversation model; tier activation still depends on the conversation model's compatibility. Existing saved preferences override the initial states in the Before installing table.

Use /codex-memory to manage notes, choose models and budgets, and enable background memory generation. /codex-memory status does not call a model. Use repositories to manage explicitly confirmed reads of other repositories, and legacy to selectively import old cwd memories; neither automatically merges scopes. Generation sends masked session copies to the selected providers and uses their billing or subscription quotas.

The component guides also cover /approve-model, /approve retry, the /codex-fast subcommands, settings files, and failures. Follow them before granting persistent app permissions or using a paid service tier.

Protected startup is a separate choice

Normal Pi extension discovery can continue after an extension fails to load. Installing the bundle is therefore not a guarantee that execution starts with approval controls ready.

If that guarantee is required, use the automatic-review guarded CLI or SDK. It already includes automatic review and disables extension discovery. Load the other components you need one by one with its --extension option (SDK: trustedExtensionPaths), passing each component's entry file inside the bundle, such as <bundle path>/node_modules/@buyong/pi-codex-fast-mode/dist/index.js; pi list shows the bundle path. Do not pass the whole bundle, because that loads a second automatic-review extension. Approved commands still run with host permissions, not an OS sandbox.

Build and load from source

Run from the pi-packages repository root:

pnpm install
pnpm --filter "@buyong/pi-codex..." build
pi -ne -e ./apps/pi-codex

The build first builds the components, then stages their publishable files and runtime dependencies inside the bundle. -ne disables automatic extension discovery, and -e loads this package for this run only, without saving it to Pi's settings. Desktop prerequisites and subscription login still apply.

Rebuild after changing a component: the bundle loads its staged copies, not the component source directories.

Package contents and release order (maintainers)

The manifest lists the five extensions as workspace:* dependencies and packages them through bundleDependencies; packing writes their workspace versions. pi.extensions and pi.skills point to their original entry points and skill directory. Development dependencies, Pi hosts, and the private Codex runtime are excluded.

Release changed components first, then the bundle. The bundle packs each component from this repository at the bundle's release tag, so an unreleased component change would ship inside the bundle under that component's current version. See the repository release process for releases and package-specific Trusted Publishing.

License

Apache-2.0, included as LICENSE in the npm archive. Included dependencies retain their own licenses and attribution notices.

版本与发布记录

@buyong/pi-codex 共发布 15 个版本,首次发布于 2026/10/06;过去 12 个月发布了 15 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.6.4latest2026/11/072 天前
0.6.32026/11/062 天前
0.6.22026/11/026 天前
0.6.12026/11/026 天前
0.6.02026/10/2910 天前
0.5.02026/10/2811 天前

关于 @buyong/pi-codex 的常见问题

@buyong/pi-codex 是什么?

Codex bundle for Pi: installs automatic approval review, Computer Use, Fast mode, image generation, and memory together.

如何安装 @buyong/pi-codex?

在项目目录运行 npm install @buyong/pi-codex,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@earendil-works/pi-ai(*)、@earendil-works/pi-tui(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@buyong/pi-codex 支持 TypeScript 吗?

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

@buyong/pi-codex 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@buyong/pi-codex 需要什么版本的 Node.js?

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

@buyong/pi-codex 可以商用吗?

@buyong/pi-codex 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@buyong/pi-codex 的下载量有多少?

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

@buyong/pi-codex 还在维护吗?

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