diff (compare) and reset (restore).
Template System Overview
When you runnpx thepopebot init, the package copies template files from node_modules/thepopebot/templates/ to your project directory.
Template files fall into two categories:
- Managed files — Auto-updated by
initto match the package version (.github/workflows/,docker/, etc.) - User files — Never overwritten, but you’re notified when new templates are available (
config/SOUL.md,app/, etc.)
Template File Convention
Files ending in.template are scaffolded with the suffix stripped:
In templates/ | Scaffolded as |
|---|---|
.gitignore.template | .gitignore |
CLAUDE.md.template | CLAUDE.md |
api/CLAUDE.md.template | api/CLAUDE.md |
.gitignore and keeps AI tools from picking up CLAUDE.md as real project docs.
diff
Compare your project files to the package templates. Shows which files differ and displays unified diff output.Usage
List All Differences
Compare Specific File
git diff --no-index for colored output):
Why Files Differ
Files can differ for two reasons:- You edited them — You customized
config/SOUL.mdto change your agent’s personality - thepopebot updated — A new package version ships updated templates
diff to review changes before accepting updates with reset.
reset
Restore a file to the package default template. Overwrites your existing file.Usage
List Available Templates
Reset Specific File
diff first to review what you’ll lose.
Reset Directory
Workflow: Review and Apply Updates
After upgrading,init reports template changes:
Step 1: Review Changes
Step 2: Decide
- Keep your version: Do nothing. Your file stays as-is.
- Accept the update: Run
reset. - Merge manually: Copy the change from the diff into your file.
Step 3: Apply Update (If Desired)
Managed Paths
Managed files are auto-updated byinit. You don’t need to run diff or reset for them — init handles it.
Managed paths (from bin/managed-paths.js):
.github/workflows/docker/docker-compose.yml.dockerignoreCLAUDE.mdapp/
--no-managed during init to prevent overwrites:
diff and reset.
Example: Restore Default Personality
You customizedconfig/SOUL.md but want to revert to the default:
Example: Sync Docker Files After Upgrade
After upgrading, you want to update the job container Dockerfile to match the new template:docker/event-handler/ is managed and auto-synced by init. You don’t need to reset it manually.
Example: Create Missing File
You deletedconfig/TRIGGERS.json and want to restore it:
Template Not Found Error
If you try to reset a file that doesn’t exist in the package templates:npx thepopebot reset (no arguments) to list all available templates.
Comparing Managed Files
You can usediff to compare managed files, even though init auto-updates them:
--no-managed and want to see what changed.
Git Integration
Thediff command uses git diff --no-index for colored output. If git is not available, it falls back to plain diff.
The output format is the same as git diff:
- Lines starting with
-were removed (your version) - Lines starting with
+were added (template version) - Context lines (no prefix) are unchanged
When to Use diff and reset
Use diff When:
- You want to review template changes after upgrading
- You’re debugging configuration issues and want to compare your file to the default
- You customized a file and forgot what you changed
Use reset When:
- You want to accept a template update
- You broke a config file and want to start over
- You deleted a file and want to restore it
Don’t Use reset If:
- You’ve customized a user file and want to keep your changes — manually merge instead
- The file is managed —
inithandles it automatically