thank
Find out who to thank for the crates you use every day
What does this do?
Shows information (useful links and author details) about every crates you depend on in your projects.
Installation
Fire up a terminal and type:
cargo install --force thank
The --force
argument is to ensure you get the latest version of this binary if you have a thank
binary already installed.
Usage:
thank you
- displays information about the crates you included under the[packages]
section in yourCargo.toml
thank yall
- displays information about all the crates your project depends onthank god
- displays information about this crate
Optional arguments:
-S, --stars
- giveπ s to the repos of your dependencies. (assumes you have a GitHub personal access token stored in an environment variable called GITHUB_TOKEN_THANK)-f, --for <crate>
- select a specific crate to display info about (and maybe toπ it)-s, --sort-by
- sorting criterion, can be "name" or "stars"-d, --descending
- sort in descending order--show-stars
- show the number of GitHubπ s for each crate
For example, if you have serde in your dependecies and you want to display information only about it, the number of stars and also to star it, type:
thank you --for serde --show-stars --stars
Why?
This project was inspired by the multitude of "thanks" projects out there. It's the first program I wrote in Rust (except from the classic Hello World), so doing this was a learning experience. I always thought you learn best by doing. Except for getting familiar with the language and tooling, I wanted this project to be yet another tool that makes the Rust community feel as awesome and friendly as it does.
Error codes
100
=> Input/Output and file system related errors101
=> Could not get current working directory102
=> Could not read Cargo.toml
200
=> Metadata and parsing related errors201
=> Could not get output fromcargo metadata
202
=> Could not parse output fromcargo
203
=> The project has no dependencies204
=> Could not process dependencies205
=> Could not get packages vector from the crate's metadata206
=> Could not parse Cargo.toml
300
=> GitHub stars and related stuff (for --with-stars)301
=> Could not parse /:user/:repo from repository url302
=> The request to star the repo failed303
=> Could not find the GitHub token304
=> No repository link found for a crate (using --for)
400
=> Specific crate errors (for --for=<crate>)401
=> Could not find <crate> in your dependencies402
=> Could not find <crate> in cargo metadata output