{"id":17208641,"url":"https://github.com/chevdor/cargo-crate","last_synced_at":"2025-04-13T22:32:17.864Z","repository":{"id":40362198,"uuid":"490306200","full_name":"chevdor/cargo-crate","owner":"chevdor","description":"A set of crate related cargo commands. You can for instance get the information about a crate, as text or json, including the owners of a crate and its versions.","archived":false,"fork":false,"pushed_at":"2024-07-20T10:27:04.000Z","size":158,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T23:22:15.249Z","etag":null,"topics":["chevdor","cli","crates","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chevdor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-09T13:57:54.000Z","updated_at":"2024-07-20T10:26:59.000Z","dependencies_parsed_at":"2024-07-20T11:25:42.226Z","dependency_job_id":"380cd8a5-a702-42d0-a90e-2fb96e4a7d6f","html_url":"https://github.com/chevdor/cargo-crate","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fcargo-crate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fcargo-crate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fcargo-crate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fcargo-crate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chevdor","download_url":"https://codeload.github.com/chevdor/cargo-crate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223607919,"owners_count":17172828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chevdor","cli","crates","rust"],"created_at":"2024-10-15T02:49:24.489Z","updated_at":"2024-11-08T00:03:45.318Z","avatar_url":"https://github.com/chevdor.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cargo-crate\n\n## Intro\n\n`cargo-crate` is an additional cargo command for your crate(s).\n\n## Features\n\nIn a nutshell `cargo-crate` allows:\n\n-   fetching information about one or several crates, including the owners\n\n-   opening crate(s) in crates.io\n\n-   opening crates' documentation directly\n\n-   opening crates' repository directly\n\n-   opening crates' homepage directly\n\n-   search for crates passing a pattern\n\nYou may pass either the name of your crate such as `cargo-crate` but you may also provide the path of a package or even a workspace.\n\nYou may for instance find the following commands rather useful:\n- `cargo crate open .`\n- `cargo crate open . --doc`\n- `cargo crate open . --repo` (if you like that, checkout [`chevdor/gho`](https://github.com/chevdor/gh))\n- `cargo crate info .`\n\nFor all the command above, if you work on a workspace, all its crates will be handled.\n\n## Similar projects\n\n`cargo-crate` basically does the same (I’d argue better) than the following (combined):\n- `cargo-show`\n- `cargo-info`\n- `cargo-open`\n- `cargo-search`\n\n## Install\n\n    cargo instal cargo-crate\n\n### Aliases\n\nYou will typically use cargo-crate as `cargo crate \u003ccommand\u003e [args]` which you may find a bit verbose.\nTo make it easier, `cargo` allows defining aliases in you `$CARGO_HOME/config` file under the `[alias]` section.\n\nYou may for instance add:\n\n    [alias]\n    ...\n    open = \"crate open\"\n    info = \"crate info\"\n    show = \"crate info\"\n    repo = \"crate open --repo\"\n    home = \"crate open --home\"\n    docu = \"crate open --doc\"\n\nThose will allow you the following calls:\n\n-   `cargo repo clap` opens the clap documentation\n\n-   `cargo home clap` opens the clap homepage\n\n-   etc…​\n\n## Usage\n\n`cargo-crate` can be started using both `cargo crate` or `cargo-crate`.\n\n### Help\n\n    You can find all available commands below\n\n    Usage: cargo-crate [OPTIONS] \u003cCOMMAND\u003e\n\n    Commands:\n      info    The `info` command returns summarized information\n      open    Opens the crate in a browser\n      search  Search crates.io and return a list of crates matching your search pattern\n      help    Print this message or the help of the given subcommand(s)\n\n    Options:\n      -j, --json     Output as json\n      -h, --help     Print help\n      -V, --version  Print version\n\n### Info command\n\n    The `info` command returns summarized information\n\n    Usage: cargo-crate info [OPTIONS] [CRATE_NAMES]...\n\n    Arguments:\n      [CRATE_NAMES]...  One or more crate, passed as name or path\n\n    Options:\n      -j, --json                         Output as json\n      -m, --max-versions \u003cMAX_VERSIONS\u003e  Limit the number of versions that are displayed. You can push the limit using this flag [default: 10]\n      -h, --help                         Print help\n      -V, --version                      Print version\n\n### Open command\n\n    Opens the crate in a browser\n\n    Usage: cargo-crate open [OPTIONS] [CRATE_NAMES]...\n\n    Arguments:\n      [CRATE_NAMES]...  The name(s) of the crate to open in your browser\n\n    Options:\n      -j, --json           Output as json\n          --repository     Open crates.io by default, use this flag to open the repo instead\n          --homepage       Open crates.io by default, use this flag to open the homepage instead\n          --documentation  Open crates.io by default, use this flag to open the documentation instead\n      -h, --help           Print help\n      -V, --version        Print version\n\n### Search command\n\n    Search crates.io and return a list of crates matching your search pattern\n\n    Usage: cargo-crate search [OPTIONS] \u003cPATTERN\u003e\n\n    Arguments:\n      \u003cPATTERN\u003e  You search pattern\n\n    Options:\n      -j, --json           Output as json\n      -l, --limit \u003cLIMIT\u003e  Number of expected results: 0..100 [default: 12]\n      -r, --raw            Show only the list of crates, without extra information\n      -h, --help           Print help\n      -V, --version        Print version\n\n## Advanced Usage\n\n`cargo-crate` can be used with `fzf` for powerful interactive searches.\n\n    function crate_search() {\n        PATTERN=${@};\n        if [ $PATTERN ]; then\n            cargo-crate search --raw -l 100 $PATTERN | fzf -m -i --preview 'cargo-crate info {}' --query \"$PATTERN\"\n        else\n            echo You must provide a starting search pattern\n            exit 1\n        fi\n    }\n\nallows doing cool things like [this](https://asciinema.org/a/493910).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevdor%2Fcargo-crate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchevdor%2Fcargo-crate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevdor%2Fcargo-crate/lists"}