app cargo-index

Cargo subcommand to manage a registry index

5 releases

0.2.3 Apr 6, 2021
0.2.2 Dec 28, 2019
0.2.1 Jul 22, 2019
0.1.1 Jan 15, 2019
0.1.0 Dec 24, 2018

#123 in Cargo plugins

Download history 9/week @ 2020-12-31 16/week @ 2021-01-07 30/week @ 2021-01-14 23/week @ 2021-01-21 31/week @ 2021-01-28 35/week @ 2021-02-04 16/week @ 2021-02-11 42/week @ 2021-02-18 47/week @ 2021-02-25 30/week @ 2021-03-04 17/week @ 2021-03-11 17/week @ 2021-03-18 65/week @ 2021-03-25 30/week @ 2021-04-01 28/week @ 2021-04-08

125 downloads per month



cargo index


An experimental Cargo subcommand to access and manipulate a registry index.

See reg-index for the corresponding library that implements this command's functionality.


cargo install cargo-index

This requires at a minimum Cargo 1.33.


The cargo index command provides several sub-commands:

Subcommand Description
add Add a package to an index.
init Create a new index.
list List entries in the index.
metadata Generate JSON metadata for a package.
unyank Un-yank a crate from an index.
validate Validate the format of an index.
yank Yank a crate from an index.

Run the sub-command with --help to get more information.


Example of creating an index and manually adding a new package:

  1. cargo index init --dl https://example.com --index index

    This creates a new git repository in the directory index with the appropriate config.json file.

  2. cargo new foo

    Create a sample project to add.

  3. cd foo

  4. cargo index add --index ../index --index-url https://example.com -- --allow-dirty

    Adds the foo package to the index.

  5. cargo index list --index ../index -p foo

    Shows the JSON metadata for every version of foo in the index.


~326K SLoC