bab

command module
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 8 Imported by: 0

README

Bab Logo

Bab

Clean commands for any project.

Go Version Release Status Discord

WebsiteDocumentationDiscord


Bab is a modern task runner that replaces the clunky syntax of Makefiles and the limitations of npm scripts with a universal, dependency-free solution that works across any language or project.

Quick Start

# macOS / Linux
curl -sSfL https://bab.sh/install.sh | sh

# Windows (PowerShell)
iwr -useb https://bab.sh/install.ps1 | iex

For more installation options, see the Installation Documentation.

Create a Babfile.yml in your project root:

vars:
  app_name: myapp
  version: "1.0.0"
  build_dir: ./build

env:
  APP_NAME: ${{ app_name }}
  NODE_ENV: production

tasks:
  setup:
    desc: Install dependencies
    run:
      - cmd: npm install

  lint:
    desc: Run linter
    run:
      - cmd: npm run lint

  test:unit:
    desc: Run unit tests
    alias: t
    deps: [setup]
    run:
      - cmd: npm test

  test:all:
    desc: Run all tests
    run:
      - task: test:unit
      - log: All tests passed!
        level: info

  configure:
    desc: Configure build options
    run:
      - prompt: environment
        type: select
        message: "Select environment:"
        options: [dev, staging, prod]
        default: dev
      - log: Building for ${{ environment }}

  build:
    desc: Build ${{ app_name }} v${{ version }}
    alias: b
    deps: [lint, test:unit]
    vars:
      output: ${{ build_dir }}/${{ app_name }}
    run:
      - log: Building ${{ app_name }}...
      - cmd: npm run build
      - cmd: cp -r dist ${{ output }}
        platforms: [linux, darwin]
      - cmd: xcopy dist ${{ output }} /E
        platforms: [windows]
      - log: Build complete!
        level: info

  deploy:
    desc: Deploy to ${{ env.DEPLOY_ENV }}
    deps: [build]
    run:
      - log: Deploying ${{ app_name }} to ${{ env.DEPLOY_ENV }}...
        level: warn
      - cmd: ./scripts/deploy.sh
        env:
          VERSION: ${{ version }}

Run your tasks:

bab                  # Browse tasks interactively
bab --list           # List all available tasks
bab build            # Build the application
bab b                # Same as above (using alias)
bab t                # Run tests (using alias)

Support

  • 💬 Discord - Questions and discussions
  • 📚 Documentation - Comprehensive guides
  • 🐛 Issues - Bug reports and feature requests

Acknowledgments

Bab stands on the shoulders of giants. Special thanks to:

  • Task - The modern task runner that inspired Bab's approach
  • Charm - For their beautiful terminal UI libraries that make Bab a joy to use

Built with ❤️ by AIO

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL