MCPcopy Index your code
hub / github.com/benchkram/bob

github.com/benchkram/bob @0.8.2-nix-shell-3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.8.2-nix-shell-3 ↗ · + Follow
1,174 symbols 4,005 edges 263 files 388 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Write Once, Build Once, Anywhere


<a href="https://github.com/benchkram/bob/releases">
    <img src="https://img.shields.io/github/release/benchkram/bob.svg" alt="Latest Release">
</a>
<a href="https://pkg.go.dev/github.com/benchkram/bob?tab=doc">
    <img src="https://godoc.org/github.com/golang/gddo?status.svg" alt="GoDoc">
</a>
<a href="https://github.com/benchkram/bob/actions">
    <img src="https://github.com/benchkram/bob/actions/workflows/main.yml/badge.svg" alt="Build Status">
</a>

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:

build:
  build:
    input: "*"
    cmd: go build -o ./app
    target: ./app
    dependencies: [git, go_1_18]

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

Comparisons

Extension points exported contracts — how you extend this code

Command (Interface)
(no doc) [4 implementers]
pkg/ctl/command.go
Repository (Interface)
(no doc) [2 implementers]
example/server-db/server/item/interfaces.go
Artifact (Interface)
get inspiration from https://github.com/tus/tusd/blob/48ffebec56fcf3221461b3f8cbe000e5367e2d48/pkg/handler/datastore.go#
pkg/store/store.go
ArtifactInfo (Interface)
(no doc) [1 implementers]
bobtask/artifact_info.go
Runnable (Interface)
(no doc) [1 implementers]
pkg/cmdutil/run.go
I (Interface)
(no doc) [1 implementers]
pkg/store-client/store_client.go
RegistryClient (Interface)
(no doc) [1 implementers]
pkg/dockermobyutil/registry.go
TaskOption (FuncType)
(no doc)
bobtask/options.go

Core symbols most depended-on inside this repo

RunGit
called by 139
pkg/cmdutil/run.go
String
called by 138
bobtask/artifact_info.go
Name
called by 68
pkg/ctl/command.go
Info
called by 57
pkg/boblog/boblog.go
Error
called by 55
pkg/usererror/error.go
Close
called by 50
pkg/nix/cache.go
V
called by 48
pkg/boblog/boblog.go
Bob
called by 47
bob/bob.go

Shape

Method 516
Function 478
Struct 119
TypeAlias 26
Interface 20
FuncType 15

Languages

Go100%

Modules by API surface

pkg/store-client/generated/client.gen.go59 symbols
bobtask/buildinfo/protos/buildinfo.pb.go51 symbols
pkg/ctl/control.go26 symbols
bobtask/task_get_set.go23 symbols
tui/model.go21 symbols
pkg/ctl/commander.go19 symbols
bob/playbook/playbook.go18 symbols
pkg/dockermobyutil/registry.go17 symbols
pkg/cmdutil/run.go16 symbols
pkg/execctl/cmd.go15 symbols
bobtask/artifact_create.go15 symbols
bobrun/with_init.go15 symbols

For agents

$ claude mcp add bob \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page