Skip to main content

b5 ready

b5 Task Runner

b5 is the central task runner for all projects of our agency (TEAM23 - www.team23.de). It tries to be as simple as possible while empowering you to write your own tasks, extend existing ones and use b5 for all of the everyday project jobs.

Basic usage and concept

b5 {taskname} will look for a file called Taskfile found under build/ in your project root. It will then execute the function named task:{taskname} inside the Taskfile (which is a normal bash script). This means you may call b5 install to have the function task:install run.

The basic idea of b5 is to allow you to easily put your daily shell jobs into the Taskfile and provide a common schema for running these tasks. So b5 css for example will always build the CSS files for your project regardless of the CSS preprocessor used in this particular project (could be: less, sass, …). As b5 uses bash scripting as the Taskfile format it is easy to understand and enhance.

b5 in addition provides some modules to ease the usage of some common tools used in web development (like npm, composer, pipenv, docker, …). In addition it defines some common task names to introduce a good convention for your task naming schema. This will allow new developers to get on board faster - not need to care too much about the project setup itself.

You may pass parameters to your tasks like b5 some_task some_parameter and use normal bash parameter handling to use these parameters ($1, or better ${1}). Please note that b5 will abort when accessing a non existent parameter, use bash default values when necessary (${1:-default}).

Hint: You may add a file called Taskfile.local (build/Taskfile.local) for all your personal tasks. Make sure to never add this file to git. Please be sure to add this file to your .gitignore. Otherwise you might interfere with the local Taskfile of your colleges.

Quick start

Install b5 using pipx install b5 or pip install b5 (For Mac OS X you may use brew install b5 after adding our tap). See detailed installation instructions.

Note for my TEAM23 colleagues: Please make sure to install the additional dependencies.

Starting your project

b5-init example-project
cd example-project
# start working on the new project

Note: You may use b5-init -s $SKELETON example to initialize the project using an skeleton. By default b5 will use the "basic" skeleton. See project initialization for more details.

Defining your tasks (build/Taskfile)

b5 initialized your project with an example Taskfile (see build/Taskfile). For adding new tasks just write bash functions prefixed with task:, like:

#!/usr/bin/env bash
# b5 Taskfile, see https://git.team23.de/build/b5 for details

task:make_it_happen() {
    echo "Yeah, it happened"
}

Running your tasks

Now you can use b5 make_it_happen and your code inside the function will run. As this code is a simple bash script you may use your normal command line tools. Feel free to use gulp, grunt, fabric, … for more complex task excution - and call these using your Taskfile.

Note: The Taskfile is always executed inside the "run-path", which defaults to build/. Make sure to switch path, when neccessary. I recommend using a subshell (see "( … )" subshell syntax) when doing so.

Going further

Now you set up a simple example project including an example Taskfile. The Taskfile is the central part of the b5 task runner which will include the calls to all of the provided tasks. Most of the tasks will call external tools like, gulp or fabric. This is the intended behavior.

See detailed installation instruction for some more details the installation of b5.

See core concepts for some more details about the b5 concepts.

See Taskfile format for more details on how to write your Taskfile.

See common tasks for information about which tasks your Taskfile needs to provide and what these tasks should do.

See Configuration for about how to add configuration to the build process and how to handle local configuration.

See modules for looking further into modules b5 already provides for a healthy project setup.

See project initialization for more information about how to b5-init a project.

b5 logo

You may use the b5 logo when referring to b5:
b5 Logo
(see assets/ for other formats)

Also feel free to add a b5 badge to your project after you made it "b5 ready":
b5 ready
(see assets/badges/ for other formats)

Metadata

Release files for b5 1.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for b5 1.5.3
File Size Uploaded
b5-1.5.3.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for b5 1.5.3
File Interpreter ABI Platform
b5-1.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 55.3 kB

Release files / b5-1.5.3.tar.gz

Download URL b5-1.5.3.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3a2aec038ce29bcc619e42809c0aac001d5b7ee470d8e1f9e6bfcb5ec29f53d4
BLAKE2b-256 checksum
How to use checksums
658914be11d46de9b9b5670e5006be9bdd5cd3fabb122540e8e93625f19cc8cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / b5-1.5.3-py3-none-any.whl

Download URL b5-1.5.3-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c335a2f448d3ce294130fdf6a9f8c97f34137a39b99b9ce2df8a92f002df2bc
BLAKE2b-256 checksum
How to use checksums
b18c2d45713de8e916838fa1baf02afe2c1ae1c433973bb0fa153f77b156af02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.5.3 This release

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page