@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
1.0.3
Published
Sep 7, 2026
Downloads
3,127/mo · 565/wk
Author
henrywang
License
MIT
Types
extension
Size
26.9 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/add-dir.ts"
  ],
  "image": "https://raw.githubusercontent.com/HenryQW/pi-harness/main/extensions/pi-add-dir/example.png"
}

Security note

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

README

@henryqw/pi-add-dir

Give the current Pi session context, skills, and searchable files from directories outside the workspace. Reuse those resources in place without copying or linking their directories.

Pi using added external directories by name

Install

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

Use

Run /dir-add, enter a directory, then run /dir-ls. Pi lists the directory and exposes its supported resources.

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 give Pi these resources:

  • Root AGENTS.md, CLAUDE.md, .pi/AGENTS.md, and .pi/CLAUDE.md files. Pi injects them into later prompts.
  • Skills that Pi loads from .pi/skills, .agents/skills, and .claude/skills.
  • Files in the editor's @ autocomplete, with absolute paths.

/dir-add reloads when it finds skills. add_directory reports when a reload is needed.

Limits and recovery

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