No description
- TypeScript 77.7%
- JavaScript 17.6%
- Shell 4.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
pi discovers extensions/ by convention when no pi manifest is present; these packages have no runtime dependencies, so npm install was pure overhead and broke startup on machines without npm. |
||
| .codestable | ||
| extensions/add-dir | ||
| tests | ||
| .gitignore | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
add-dir
pi extension:一个项目多目录。安装:pi install git:github.com/P02-1010751281/pi-add-dir@v0.1.1(源码 extensions/add-dir/)。本包无 package.json(pi 按约定目录 extensions/ 自动发现),git 安装不依赖 npm;不要再加回。
Pi extension for multi-directory projects. The user adds directories; the
extension injects each one's AGENTS.override.md / AGENTS.md / CLAUDE.md
into the system prompt and tells the agent the directories belong to one project.
Usage
/add-dir <path> # add (absolute, relative to cwd, or ~/...)
/add-dir list # show added directories
/add-dir rm <path> # remove
Tab completion works for list, rm, and filesystem paths.
The model can also call the add_dir tool when you explicitly ask it to.
Storage
~/.pi/agent/added-dirs.json, keyed by project root (nearest ancestor with a
.git directory, else the current directory):
{ "/home/user/proj": ["/home/user/libA", "/home/user/libB"] }
Override the store location for testing with PI_ADD_DIR_STORE=/path/to/file.json.
Notes
- Content is rebuilt on every turn (
before_agent_start), so edits to an added directory's AGENTS.md apply from the next message — no restart needed. - Ancestors of the cwd are skipped: pi already loads their context files while walking up from the cwd.
- Built-in tools already accept absolute paths; this extension only fixes the context/awareness side of multi-directory work.