projects

Project registry commands for managing the directories that PAI tracks. A registry is a list of known project paths and their status.

In plain words
What is it for?
Use them to list, open, add, inspect, archive, merge, or unregister project entries.
Why use it?
They help keep duplicate, temporary, archived, and active project entries organised without changing the project files themselves.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mnott/pai/projects
Clone the repo
git clone --depth 1 https://github.com/mnott/PAI
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03160
Opus 5 $0.00000 $0.01580
Sonnet 5 $0.00000 $0.00632
Haiku 4.5 $0.00000 $0.00316

Measured 2d ago against content hash d065faeb09bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

projects scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/projects.md · 426 lines

How it starts

The opening of the file, as written. The whole thing — 426 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pai projects

Manage registered projects (list, cd, add, info, ...)

Synopsis

pai projects <subcommand> [options]

Subcommands

Command Description
pai projects list Show the unified deduped listing (same as pai).
pai projects list-raw Raw registry listing with slug, path, status, last_active columns
pai projects cd <identifier> cd to a project directory. Short form: pai cd
pai projects add <path> Register a project directory in the PAI registry
pai projects info <slug> Show full details for a project
pai projects archive <slug> Archive a project
pai projects merge <from> <into> Fold a duplicate project into another: move its sessions (renumbered), repoint its tags, aliases, compaction records and links, keep the old slug as an alias, then delete the row. Preview unless --execute is given.
pai projects unregister <slug> Remove a project row entirely, for paths that should never have been registered (worktrees, temp dirs). Refuses when the row holds sessions — merge those first. Preview unless --execute is given. The directory itself is never touched.
pai projects unarchive <slug> Restore an archived project to active status
pai projects move <slug> <new-path> Update the root path for a project
pai projects rebind <slug> <new-path> Manually update the root_path for a project (for when auto-detect found multiple matches).
pai projects here <name> Declare that the CURRENT directory is this project — no slug, no path.
pai projects tag <slug> <tags...> Add one or more tags to a project
pai projects alias <slug> <alias> Register an alternative slug for a project
pai projects edit <slug> Edit project metadata
pai projects detect [path] Detect which registered project the given path (or CWD) belongs to
pai projects health Audit all registered projects: check which paths still exist, find moved/dead projects
pai projects consolidate <identifier> Consolidate scattered ~/.claude/projects/.../Notes/ directories for a project into its canonical Notes/ location
pai projects promote Promote a session note into a new standalone project
pai projects go <query> Print the root path for a project by slug, partial name, or fuzzy match.
pai projects name <identifier> <shortname> Give a project a short name for quick access
pai projects unname <shortname> Remove a project's short name
pai projects names List named projects (your curated shortlist)
pai projects config [identifier] View or modify session launch config for a project.

Read the full file on GitHub · 426 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 426 lines · 0 tokens per session scan A d065faeb09bd

Subscribe to this mod's changes

projects is a command published in the GitHub repository mnott/PAI (45 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,160 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.