Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Shell commands for development, staging, and production parity for Heroku apps

Subscribe to updates I use parity

Statistics on parity

Number of watchers on Github 615
Number of open issues 1
Average time to close an issue 2 months
Main language Ruby
Average time to merge a PR 6 days
Open pull requests 6+
Closed pull requests 20+
Last commit over 2 years ago
Repo Created about 7 years ago
Repo Last Updated over 2 years ago
Size 139 KB
Homepage https://thoughtbo...
Organization / Authorthoughtbot
Latest Release2.4.0
Page Updated
Do you use parity? Leave a review!
View parity activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating parity for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Shell commands for development, staging, and production parity for Heroku apps.


On OS X, this installs everything you need:

brew tap thoughtbot/formulae
brew install parity

On Debian:

wget -qO - https://apt.thoughtbot.com/thoughtbot.gpg.key | sudo apt-key add -
echo "deb http://apt.thoughtbot.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/thoughtbot.list
sudo apt-get update
sudo apt-get install parity

On other systems you can:

  1. Download the package for your system from the releases page
  2. Extract the tarball and place it so that /bin is in your PATH

Parity requires these command-line programs:


On OS X, these programs are installed as Homebrew package dependencies of the parity Homebrew package.


Backup a database:

production backup
staging backup

Restore a production or staging database backup into development:

development restore production
development restore staging

Or, if restore-from reads better to you, it's the same thing:

development restore-from production
development restore-from staging

Push your local development database backup up to staging:

staging restore development

Deploy from master to production and migrate and restart the dynos if necessary:

production deploy

Deploy the current branch to staging or a feature branch and migrate and restart the dynos if necessary:

staging deploy

Note that deploys to non-production environments use git push --force.

Open a console:

production console
staging console

Migrate a database and restart the dynos:

production migrate
staging migrate

Tail a log:

production tail
staging tail

Use redis-cli with your REDIS_URL add-on:

production redis-cli
staging redis-cli

The scripts also pass through, so you can do anything with them that you can do with heroku ______ --remote staging or heroku ______ --remote production:

watch production ps
staging open


Parity expects:

  • A staging remote pointing to the staging Heroku app.
  • A production remote pointing to the production Heroku app. heroku git:remote -r staging -a your-staging-app heroku git:remote -r production -a your-production-app
  • There is a config/database.yml file that can be parsed as YAML for ['development']['database'].


If you have Heroku environments beyond staging and production (such as a feature environment for each developer), you can add a binstub to the bin folder of your application. Custom environments share behavior with staging: they can be backed up and can restore from production.

Using feature environments requires including Parity as a gem in your application's Gemfile.

gem "parity"

Here's an example binstub for a 'feature-geoff' environment, hosted at myapp-feature-geoff.herokuapp.com.

#!/usr/bin/env ruby

require "parity"

if ARGV.empty?
  puts Parity::Usage.new
  Parity::Environment.new("feature-geoff", ARGV).run


Please fill out our issues template if you are having problems.


Please see CONTRIBUTING.md for details.

Version History

Please see the releases page for the version history, along with a description of the changes in each release.


See guidelines in RELEASING.md for details


Parity is 2013-2018 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot


Parity is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We are passionate about open source software. See our other projects. We are available for hire.

parity open issues Ask a question     (View All Issues)
  • over 3 years Nothing seems to work. "fork: retry: no child processes"
  • almost 4 years Allow migrations to be skipped
parity open pull requests (View All Pulls)
  • Don't install executables via Rubygems
  • Correctly parse HTTPS Heroku remotes
  • Add `--force` switch to restore to production
  • README - Add remotes example
  • Feature/adds dockerized development support
  • Check migration diff in HEAD when running in non production environment
parity questions on Stackoverflow (View All Questions)
  • Hamming Distance in Block Parity
  • Disadvantages of Parity Bits
  • Algorithm for Making a Circle of Parity?
  • Is there anything between Hamming code and parity control?
  • x86 instructions to set parity, overflow, & sign flags
  • Parity check matrix of LDPC encoder and decoder in Matlab
  • Xor parity constraint with more than two variables
  • Encryption Algorithm and bitwise parity
  • Parity bit checks using General Hamming Algorithm
  • An easy/bitwise way to compute the parity of bits
  • How to check if value has even parity of bits or odd?
  • CASE odd parity checker
  • How does this code compute parity of a byte using 64-bit multiply and modulus division
  • STM32F427's USART1 sometimes sets 8th data bit as if it would be parity bit
  • Finding parity of number of '1's in a int variable
  • Prolog: partition integer list items by their parity
  • Writing AT&T assembly to work with parity flag and offsets
  • what does "parity" in EAN-13 mean?
  • Does feature parity exist between Spark and PySpark
  • Reversing encryption algorithm that XORs each character with another in the string, using parity to control offset
  • Is there a parity flag for PowerPC generated directly on ConditionRegister?
  • What did Seymour Cray mean when he said "Parity is for farmers"?
  • Parity algorithm in RTCM messages
  • serial port parity
  • Do Intel's SIMD instructions affect the parity flag?
  • Pyschools Topic 3 Q 11 - DNA parity check
  • linux serial: reading parity bit for 9bit communication
  • Message parity check
  • Understanding parity of a number
  • Sorting with parity in julia
parity list of languages used
parity latest release notes
2.4.0 v2.4.0
  • Allow pre-2.2 Rubies to execute development restore 2119c50
v2.3.0 v2.3.0

Ignore missing local development database when restoring from remotes.

2.2.1 2.2.1
  • ensure a tmp directory exists before downloading a remote backup
  • update Ruby version for contributors
Other projects in Ruby