Bitrise is a collection of tools and services to help you with the development and automation of your software projects, with a main focus on mobile apps. This section is dedicated solely to the open source Bitrise CLI / runner, which is responsible for interpreting and executing the build configuration. Using the Bitrise CLI you can run the same configuration on any compatible Mac/PC, inside and outside of bitrise.io.
Bitrise CLI - the open source, offline, automation runner ⚓
This open source runner, referred to as
Bitrise CLI or
bitrise, is a tool which you can install and run on your own Mac/PC! This CLI is exactly the same as what’s used on bitrise.io. What it means is that when a build starts on bitrise.io, a virtual machine is created for the build with the
Bitrise CLI preinstalled. Once the virtual machine is ready, the build is performed through the
To run a Bitrise build on your machine, you can install our open source runner and use the
bitrise command to execute your workflows locally. It’s a great help when you’re developing steps, debugging builds, or just want to use Bitrise for any kind of automation on your machine.
bitrise.yml - the configuration format ⚓
The configuration format of the
Bitrise CLI is referred to as
bitrise.yml. This is the expected file name the configuration should be saved with.
If you save the configuration into a file named
bitrise.yml, you can simply
bitrise run in that directory without specifying any configuration path! This way the CLI will read the configuration from
bitrise.yml automatically. (Technically the
Bitrise CLI can also accept the configuration in JSON format.)
Step Library (StepLib) ⚓
The StepLib is the collection of the build steps you can use in your
bitrise.yml. The steps in the official Bitrise StepLib are all open source. You can write your own too and then share it with others!
You can also create your own Step Library if you want to, but it’s usually easier to just reference your steps with their
git clone URL directly if you don’t want to share it with others.
Custom StepLibs can also provide fallbacks (alternative download URLs, caches), automatic and periodic checks to provide the best reliability, but you get all these for free if you use the main Bitrise StepLib.
Why to use the StepLib and Steps instead of ad-hoc build scripts? ⚓
Same reason why code libraries / dependencies are awesome:
- Re-use and share: You have a code which can be updated independently from other parts, and you can re-use/share this between your configurations.
- Shared maintenance: when you use Steps created by others you don’t have to maintain the codes, but you can contribute to it if you want to, or create and use your own.
- Versioned: If a new version doesn’t work for you, you can always go back to a previous one.
We frequently push features as Steps instead of building it into the core tools. This allows faster and versioned iterations, and updating the parts independently. We try to maintain compatibility as much as possible, so older versions can work too, providing a way to upgrade when it’s appropriate for you.
The configuration format of the Bitrise CLI is referred to as bitrise.yml. This is the expected file name the configuration should be saved with.
Creating your own Step is as simple as running a bitrise CLI (v1.6.1+) command and following the guide it prints. You can generate Steps using either the Bash or Go...
Any tool that can edit `bitrise.yml` can add custom properties to it. This way you can add special properties or notes to your env vars, or even try new configurations...