Interactive CLI tool to streamline Kamal deployments with multi-project support.
- Multi-project support - Register and deploy multiple projects
- Auto-discovery - Scan directories for projects with Kamal configs
- Git integration - Auto checkout/fetch/pull before deploy
- Branch-aware - Different deploy commands per branch
- Run from anywhere - No need to be in project directory
- Global config - Works across all your repos
curl -fsSL https://raw.githubusercontent.com/lpwanw/lp_kamal/refs/heads/main/install.sh | bashDownload the pre-built binary for your platform:
# macOS (Apple Silicon)
curl -sL https://github.com/lpwanw/lp_kamal/releases/latest/download/lp_kamal-darwin-arm64 -o ~/.local/bin/lp_kamal
# macOS (Intel)
curl -sL https://github.com/lpwanw/lp_kamal/releases/latest/download/lp_kamal-darwin-x64 -o ~/.local/bin/lp_kamal
# Linux (x64)
curl -sL https://github.com/lpwanw/lp_kamal/releases/latest/download/lp_kamal-linux-x64 -o ~/.local/bin/lp_kamal
# Make executable
chmod +x ~/.local/bin/lp_kamal
# Add to PATH if needed (add to .zshrc or .bashrc)
export PATH="$HOME/.local/bin:$PATH"Scan a directory for projects and register them:
lp_kamal --initThis will:
- Ask which directory to scan (default: current directory)
- Find all git repos with
config/deploy*.ymlfiles - Let you select which projects to register
- Auto-detect branches from config files
- Save to global config
lp_kamalThis will:
- Show project selector (if multiple projects)
- Show branch selector
- Checkout, fetch, and pull the branch
- Ask for confirmation
- Execute the deploy command
# First time setup - scan ~/projects folder
$ lp_kamal --init
┌ lp_kamal Setup
│
◇ Directory to scan: ~/projects
◐ Scanning for projects...
◇ Found 3 project(s)
│
◆ Select projects to register:
│ ◼ my-app
│ ◼ api-server
│ ◻ old-project
│
▲ Configuring my-app...
◇ Command for main: kamal deploy -c config/deploy.yml
◇ Command for staging: kamal deploy -c config/deploy.staging.yml
│
▲ Configuring api-server...
◇ Command for main: kamal deploy -c config/deploy.yml
│
◇ Config saved to ~/.config/lp_kamal/config.json
└ Setup complete
# Deploy from anywhere
$ lp_kamal
┌ lp_kamal Deploy
│
◆ Select project:
│ ● my-app
│ ○ api-server
│
◆ Select branch to deploy:
│ ● main (current)
│ ○ staging
│
◐ Fetching origin...
◇ Fetched origin
◐ Pulling main...
◇ Pulled main
│
◇ Path: /Users/me/projects/my-app
◇ Command: kamal deploy -c config/deploy.yml
◆ Deploy my-app/main? No / Yes
│
▲ Deploying...| Branch | Config File | Default Command |
|---|---|---|
| main | config/deploy.yml |
kamal deploy -c config/deploy.yml |
| staging | config/deploy.staging.yml |
kamal deploy -c config/deploy.staging.yml |
| production | config/deploy.production.yml |
kamal deploy -c config/deploy.production.yml |
Global config stored at ~/.config/lp_kamal/config.json:
{
"version": 2,
"projects": [
{
"name": "my-app",
"path": "/Users/me/projects/my-app",
"branches": [
{ "branch": "main", "command": "kamal deploy -c config/deploy.yml" },
{ "branch": "staging", "command": "kamal deploy -c config/deploy.staging.yml" }
]
}
]
}| Command | Description |
|---|---|
lp_kamal |
Start deploy flow |
lp_kamal --init |
Scan and register projects |
lp_kamal --config |
Manage projects and branches |
lp_kamal --update |
Update to latest version |
lp_kamal --help |
Show help |
lp_kamal --version |
Show version |
Requires Bun >= 1.0
# Install dependencies
bun install
# Run in development
bun run dev
# Type check
bun run typecheck
# Build executable
bun run build:exe- Kamal installed
- Git
- macOS (Intel/Apple Silicon) or Linux (x64)
MIT