#cargo-subcommand #cargo-registry #cargo

app cargo-index

Cargo subcommand to manage a registry index

9 releases

0.2.7 Oct 23, 2023
0.2.6 Jul 12, 2022
0.2.5 Feb 18, 2022
0.2.4 Aug 22, 2021
0.1.0 Dec 24, 2018

#372 in Cargo plugins

Download history 45/week @ 2026-01-12 55/week @ 2026-01-19 37/week @ 2026-01-26 32/week @ 2026-02-02 29/week @ 2026-02-09 126/week @ 2026-02-16 87/week @ 2026-02-23 26/week @ 2026-03-02 53/week @ 2026-03-09 67/week @ 2026-03-16 57/week @ 2026-03-23 59/week @ 2026-03-30 51/week @ 2026-04-06 59/week @ 2026-04-13 100/week @ 2026-04-20 108/week @ 2026-04-27

321 downloads per month

MIT/Apache

78KB
1.5K SLoC

cargo index

crates.io

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

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

Installation

cargo install cargo-index

This requires at a minimum Cargo 1.70.

Usage

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

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.

Dependencies

~14–21MB
~463K SLoC