Problem
When mer is installed via npm or pip, the mer init command needs to handle:
- Detecting it's running from a wrapper-installed binary
- Properly setting up the scaffold with all required files
- Handling platform-specific paths correctly
Current State
The mer init command currently:
- Creates scaffold files from embedded templates
- Runs
zig build to get fingerprint
- Sets up
build.zig, build.zig.zon, starter pages
Required Updates
1. Binary Path Detection
// Need to detect if running from npm/pip wrapper
// npm: binary at node_modules/merjs/bin/mer
// pip: binary at site-packages/merjs/bin/mer
2. Template Resolution
- Ensure template files are found regardless of install method
- May need to check multiple locations for embedded files
3. Post-Init Message
Update the success message to show package-manager-specific next steps:
# For npm users:
npx mer init my-app → cd my-app && npm install && npm run dev
# For pip users:
pip install merjs && mer init my-app → cd my-app && zig build serve
Acceptance Criteria
Related
Problem
When mer is installed via npm or pip, the
mer initcommand needs to handle:Current State
The
mer initcommand currently:zig buildto get fingerprintbuild.zig,build.zig.zon, starter pagesRequired Updates
1. Binary Path Detection
2. Template Resolution
3. Post-Init Message
Update the success message to show package-manager-specific next steps:
Acceptance Criteria
mer initworks correctly when mer is installed via npmmer initworks correctly when mer is installed via pipRelated