The Wercker Offline Tool

A helper tool which downloads the workflows, environment, and steps of a wercker application and generates the files necessary to run pipelines and workflows offline.


See the Downloads page.


Downloading the workflows, environment variables and steps for the wercker application owner-username/application-name. The application’s repository must be cloned first.

cd /path/to/application-name
offline-tool --application 'owner-username/application-name' --token $WERCKER_TOKEN

In most cases the --token parameter must be used to specify a worker access token which is able to access the application. A suitable token is needed to access private applications, to download the workflows and environment variables of both public and private applications, and to download any private steps that are used. A wercker access token may be generated using the user’s account settings page.

The offline tool outputs a new wercker_offline.yml file that contains workflows and file references instead of step references (downloaded steps are stored in the steps directory).

Running a single pipeline offline

Running a pipeline using the Wercker CLI, for example build:

wercker build --wercker-yml wercker_offline.yml

Running an entire workflow offline

If the application is specified using the --application parameter, then the offline tool will fetch their workflows and add these to the wercker.yml. The offline tool will use the name of the root pipeline as the name of the workflow.

To trigger a workflow with the name build, use the following command:

wercker workflow build

Environment variables

If the application is specified using the --application parameter, then the offline tool will go through their pipelines and download the environment variables for that pipeline. It will put these as separate files in the envs directory. It is not possible to put these in the wercker_offline.yml, as the environment variables on the hosted platform can use the same pipelines in the wercker.yml.

To use these environment variables you need to add an extra flag when executing the Wercker CLI. This will execute a build with the environment variables of the build pipeline:

wercker --environment envs/build.env build