{"id":28547151,"url":"https://github.com/mirego/hanzo","last_synced_at":"2025-10-23T23:39:41.709Z","repository":{"id":9585774,"uuid":"11502999","full_name":"mirego/hanzo","owner":"mirego","description":":hocho: Hanzo is a sharp tool to handle deploying an application on Heroku on multiple environments.","archived":false,"fork":false,"pushed_at":"2021-10-07T13:16:11.000Z","size":124,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-07-27T21:20:16.926Z","etag":null,"topics":["heroku","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-18T13:03:05.000Z","updated_at":"2023-05-07T16:11:07.000Z","dependencies_parsed_at":"2022-07-30T01:47:59.744Z","dependency_job_id":null,"html_url":"https://github.com/mirego/hanzo","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/mirego/hanzo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fhanzo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fhanzo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fhanzo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fhanzo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirego","download_url":"https://codeload.github.com/mirego/hanzo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fhanzo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268660109,"owners_count":24286024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["heroku","ruby"],"created_at":"2025-06-10T00:09:34.803Z","updated_at":"2025-10-23T23:39:41.660Z","avatar_url":"https://github.com/mirego.png","language":"Ruby","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/mirego/hanzo\"\u003e\n    \u003cimg src=\"http://i.imgur.com/RZbJy1u.png\" alt=\"Hanzo\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  Hanzo is a sharp tool to handle deploying an application on Heroku on multiple environments.\n  \u003cbr /\u003e\u003cbr /\u003e\n  \u003ca href=\"https://rubygems.org/gems/hanzo\"\u003e\u003cimg src=\"http://img.shields.io/gem/v/hanzo.svg\" /\u003e\u003c/a\u003e\n  \u003ca href='https://gemnasium.com/mirego/hanzo'\u003e\u003cimg src=\"http://img.shields.io/gemnasium/mirego/hanzo.svg\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/mirego/hanzo\"\u003e\u003cimg src=\"http://img.shields.io/travis/mirego/hanzo.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Installation\n\nAdd this line to your application’s `Gemfile`:\n\n```ruby\ngem 'hanzo'\n```\n\n## Usage\n\nCreate a `.hanzo.yml` file at the root of your app that will contain a map of\nremotes, with the remote as the key and the Heroku application name as the value.\n\nYou can also use `after_deploy` to specify commands that will be run on the application\nafter a successful deployment. Hanzo will prompt you before running each command,\nthen use `heroku run` to execute it. The application is restarted afterwards.\n\n```yaml\nremotes:\n  qa: heroku-app-name-qa\n  staging: heroku-app-name-staging\n  production: heroku-app-name-production\n\nafter_deploy:\n  - rake db:migrate\n\nconsole: rails console\n```\n\n### `hanzo install`\n\n#### Remotes\n\nWhenever you add new remotes to your `.hanzo.yml` file, you'll have to install\nthem locally by running `hanzo install remotes`.\n\n```bash\n$ hanzo install remotes\n```\n\n```\n-----\u003e Creating git remotes\n       Adding qa\n        git remote rm qa 2\u003e\u00261 \u003e /dev/null\n        git remote add qa https://git.heroku.com/heroku-app-name-qa.git\n       Adding staging\n        git remote rm staging 2\u003e\u00261 \u003e /dev/null\n        git remote add staging https://git.heroku.com/heroku-app-name-staging.git\n       Adding production\n        git remote rm production 2\u003e\u00261 \u003e /dev/null\n        git remote add production https://git.heroku.com/heroku-app-name-production.git\n```\n\n#### Labs\n\nOnce all your remotes are installed, you might want to enable Heroku labs\nfeatures:\n\n```bash\n$ hanzo install labs\n```\n\n```\n-----\u003e Activating Heroku Labs\n       Add preboot? yes\n       - Enabled for qa\n       - Enabled for staging\n       - Enabled for production\n       Add user-env-compile? yes\n       - Enabled for qa\n       - Enabled for staging\n       - Enabled for production\n```\n\n### `hanzo deploy`\n\nYou can deploy to a specific remote using `hanzo deploy \u003cremote\u003e` and an\noptional reference to deploy. If no reference is specified, Hanzo will prompt\nfor one (with `HEAD` as the default value).\n\n```bash\n$ hanzo deploy qa release/qa\n```\n\n```\n       git push -f qa release/qa:master\n\n       …\n\nremote: Verifying deploy... done.\nTo heroku.com:heroku-app-name-qa.git\n   550c719..27e3538  release/qa -\u003e master\n\n       Run `rake db:migrate` on qa? y\n       heroku run rake db:migrate --remote qa\n\nRunning rake db:migrate on heroku-app-name-qa...\n15:45:26.380 [info] Already up\n       heroku ps:restart --remote qa\n\nRestarting dynos on heroku-app-name-qa...\n```\n\n### `hanzo diff`\n\nYou can use `hanzo diff \u003cremote\u003e` to compare the current repository state to the code\nthat is currently deployed in the specified remote.\n\nWarning: This uses Heroku’s git repository references so its output might be\nwrong if the application was rollbacked.\n\n```\n$ hanzo diff qa\n       git remote update qa \u0026\u0026 git diff qa/master...HEAD\n```\n\n```diff\n────────────────────────────────────────────────────────────────────────────────────────────\n -- a/lib/my_app/router.ex\n ++ b/lib/my_app/router.ex\n────────────────────────────────────────────────────────────────────────────────────────────\n@@ -30,6 +30,8 @@ defmodule MyApp.Router do\n    plug(:fetch_flash)\n+   plug(:protect_from_forgery)\n+   plug(:put_secure_browser_headers)\n```\n\n### `hanzo config`\n\n#### Compare\n\nYou can use `hanzo config compare` to find out which environment variables are\npresent in only some of your environments.\n\n```\n$ hanzo config compare\n```\n\n```\n-----\u003e Fetching environment variables\n       heroku config -r qa\n       heroku config -r staging\n       heroku config -r production\n\n-----\u003e Comparing environment variables\n       Missing variables in qa\n       - ASSET_HOST\n       Missing variables in staging\n       - SMTP_PASSWORD\n       - SMTP_PORT\n       - SMTP_SERVER\n       - SMTP_USER\n       Missing variables in production\n       - SMTP_PASSWORD\n       - SMTP_PORT\n       - SMTP_SERVER\n       - SMTP_USER\n```\n\n### `hanzo console`\n\nYou can define a `console` command in `.hanzo.yml` to quickly spawn a console\nprocess using `heroku run`.\n\n```bash\n$ hanzo console qa\n```\n\n```\nRunning iex -S mix on heroku-app-name-qa... up\n\u003e |\n```\n\n## License\n\n`Hanzo` is © 2013-2018 [Mirego](http://www.mirego.com) and may be freely\ndistributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See the\n[`LICENSE.md`](https://github.com/mirego/hanzo/blob/master/LICENSE.md) file.\n\n## About Mirego\n\n[Mirego](https://www.mirego.com) is a team of passionate people who believe that\nwork is a place where you can innovate and have fun. We're a team of [talented people](https://life.mirego.com)\nwho imagine and build beautiful Web and mobile applications. We come together to share ideas and [change the world](http://mirego.org).\n\nWe also [love open-source software](https://open.mirego.com) and we try to give back to the community as much as we can.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirego%2Fhanzo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirego%2Fhanzo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirego%2Fhanzo/lists"}