Skip to content

benchkram/bob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b7a57f2 · Mar 14, 2024
Mar 14, 2024
Jun 5, 2023
Feb 10, 2023
Nov 15, 2022
Apr 20, 2023
Jun 5, 2023
Sep 7, 2022
Nov 15, 2022
Mar 14, 2024
Apr 13, 2023
Jul 20, 2022
Jun 28, 2022
Sep 6, 2022
Dec 6, 2021
Dec 9, 2021
Jun 4, 2022
Mar 14, 2024
Dec 6, 2021
Mar 14, 2024
Apr 7, 2023
Sep 6, 2022
Mar 31, 2023
Mar 14, 2024
Mar 14, 2024
Oct 28, 2022
Mar 29, 2022

Repository files navigation

Write Once, Build Once, Anywhere


Latest Release GoDoc Build Status

Bob is a high-level build tool for multi-language projects.

Use it to build codebases organized in multiple repositories or in a monorepo.

When to consider using Bob?

  • You want a pipeline which runs locally and on CI.
  • You want remote caching and never having to do the same build twice.
  • You want to get rid of "Works on My Machine".
  • You like Bazel and its features but think it's too complex.
  • You want a build system which keeps frontend tooling functional.

Getting Started

Docs | Install

Installing From Source

If you want to go wild, and have Go 1.17 or later installed, the short version is:

git clone https://github.com/benchkram/bob
cd bob
go install

For shell autocompletion (bash and zsh supported) add source <(bob completion) to your .bashrc/.zshrc.

How it works

Bob generates its internal build graph from tasks described in a bob.yaml file (usually referred to as "Bobfile"). Each build step is executed in a sandboxed shell only using the given dependencies required from the nix package manager.

The basic components of a build task are:

  • input: Whenever an input changes, the task's commands need to be re-executed.
  • cmd: Commands to be executed
  • target: Files, directories or docker images created during execution of cmd
  • dependencies Dependencies managed by the Nix package manager

Example of a bob.yaml file:

nixpkgs: https://github.com/NixOS/nixpkgs/archive/nixos-23.11.tar.gz
build:
  build:
    input: "*"
    cmd: go build -o ./app
    target: ./app
    dependencies: [go]

Multiline sh and bash commands are entirely possible, powered by mvdan/sh.

Comparisons