init command creates the initial project structure for a new thepopebot agent or updates managed files in an existing project.
Usage
What It Does
New Projects
When run in an empty directory or non-thepopebot project,init scaffolds a complete agent project:
- Creates project structure — Copies template files from the npm package to your working directory
- Generates package.json — Sets up dependencies (thepopebot, Next.js, React, Tailwind CSS)
- Creates .env — Generates
AUTH_SECRETand setsTHEPOPEBOT_VERSION - Installs dependencies — Runs
npm install - Creates empty directories —
cron/,triggers/,logs/,tmp/,data/ - Activates default skills — Symlinks
browser-tools,llm-secrets,modify-selfintoskills/active/ - Creates skill links — Symlinks
.pi/skillsand.claude/skillstoskills/active/
init in a non-empty directory, you’ll be prompted to create a subdirectory:
Existing Projects
When run in an existing thepopebot project,init updates your files:
- Managed files (
.github/workflows/,docker/,docker-compose.yml, etc.) are auto-updated to match the package version - Your files (
config/SOUL.md,app/, etc.) are never overwritten - Template changes are reported if the package ships new defaults:
Managed vs User Files
thepopebot projects contain two types of files:Managed Files (Auto-Updated)
These infrastructure files stay in sync with the package version.init creates, updates, and deletes them to match the package exactly:
.github/workflows/— GitHub Actions workflowsdocker/— All Docker files (Dockerfiles, entrypoints, CLAUDE.md)docker-compose.yml— Container orchestration.dockerignore— Docker build exclusionsCLAUDE.md— AI assistant contextapp/— Next.js pages, layouts, and routes
User Files (Never Overwritten)
These files are yours to customize.init creates them once but never overwrites:
config/SOUL.md,JOB_PLANNING.md, etc. — Agent personality and promptsconfig/CRONS.json,TRIGGERS.json— Scheduled jobs and webhook triggersdocker/pi-coding-agent-job/— Job container Dockerfiletheme.css— Custom CSS (overridesapp/globals.css)
init reports it and lets you review:
Template File Convention
Files in the package’stemplates/ directory use a .template suffix for files that npm or AI tools would misinterpret:
In templates/ | Scaffolded as |
|---|---|
.gitignore.template | .gitignore |
CLAUDE.md.template | CLAUDE.md |
api/CLAUDE.md.template | api/CLAUDE.md |
init copies these files, it strips the .template suffix.
Flags
--no-managed
Skip auto-updating managed files. Use this if you’ve customized infrastructure files and don’t want init to overwrite your changes:
- Managed files are not updated
- New files are still created
- You’re responsible for manually syncing managed files when upgrading
Output Examples
First-Time Init
Upgrade (Managed Files Updated)
Template Changes Available
When to Run
Runinit when:
- Starting a new project — After
mkdir my-agent && cd my-agent - After upgrading — The
upgradecommand runsinitautomatically - Manually updating templates — If you want to sync managed files without upgrading
Next Steps
After runninginit on a new project: