-
Notifications
You must be signed in to change notification settings - Fork 568
Description
Installation Script Fails - Comprehensive Fix Provided
Summary
The CCPM installation process has multiple critical issues that prevent successful installation and usage. This issue documents all problems and provides a complete working solution.
Problems Identified
1. Installation URL Returns HTML (Issues #966, #961)
Problem: The official installation command fails:
curl -sSL https://automaze.io/ccpm/install | bashError:
bash: line 8: syntax error near unexpected token `newline'
bash: line 8: `<!DOCTYPE html>'
curl: (56) Failure writing output to destination
Root Cause: The URL returns an HTML page instead of the bash script.
2. Incorrect Directory Structure (Related to Issue #971)
Problem: The current install/ccpm.sh script clones into the current directory without organizing files correctly.
What happens:
- Files are placed in project root or incorrectly in
.claude/ - Command files reference
ccpm/scripts/pm/*.shbut scripts are in wrong location - Slash commands fail to work
Root Cause: Script doesn't understand CCPM's required directory structure.
3. Slash Commands Not Recognized (Issue #971)
Problem: Even with correct installation, slash commands don't work.
Root Cause: Claude Code must be restarted after installation to load commands from .claude/commands/, but this is not documented.
Required Directory Structure
For CCPM to work correctly, this structure is required:
project/
├── .claude/
│ ├── commands/ ← Command definitions (loaded by Claude Code)
│ │ ├── pm/*.md ← /pm:* slash commands
│ │ ├── context/*.md ← /context:* commands
│ │ └── testing/*.md ← /testing:* commands
│ ├── ccpm/ ← CCPM implementation
│ │ ├── scripts/
│ │ │ └── pm/*.sh ← Scripts referenced by commands
│ │ ├── agents/
│ │ ├── rules/
│ │ ├── commands/ ← Source commands (copied to .claude/commands/)
│ │ ├── prds/
│ │ └── epics/
│ └── settings.local.json
├── .gitignore ← Must include .claude/epics/
└── CLAUDE.md
Why this structure?
.claude/commands/- Claude Code scans this for slash commands.claude/ccpm/- Commands referenceccpm/scripts/, which resolves to this path- Commands and scripts must be in separate locations for proper path resolution
Complete Solution
I've created a fixed installation script that:
- ✅ Downloads CCPM to temp directory
- ✅ Creates proper
.claude/ccpm/structure - ✅ Copies command files to
.claude/commands/ - ✅ Sets up permissions
- ✅ Creates
.gitignore - ✅ Provides clear next steps including restart requirement
- ✅ Works on first try
Installation Script
See attached install-ccpm.sh (or view the full script below).
Usage
cd your-project
curl -fsSL https://raw.githubusercontent.com/YOUR_REPO/main/install-ccpm.sh | bash
bash .claude/ccpm/scripts/pm/init.sh
# RESTART CLAUDE CODETesting
Tested successfully on:
- ✅ macOS (Darwin 25.0.0)
- ✅ Claude Code v2.0.24
- ✅ Fresh directory installation
- ✅ Scripts work immediately
- ✅ Slash commands work after restart
Proposed Changes to CCPM Repository
1. Replace install/ccpm.sh
Replace with the fixed script that properly organizes files.
2. Update README.md
Add to "Get Started Now" section:
## Installation
### Quick Install (macOS/Linux)
\`\`\`bash
cd /path/to/your/project
curl -fsSL https://raw.githubusercontent.com/automazeio/ccpm/main/install/ccpm.sh | bash
bash .claude/ccpm/scripts/pm/init.sh
\`\`\`
⚠️ **IMPORTANT:** After installation, you must **restart Claude Code** for slash commands to be recognized!
### Verify Installation
After restarting Claude Code:
\`\`\`
/pm:help
\`\`\`3. Add Troubleshooting Section
## Troubleshooting
### Slash commands not working
1. Verify files exist: `ls .claude/commands/pm/`
2. **Restart Claude Code** (required after installation)
3. Check structure: `tree -L 2 .claude/`
### Installation URL fails
Use GitHub raw URL:
\`\`\`bash
curl -fsSL https://raw.githubusercontent.com/automazeio/ccpm/main/install/ccpm.sh | bash
\`\`\`
### Directory structure incorrect
Re-run installation script - it's safe to run multiple times.Files Provided
- install-ccpm.sh - Fixed installation script (ready to use)
- CCPM_INSTALLATION_FIX.md - Complete documentation
- TEST_NEW_INSTALL.md - Testing guide
Impact
This fix resolves:
- Issue Installation error #966 - Installation error
- Issue Installation errors #961 - Installation errors
- Issue Can no longer get the /pm: commands to function after updating to CC v2.0.10 #971 - Commands not functioning
- Multiple user complaints about installation failures
Environment
- OS: macOS (tested), should work on Linux
- Claude Code: v2.0.24
- Installation Method: Bash script
- Repository: https://github.com/automazeio/ccpm
Additional Notes
The restart requirement is a Claude Code behavior - it scans .claude/commands/ on startup. This should be prominently documented in the README as users consistently report this as a bug when it's actually expected behavior.
Would you like me to submit this as a Pull Request? I have working code ready to contribute.