Getting Started
Install
bash
# macOS / Linux
curl -sSfL https://bab.sh/install.sh | sh
# Windows (PowerShell)
iwr -useb https://bab.sh/install.ps1 | iexSee installation guide for other methods.
Create Babfile
Create a Babfile in your project root:
yaml
setup:
desc: Install dependencies
run: npm install
dev:
desc: Start development server
deps: setup
run: npm run dev
test:
desc: Run tests
deps: setup
run: npm test
build:
desc: Build for production
deps: [setup, test]
run: npm run buildUsage
bash
# List tasks
bab list
# Run a task
bab dev
# Preview without executing
bab build --dry-run
# Verbose output
bab build --verboseTask Dependencies
Dependencies run automatically before the main task:
bash
bab build
# Runs: setup → test → buildNested Tasks
yaml
dev:
start:
desc: Start server
run: npm run dev
watch:
desc: Watch files
run: npm run watchRun with bab dev:start.
Next Steps
- Babfile Syntax - Learn the YAML format
- CLI Reference - See all commands