← Catalog

@bacnh85/pi-init

Guided AGENTS.md generation for Pi — /init scans the repo (package.json, CI, dir structure) and generates/updates AGENTS.md with build/test/lint commands, architecture, and conventions. Inspired by OpenCode's /init.

Package

Install

Install with PiG

pig install npm:@bacnh85/pi-init

Install with Pi

pi install npm:@bacnh85/pi-init
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.7 (README.md). PiG does not review it.

pi-init

Guided AGENTS.md generation for Pi.

/init scans your repo (package.json, build configs, CI, directory structure), detects what's there, and generates or updates AGENTS.md with concise project-specific guidance: build/test/lint commands, tech stack, repository structure, and conventions. Inspired by OpenCode's /init. Zero dependencies, plain JS.

Install

pi install npm:@bacnh85/pi-init

Commands

CommandDescription
/initScan the repo and generate/update AGENTS.md (preserves existing content)
/init forceRegenerate AGENTS.md from scratch
/init checkReport detected commands and what's missing, without writing

If the repo has no AGENTS.md but does have a CLAUDE.md, /init targets CLAUDE.md as its write target (since 0.1.2).

What it does

  1. Repo introspection — reads package.json (scripts, deps, workspaces), detects package managers (npm/pnpm/yarn/bun), build systems (make/cargo/go/python/maven/gradle/cmake/elixir), CI configs (GitHub Actions, GitLab, CircleCI, etc.), and top-level directories.
  2. Prompt construction — builds a focused instruction covering the sections a context file needs, with real commands extracted from your scripts (never invented).
  3. Delegation — sends the prompt to the current model via pi.sendUserMessage(). The model uses Pi's existing read/write tools to produce AGENTS.md.

The model does the writing; this package only owns the scan and the prompt.

Why

Pi loads AGENTS.md at startup as project context. Starting a new project with a blank context file is friction — /init bootstraps it from what's actually in the repo.

License

MIT