AGENTS.md@packages/cli · git:20261011.f886e12 · 2026-10-11 · sha256 2a42aa25dce7f1aa
AGENTS.md@packages/cli git:20261011.f886e12A
Immutable. This exact content never changes and is served at /api/v1/blob/2a42aa25dce7f1aa.
# @shadowclone/cli The `shadowclone` command. It parses commands, calls the other packages, and builds the one package that goes to npm. <!-- package-facts:start --> (generated by `bun run guides`; do not edit by hand) - Package name: `@shadowclone/cli` - Workspace dependencies: `@shadowclone/agents`, `@shadowclone/builds`, `@shadowclone/changes`, `@shadowclone/cloud`, `@shadowclone/core`, `@shadowclone/environment`, `@shadowclone/harness`, `@shadowclone/learning`, `@shadowclone/mcp`, `@shadowclone/profile`, `@shadowclone/redact`, `@shadowclone/review`, `@shadowclone/sessions`, `@shadowclone/skills`, `@shadowclone/web` - External dependencies: `@anthropic-ai/sandbox-runtime`, `bun`, `commander`, `smol-toml`, `zod` - Export subpaths: `.` <!-- package-facts:end --> ## Owns - `bin/shadowclone.mjs`: the `bin` entry. It runs `dist/shadowclone.js` with Bun. - `src/main.ts`: the command router and the usage text. Each command has its own file, such as `init.ts`, `learn.ts`, `review.ts`, and `forget.ts`. - `scripts/build.ts`: bundles the workspace packages into `dist/`. - `scripts/stage.ts` and `publishedManifest.ts`: write the publishable package to `out/package`. ## Rules - This is the only package that goes to npm. Other packages stay private. - `publishedManifest` copies a fixed list of fields. It drops every `workspace:` dependency. - The build fails when the bundle contains a path of the build machine. - The bundle keeps `@anthropic-ai/sandbox-runtime` external. The published manifest retains its pinned dependency so installed packages include native sandbox helpers. - Product name and version come from `@shadowclone/core/product.json`. Workspace manifests have no version. - `forget --all` stops while task worktrees from earlier versions remain. - Error text passes through `redactSecrets` before it prints. - Update the usage text in `src/main.ts` and `docs/guides/commands.md` when you add a command. ## Tests Run `bun test` in this folder, or `bun test packages/cli` from the root. Many tests create a synthetic home folder and run `git`. The `scripts/` tests check the bundle and the staged package. Update this file in the same commit when you change the package purpose, public exports, dependencies, or a rule above.