Crates.io | clignore |
lib.rs | clignore |
version | 0.1.2 |
source | src |
created_at | 2020-04-30 02:46:50.43782 |
updated_at | 2020-04-30 03:49:50.811862 |
description | Simple CLI tool to find .gitignore files based on your language or framework |
homepage | https://github.com/akc8012/clignore |
repository | https://github.com/akc8012/clignore |
max_upload_size | |
id | 235640 |
size | 134,899 |
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!)
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.
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<token> Sets the OAuth2 token for authenticated requests [env: TOKEN=]
SUBCOMMANDS:
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
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
.
unwrap
s in main
, so while errors are displayed to the user, they're not very pretty.src/
because I got confused by the module system. Ideally I'd like to figure this out and move things into folders.