Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo info implementation (similar to npm show/info cmd) #9032

Closed
hltdev8642 opened this issue Dec 31, 2020 · 1 comment
Closed

cargo info implementation (similar to npm show/info cmd) #9032

hltdev8642 opened this issue Dec 31, 2020 · 1 comment
Labels
A-new-subcommand Area: new subcommand C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@hltdev8642
Copy link

hltdev8642 commented Dec 31, 2020

Describe the problem you are trying to solve

So I frequently use with ruby/npm/apt the show / info commands to get more package information (link to git, homepage, keywords, etc), but as far as I know this isn't possible with cargo. I thought it would be really useful to have the ability to use something along the lines of: cargo show [pkgname] to get some basic info about a package.

Describe the solution you'd like

I created a script that implements the crates.io api, it is just preliminary and the only requirement is the package jq . I included the version I made which has a colored output, although this could easily be removed/disabled by replacing the color-echo cmds simply with echo.

That script is here, id be curious what people think.

To run:

  • Install dependencies (not much, could probably be eliminated altogether using awk anyways)

apt install jq

  • Either save somewhere in $PATH, or just run locally via ./cargo-show. (obviously chmod +x it as well)

To search:
cargo-show [packagename]

Looks like this:

cargo-show

Notes

@hltdev8642 hltdev8642 added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Dec 31, 2020
@ehuss ehuss added the A-new-subcommand Area: new subcommand label Jan 7, 2021
@epage
Copy link
Contributor

epage commented Apr 20, 2022

It looks like this is a duplicate of #948, closing in favor of that

@epage epage closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-new-subcommand Area: new subcommand C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

3 participants