Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including bbrun with all npm packages installed. Try it out:

var bbrun = require("bbrun")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

bbrun v0.10.1

Run your Bitbucket Pipelines locally

Bitbucket Pipelines Runner

bbrun is a command line tool to execute Bitbucket Pipelines locally.

Build Status npm version


Install bbrun with npm:

$ npm install -g bbrun


bbrun can execute any step defined in your bitbucket-pipelines.yml template:

    - step:
          name: hello
          image: ubuntu2
            - echo "hello world!"

Run bbrun straight from your project path:

$ bbrun hello
running "build" in "atlassian/default-image" image...
hello world!

Check the examples and its tests to learn different use cases.


    $ bbrun <step> <options>

      --template (-t), pipeline template, defaults to "bitbucket-pipelines.yml"
      --env (-e),  define environment variables for execution
      --dry-run (-d),  performs dry run, printing the docker command
      --interactive (-i), starts an interactive bash session in the container
      --help, prints this very guide

    Execute all steps in the default pipeline from bitbucket-pipelines.yml
      $ bbrun
      $ bbrun --template bitbucket-template.yml
      $ bbrun --pipeline default
    Execute a single step by its name
      $ bbrun test
      $ bbrun "Integration Tests"
    Execute steps from different pipelines
      $ bbrun test --pipeline branches:master
    Define an environment variable
      $ bbrun test --env EDITOR=vim
      $ bbrun test --env "EDITOR=vim, USER=root"


  • Not all Bitbucket features are covered, check open issues for an overview of the roadmap.
  • Private images are supported, but the user has to login in the Docker Registry before executing bbrun (thus credentials in the file are ignored).

Build and Test

npm install && npm test

To execute the tests under examples (which are not run by CI yet):

npm run test-examples

Install locally

$ npm install && npm link
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free