created_at2020-04-30 02:46:50.43782
updated_at2020-04-30 03:49:50.811862
descriptionSimple CLI tool to find .gitignore files based on your language or framework




clignorance is bliss

CLIgnore is a simple command-line tool to find .gitignore files based on your language or framework. It uses the GitHub API to search for template files from GitHub's official repo, so you can automagically download and use them in your projects in no-time.


.gitignore files are annoying and I hate them. While many IDEs and version control tools generate .gitignore files for you, that's not always the case. So instead of constantly Googling for the gitignore repo, finding the right template, copying the template, and pasting it in my project like a schmuck... I made a tool that does it for me (and you!)



Usage Screenshot

Use clignore find to search based on your langauge or framework, and select the file you need. If CLIgnore finds only 1 file matching your search, it'll be automatically download.

Everything else

    -h, --help       Prints help information
    -V, --version    Prints version information

    <token>    Sets the OAuth2 token for authenticated requests [env: TOKEN=]

    authenticated    Checks the GitHub API to see if you have an authorization token present
    find             Finds files by name
    help             Prints this message or the help of the given subcommand(s)
    list             Lists all gitignore template files

Setting an OAuth2 token

The GitHub API rate-limits users to 60 requests in 1 hour. If, for some reason, you need more than this, CLIgnore allows you to set an OAuth2 token via an enviornment variable:

TOKEN=<your super-secret token here> clignore find python

Authenticated requests can make up to 5000 requests per hour. More on that here.


CLIgnore is written in Rust. The recommended way to install Rust is from the official download page.

Once Rust is installed, use cargo install:

cargo install clignore

Cargo will build the CLIgnore binary and place it in $HOME/.cargo. You'll then (hopefully) be able to use clignore.


  • Some kind of CI/CD would be nice
  • Along that same line, it would be helpful to have pre-built binaries somewhere
  • Haven't done any testing on Windows or Mac. Should probably do that.
  • Need to determine the minimum version of rustc necessary to build (add to readme)
  • The error handling is pretty lazy. I'm just doing a bunch of unwraps in main, so while errors are displayed to the user, they're not very pretty.
  • All the source files are hanging out at the root src/ because I got confused by the module system. Ideally I'd like to figure this out and move things into folders.
Commit count: 181

cargo fmt