@henryqw/pi-add-dir

Add external directories to a Pi session with context, skills, and file search.

Packages

Package details

extension

Install @henryqw/pi-add-dir from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@henryqw/pi-add-dir
Package
@henryqw/pi-add-dir
Version
0.1.11
Published
Aug 27, 2026
Downloads
1,519/mo · 1,043/wk
Author
henrywang
License
MIT
Types
extension
Size
24 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/add-dir.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@henryqw/pi-add-dir

Add external directories to the current Pi session: inject context files, load skills, and search those trees.

Why

  • Created for: Extending Pi context and skill discovery beyond the current working directory.
  • Advantage: Inject files and load skills from external trees without copying them into the repo.

Install

pi install npm:@henryqw/pi-add-dir

Use

Surface Type Purpose
/dir-add command Add directory; no path opens input. Supports ~.
/dir-ls command List directories; select one to remove.
/dir-reload command Reload external directory resources.
add_directory tool Add a directory.
search_external_files tool Glob-search added directories.

Added directories return root AGENTS.md, CLAUDE.md, .pi/AGENTS.md, and .pi/CLAUDE.md, and inject them into later prompts. Skills load from .pi/skills, .agents/skills, and .claude/skills. /dir-add reloads when it finds skills; add_directory reports when a reload is needed.

Search uses Node filesystem traversal, skips .git and node_modules, supports basename and relative-path globs, and caps results at 1,000 per call.

State

Pi session entry add-dir:state stores added directories; package-managed, do not edit. Tree navigation restores the active branch's directories and reloads resources when that set changes.