Skip to content
Create HTML format cards from Github Issues for printing
Ruby HTML Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Create HTML format cards from Github Issues for printing

Default Cards for Printing


gem install gh-cards


  1. Create a Github Personal Access Token with repo access -

  2. Configure your ~/.netrc file with:

machine login <<username>> password <<access-token>>

and set it's permissions: chmod 0600 ~/.netrc


The gh-cards cli tool is designed to be run inside a repo. It will create a directory .gh-cards containing a file named last which stores the last card and a file cards.html which are the cards to be printed.

At least the .gh-cards/last file should be committed to your repo so that anyone can print cards as necessary.

To generate cards from all open issues, rm .gh-cards/last.

  gh-cards generate        # Generate your Github issue cards HTML file
  gh-cards help [COMMAND]  # Describe available commands or one specific command

  -t, [--template=TEMPLATE]    # Template name or path to erb template
                               # Default: default
  -d, [--directory=DIRECTORY]  # The directory to use for output
                               # Default: .gh-cards
  -r, [--repo=REPO]            # The org/repo you want to generate cards for (autodetected when inside a repo)

To generate cards:

cd my-repo
gh-cards generate

Card Templates

Cards are generated using ERB Templates. The default template is in this repo at: templates/default.html.erb which is designed to use minimal ink. If templates are added in the future (Hint: open PRs) you'll be able to reference them with the -t or --template option.

You can also create your own templates, for example if you create a template at: .gh-cards/my-template.html.erb you can generate cards using your template:

gh-cards generate

The cards passed to the ERB are an array of objects:

    :title=>"Test Issue",
        :name=>"good first issue",
        :name=>"help wanted",
    :milestone=>"Test Milestone",
    :created_by=>"Tim Birkett",
    :created_at=>2019-11-07 15:07:31 UTC


After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to


Bug reports and pull requests are welcome on GitHub at This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Gh::Cards project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

You can’t perform that action at this time.