Skip to content

HelgeSverre/jake

Jake

CI Release Zig MIT License

Jake

The best of Make and Just, combined. Clean syntax, parallel execution, glob patterns, and smart rebuilds.

Documentation · Installation · Quick Start · User Guide · Cookbook

Warning

This project is still a work in progress and not yet production ready.


Quick Start

Create a Jakefile in your project:

# Variables
app = "myapp"
version = "1.0.0"

# Load .env file
@dotenv

# Default task
@default
@desc "Build the application"
task build:
    echo "Building {{app}} v{{version}}..."
    mkdir -p dist

@desc "Run tests"
task test: [build]
    echo "Running tests..."

task clean:
    rm -rf dist

# File target - rebuilds only when sources change
file dist/bundle.js: src/*.js
    cat src/*.js > dist/bundle.js

Run it:

jake              # Run default task
jake test         # Run tests (builds first)
jake -l           # List available tasks
jake -w build     # Watch mode - rebuild on changes
jake -j4 all      # Parallel execution

Installation

# Requires Zig 0.15.2+
git clone https://github.com/HelgeSverre/jake.git
cd jake
zig build -Doptimize=ReleaseFast --prefix ~/.local

Or find prebuilt binaries on the Releases page.

Features

  • Task recipes - Define commands with parameters and dependencies
  • File recipes - Rebuild only when sources change
  • Glob patterns - Watch src/**/*.ts for changes
  • Imports - Split Jakefiles into modules with namespacing
  • Conditionals - Branch on environment or context
  • Hooks - Pre/post execution callbacks
  • Validation - Require commands (@needs) and env vars (@require)

CLI Reference

jake [OPTIONS] [RECIPE] [ARGS...]

OPTIONS:
  -h, --help              Show help
  -V, --version           Show version
  -l, --list              List recipes
  -a, --all               Include hidden recipes (with -l)
      --short             One recipe per line
  --summary           Space-separated recipe names
      --json              JSON output for listing modes
  -s, --show RECIPE       Show detailed recipe info
      --group GROUP       Filter recipes by group
      --filter PATTERN    Filter recipes by glob
      --type TYPE         Filter recipes by type (task/file/simple/external)
      --groups            List available group names
      --external [TYPE]   Show external recipes (make/just)
      --no-external       Hide external recipes
  -n, --dry-run           Print without executing
  -v, --verbose           Verbose output
  -y, --yes               Auto-confirm prompts
  -f, --jakefile FILE     Use specified Jakefile
  -w, --watch             Watch and re-run on changes
  -j, --jobs N            Parallel jobs (default: CPU count)
      --completions [SHELL] Generate shell completions
      --install           Install shell completions
      --uninstall         Remove shell completions
      --fmt               Format Jakefile
      --check             Validate formatting (with --fmt)
      --dump              Print formatted Jakefile (with --fmt)
      --web               Start web UI server
      --port PORT         Web UI port

See CLI Reference for full details.

Typo suggestions: Mistype a recipe or flag? Jake suggests corrections:

$ jake buidl
error: Recipe 'buidl' not found
Did you mean: build?

$ jake --vrsbose
error: Unknown option: --vrsbose
Did you mean '--verbose'?

Shell Completions

jake --completions --install  # Auto-detect and install
# Alias:
jake --install

See the User Guide for manual setup options.

Documentation

Contributing

Contributions welcome! Please read CONTRIBUTING.md first.

License

MIT License - see LICENSE


Built with Zig · Inspired by Make & Just

About

A modern command runner with dependency tracking - the best of Make and Just, combined. Built with Zig.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors