Builds as a service
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib handle directory symlinks Nov 11, 2014
Gemfile make it easier to release Apr 21, 2013


Builds as a service.


$ gem install anvil-cli


Build an application from a local directory

$ anvil build .
Building ...
Success, slug is

Build from a public-accessible git repository

$ anvil build

Specify a buildpack

# specify a buildpack url
$ anvil build -b

# specify a buildpack from
$ anvil build -b heroku/nodejs

Iterate on buildpacks without pushing to Github

# test a known app against the local buildpack code
$ anvil build -b ~/mybuildpack

# can also use a local app
$ anvil build ~/mybuildpack/test/app -b ~/mybuildpack

Build using a shell script from a URL

You can use this combination to host build scripts in gists. Example

$ anvil build \ \

Use a gist as a buildpack

# build mercurial
$ anvil build -b

Use the pipelining feature to build complex deploy workflows

This example requires the heroku-anvil plugin.

#!/usr/bin/env bash

# fail fast
set -o errexit
set -o pipefail

# build a slug of the app
slug=$(anvil build -p)

# release the slug to staging
heroku release $slug -a myapp-staging

# run tests using `heroku run`
heroku run bin/tests -a myapp-staging

# test that the app responds via http

# release to production
heroku release $slug -a myapp-production

Advanced Usage

anvil build

Usage: anvil build [SOURCE]

 build software on an anvil build server

 if SOURCE is a local directory, the contents of the directory will be built
 if SOURCE is a git URL, the contents of the repo will be built
 if SOURCE is a tarball URL, the contents of the tarball will be built

 SOURCE will default to "."

 -b, --buildpack URL  # use a custom buildpack
 -p, --pipeline       # pipe build output to stderr and only put the slug url on stdout
 -r, --release        # release the slug to an app