Contributions welcome! This guide covers how to work on ShipNode.
-
Clone the repository:
git clone https://github.com/devalade/shipnode.git cd shipnode -
Run from source:
./shipnode help -
Make changes:
vim lib/commands/deploy.sh
-
Test immediately:
./shipnode deploy
No rebuild needed - changes take effect immediately.
shipnode/
├── shipnode # Main entry point
├── lib/ # Bash modules
│ ├── core.sh # Utilities, logging
│ ├── release.sh # Deployment logic
│ ├── framework.sh # Framework detection
│ ├── validation.sh # Input validation
│ └── commands/ # Command implementations
├── templates/ # PM2/Caddy templates
└── build.sh # Distribution builder
-
Create
lib/commands/mycommand.sh:cmd_mycommand() { load_config info "Running my command..." }
-
Add to dispatcher in
lib/commands/main.sh:case "${1:-}" in mycommand) cmd_mycommand "$@" ;; esac
-
Update help in
lib/commands/help.sh
- Use
error()for fatal errors - Use
warn()for non-fatal warnings - Use
info()for progress output - Use
success()for completion messages - Use
set -efor functions that should exit on error - Use
{{VAR}}syntax in templates
Test individual modules:
source lib/core.sh
source lib/validation.sh
validate_port "3000" && echo "Valid"Build and test installer:
./build.sh
bash dist/shipnode-installer.shFollow conventional commits:
feat: add new command
fix: resolve issue with health check
docs: update README
refactor: simplify deploy logic
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Include:
- ShipNode version (
shipnode --version) - OS and Node.js version
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs
- Architecture - Module documentation
- GitHub Issues