Prints package metadata like pip show, apt-cache show, npm view, gem query, etc.
To install:
``
$ cargo install cargo-show
Updating registry
https://github.com/rust-lang/crates.io-index`
Installing cargo-show v0.3.0
Compiling glob v0.2.11
Compiling num-traits v0.1.37
Compiling winapi-build v0.1.1
...
Compiling cargo v0.17.0 Compiling docopt v0.7.0 Compiling cargo-show v0.3.0 Finished release [optimized] target(s) in 312.4 secs Installing /Users/greg/.cargo/bin/cargo-show $ ```
Usage:
```
$ cargo show --help
Usage:
cargo show [options]
Options: --json Print the JSON response. -h --help Show this help page. --version Show version.
Display a metadata for a create at crates.io. ```
To print package metadata:
``` $ cargo show webrender servo
id: servo name: servo description: Parked non-servo thing documentation: None homepage: None repository: None max_version: 0.0.1 downloads: 925 license: MPL-2.0 created: 2014-12-04T23:41:05Z updated: 2015-12-11T23:55:55Z ```
To print JSON:
$ cargo show --json serde | cut -b '1-120'
{"categories":[{"category":"Encoding","crates_cnt":18,"created_at":"2017-01-17T19:13:05Z","description":"Encoding and/or
To rename the command if you're used to other package managers:
$ cd /usr/local/bin/ # or someplace in path
$ ln $(which cargo-show) cargo-flizblorp # needs to be a hardlink
$ cargo --list | grep fliz
flizblorp