A utility for managing cargo dependencies from the command line.

Overview

cargo edit

This tool extends Cargo to allow you to add, remove, and upgrade dependencies by modifying your Cargo.toml file from the command line.

Currently available subcommands:

Build Status Build Status Build status Coverage Status crates.io Join the chat at https://gitter.im/cargo-edit/Lobby

Contribution

Thanks for your interest - we gratefully welcome contributions.

Questions can be asked in issues, or on Gitter.

To help us help you get pull requests merged quickly and smoothly, open an issue before submitted large changes. Please keep the contents of pull requests and commits short. Commit messages should include the intent of the commit.

cargo-edit has a moderately comprehensive test suite. Contributions that add/improve tests are awesome. Please add tests for every change.

cargo-edit uses rustfmt for formatting and clippy for linting.

Related Cargo Commands

Installation

Packaging status

Ensure that you have a fairly recent version of rust/cargo installed. On Ubuntu you would also need to install libssl-dev and pkg-config packages.

$ cargo install cargo-edit

If you wish to use a bundled version of openssl:

$ cargo install cargo-edit --features vendored-openssl

Compiler support: requires rustc 1.44+

(Please check cargo's documentation to learn how cargo install works and how to set up your system so it finds binaries installed by cargo.)

Install a sub-set of the commands with cargo install -f --no-default-features --features "<COMMANDS>", where <COMMANDS> is a space-separated list of commands; i.e. add rm upgrade for the full set.

Available Subcommands

cargo add

Add new dependencies to your Cargo.toml. When no version is specified, cargo add will try to query the latest version's number from crates.io.

Examples

$ # Add a specific version
$ cargo add [email protected] --dev
$ # Query the latest version from crates.io and adds it as build dependency
$ cargo add gcc --build
$ # Add a non-crates.io crate
$ cargo add local_experiment --path=lib/trial-and-error/
$ # Add a non-crates.io crate; the crate name will be found automatically
$ cargo add lib/trial-and-error/
$ # Add a crates.io crate with a local development path
$ cargo add my_helper --vers=1.3.1 --path=lib/my-helper/
$ # Add a renamed dependency
$ cargo add thiserror --rename error

Usage

$ cargo add -h
cargo-add
Add dependency to a Cargo.toml manifest file

USAGE:
    cargo add [FLAGS] [OPTIONS] <crate>...

FLAGS:
        --allow-prerelease       Include prerelease versions when fetching from crates.io (e.g. '0.6.0-alpha')
    -B, --build                  Add crate as build dependency
    -D, --dev                    Add crate as development dependency
    -h, --help                   Prints help information
        --no-default-features    Set `default-features = false` for the added dependency
        --offline                Run without accessing the network
        --optional               Add as an optional dependency (for use in features)
    -q, --quiet                  Do not print any output in case of success
    -s, --sort                   Sort dependencies even if currently unsorted
    -V, --version                Prints version information

OPTIONS:
        --branch <branch>           Specify a git branch to download the crate from
        --features <features>...    Space-separated list of features to add. For an alternative approach to enabling
                                    features, consider installing the `cargo-feature` utility
        --git <uri>                 Specify a git repository to download the crate from
        --manifest-path <path>      Path to the manifest to add a dependency to
        --path <path>               Specify the path the crate should be loaded from
    -p, --package <pkgid>           Package id of the crate to add this dependency to
        --registry <registry>       Registry to use
    -r, --rename <rename>           Rename a dependency in Cargo.toml, https://doc.rust-
                                    lang.org/cargo/reference/specifying-
                                    dependencies.html#renaming-dependencies-in-cargotoml Only works
                                    when specifying a single dependency
        --target <target>           Add as dependency to the given target platform
        --upgrade <method>          Choose method of semantic version upgrade.  Must be one of "none" (exact version,
                                    `=` modifier), "patch" (`~` modifier), "minor" (`^` modifier), "all" (`>=`), or
                                    "default" (no modifier) [default: default]  [possible values: none, patch, minor,
                                    all, default]
        --vers <uri>                Specify the version to grab from the registry(crates.io). You can also specify
                                    version as part of name, e.g `cargo add [email protected]`

ARGS:
    <crate>...    Crates to be added


This command allows you to add a dependency to a Cargo.toml manifest file. If <crate> is a github
or gitlab repository URL, or a local path, `cargo add` will try to automatically get the crate name
and set the appropriate `--git` or `--path` value.

Please note that Cargo treats versions like '1.2.3' as '^1.2.3' (and that '^1.2.3' is specified
as '>=1.2.3 and <2.0.0'). By default, `cargo add` will use this format, as it is the one that the
crates.io registry suggests. One goal of `cargo add` is to prevent you from using wildcard
dependencies (version set to '*').

cargo rm

Remove dependencies from your Cargo.toml.

Examples

$ # Remove a dependency
$ cargo rm regex
$ # Remove a development dependency
$ cargo rm regex --dev
$ # Remove a build dependency
$ cargo rm regex --build

Usage

$ cargo rm -h
cargo-rm
Remove a dependency from a Cargo.toml manifest file

USAGE:
    cargo rm [FLAGS] [OPTIONS] <crates>...

FLAGS:
    -B, --build      Remove crate as build dependency
    -D, --dev        Remove crate as development dependency
    -h, --help       Prints help information
    -q, --quiet      Do not print any output in case of success
    -V, --version    Prints version information

OPTIONS:
        --manifest-path <path>    Path to the manifest to remove a dependency from
    -p, --package <package>       Specify the package in the workspace to add a dependency to (see `cargo help pkgid`)

ARGS:
    <crates>...    Crates to be removed

cargo upgrade

Upgrade dependencies in your Cargo.toml to their latest versions.

To specify a version to upgrade to, provide the dependencies in the <crate name>@<version> format, e.g. cargo upgrade docopt@~0.9.0 serde@>=0.9,<2.0.

This command differs from cargo update, which updates the dependency versions recorded in the local lock file (Cargo.lock).

Examples

# Upgrade all dependencies for the current crate
$ cargo upgrade
# Upgrade docopt (to ~0.9) and serde (to >=0.9,<2.0)
$ cargo upgrade docopt@~0.9 serde@>=0.9,<2.0
# Upgrade regex (to the latest version) across all crates in the workspace
$ cargo upgrade regex --workspace
# Upgrade all dependencies except docopt and serde
$ cargo upgrade --exclude docopt serde

Usage

$ cargo upgrade -h
cargo-upgrade
Upgrade dependencies as specified in the local manifest file (i.e. Cargo.toml)

USAGE:
    cargo upgrade [FLAGS] [OPTIONS] [dependency]...

FLAGS:
        --workspace           Upgrade all packages in the workspace
        --allow-prerelease    Include prerelease versions when fetching from crates.io (e.g. 0.6.0-alpha')
        --dry-run             Print changes to be made without making them
    -h, --help                Prints help information
        --offline             Run without accessing the network
        --skip-compatible     Only update a dependency if the new version is semver incompatible
        --to-lockfile         Upgrade all packages to the version in the lockfile
    -V, --version             Prints version information

OPTIONS:
        --exclude <exclude>...    Crates to exclude and not upgrade
        --manifest-path <path>    Path to the manifest to upgrade
    -p, --package <package>       Specify the package in the workspace to add a dependency to (see `cargo help pkgid`)

ARGS:
    <dependency>...    Crates to be upgraded

This command differs from `cargo update`, which updates the dependency versions recorded in the
local lock file (Cargo.lock).

If `<dependency>`(s) are provided, only the specified dependencies will be upgraded. The version to
upgrade to for each can be specified with e.g. `[email protected]` or `serde@>=0.9,<2.0`.

Dev, build, and all target dependencies will also be upgraded. Only dependencies from crates.io are
supported. Git/path dependencies will be ignored.

All packages in the workspace will be upgraded if the `--workspace` flag is supplied.
The `--workspace` flag may be supplied in the presence of a virtual manifest.

If the '--to-lockfile' flag is supplied, all dependencies will be upgraded to the currently locked
version as recorded in the Cargo.lock file. This flag requires that the Cargo.lock file is
up-to-date. If the lock file is missing, or it needs to be updated, cargo-upgrade will exit with an
error. If the '--to-lockfile' flag is supplied then the network won't be accessed.

cargo set-version

Set the version in your Cargo.toml.

Examples

# Set the version to the version 1.0.0
$ cargo set-version 1.0.0
# Bump the version to the next major
$ cargo set-version --bump major
# Bump version to the next minor
$ cargo set-version --bump minor
# Bump version to the next patch
$ cargo set-version --bump patch

Usage

cargo-set-version 0.7.0
Change a package's version in the local manifest file (i.e. Cargo.toml)

USAGE:
    cargo set-version [FLAGS] [OPTIONS] [--] [target]

FLAGS:
        --all          [deprecated in favor of `--workspace`]
        --dry-run      Print changes to be made without making them
    -h, --help         Prints help information
    -V, --version      Prints version information
        --workspace    Modify all packages in the workspace

OPTIONS:
        --bump <bump>             Increment manifest version [possible values: major, minor, patch,
                                  release, rc, beta, alpha]
        --exclude <exclude>...    Crates to exclude and not modify
        --manifest-path <path>    Path to the manifest to upgrade
    -m, --metadata <metadata>     Specify the version metadata field (e.g. a wrapped libraries version)
    -p, --package <pkgid>         Package id of the crate to change the version of

ARGS:
    <target>    Version to change manifests to

For more on metadata, see the semver crate's documentation.

License

Apache-2.0/MIT

Comments
  • Pretty

    Pretty

    this uses the newly added toml::pretty_string to format the Cargo.toml.

    I opted to demo by formatting its own Cargo.toml file (cargo run --bin cargo-rm -- regex and then added back in). I can remove the changes to Cargo.toml (except the update to toml=0.4.4) if you would like -- but I thought it was a good demo :smile:

    Closes #151

    opened by vitiral 21
  • Does cargo-edit work on Windows?

    Does cargo-edit work on Windows?

    In #49 I tried to add AppVeyor (a CI for Windows) by copying the config used by regex. It didn't work for each target and I have no way to debug and fix this.

    I'd be very happy if someone could have a look at this! :smiley:

    help wanted 
    opened by killercup 19
  • no longer upgrading toml files

    no longer upgrading toml files

    when i run cargo upgrade it used to actually change the .toml files, now all i get is a printout saying it found updates.

    > cargo upgrade --workspace
        Updating 'https://github.com/rust-lang/crates.io-index' index
        Checking mylib's dependencies
    note: Re-run with `--verbose` to show all dependencies
      compatible: anyhow, url
      unchanged: httpmock, serde, serde_json, toml_edit, ureq
        Checking myapp's dependencies
    note: Re-run with `--verbose` to show all dependencies
      compatible: anyhow
      unchanged: clap, dirs, mylib, log, rpassword, serde, simplelog
    note: Re-run with `--to-lockfile` to upgrade compatible version requirements
    

    running with --verbose only gives a table but still does nothing. even running without workspace in a crate dir only prints the same. --to-lockfile does nothing since the toml doesnt change.

    behavior doesnt match description of either the app or the args. can either the app or docs be fix please for correct behavior otherwise app is useless since someone needs to manually find versions and update the tomls and then upgrade the lockfile

    opened by crawfish-storeroom 17
  • cargo add: Segfault with libgit2 1.4.1

    cargo add: Segfault with libgit2 1.4.1

    Hi, I just installed cargo-edit on Archlinux with cargo install cargo-edit.

    Whenever I try to use cargo add in this way

    cargo add scraper # example library
    

    That's what I get:

    Updating 'https://github.com/rust-lang/crates.io-index' index
    Segmentation fault (core dumped
    

    This is the relevant section of the core dump:

    Core was generated by `/home/paolo/.cargo/bin/cargo-add add scraper'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007f82d2038fc0 in ?? () from /usr/lib/libgit2.so.1.4
    (gdb) bt
    #0  0x00007f82d2038fc0 in ?? () from /usr/lib/libgit2.so.1.4
    #1  0x00007f82d203aaae in git_remote_fetch () from /usr/lib/libgit2.so.1.4
    #2  0x0000555c2c59788c in git2::remote::Remote::fetch ()
    #3  0x0000555c2c58c9db in crates_index::bare_index::BareIndexRepo::retrieve ()
    

    It looks like the segfault comes from libgit2.so - although other libraries linking with it are working fine (that's why I'm reporting it here).

    The libgit2 version on Archlinux is 1:1.4.1-1 (that's today's update, that broke cargo-edit).

    opened by galeone 17
  • use &str instead of &String everywhere

    use &str instead of &String everywhere

    It's a small change, but makes the code cleaner.

    AFAIK &String is strictly inferior to &str; it's less flexible, for no real benefits.

    clippy even warns against &String.

    opened by yberreby 16
  • `cargo add`: Nicer TOML Files

    `cargo add`: Nicer TOML Files

    • [x] Don't mess up Cargo.toml structure too much, e.g. keep the ordering
    • [x] Don't remove comments.
    • [x] Use inline tables whenever possible, e.g. clippy = {version = "0.0.19", optional = true}
    help wanted refinement cargo-add 
    opened by killercup 16
  • Release 0.5.0?

    Release 0.5.0?

    Because of this, we hope there will be a released version of cargo-edit with #369.

    If there is a plan to release such version, I think it should be 0.5.0, that woule be really great.

    opened by DCjanus 15
  • New command: cargo-upgrade

    New command: cargo-upgrade

    This adds cargo upgrade as a more fully featured replacement for cargo add --update-only.

    Usage:

    Upgrade all dependencies in a manifest file to the latest version.
    
    Usage:
        cargo upgrade [--dependency <dep>...] [--manifest-path <path>]
        cargo upgrade (-h | --help)
        cargo upgrade (-V | --version)
    
    Options:
        -d --dependency <dep>       Specific dependency to upgrade. If this option is used, only the
                                    specified dependencies will be upgraded.
        --manifest-path <path>      Path to the manifest to upgrade.
        -h --help                   Show this help page.
        -V --version                Show version.
    
    Dev, build, and all target dependencies will also be upgraded. Only dependencies from crates.io are
    supported. Git/path dependencies will be ignored.
    

    Resolves #74.

    Next steps (beyond this PR; probably not in v0.2) will be:

    • Workspace support
    • interactive 'check mode'
    • Use cargo to parse the manifests

    (I'll squash prior to merging)

    opened by bjgill 15
  • Support downgrades in `cargo set-version`

    Support downgrades in `cargo set-version`

    We're trying to set the version in a manifest regardless of what the current version is set to. Currently, this fails if the change is considered a downgrade.

    Would it be possible to add a --force option to get around this?

    opened by dlon 14
  • Upgrade flag another try at #61

    Upgrade flag another try at #61

    I am working on a second try at #61 and wanted to submit a work in progress checkpoint to see if you're on board with the method for implementing the feature. I initially wanted to have docopt parse to a rust enum but couldn't quite figure that out so I figured that we could just handle invalid parameters sent to this flag with a panic.

    The code is different enough that I figured I would just start over from latest master. What do you think so far?

    opened by waynenilsen 14
  • expose set-version as a library method

    expose set-version as a library method

    In release-plz I need to update the version of a package across all the workspace (i.e. both the version of the package in its Cargo.toml and in the [dependencies] of the other packages. I tried to run cargo set-version -p <package> <version> and it does what I need. I would love to see set-version as a method exposed by the cargo-edit library.

    It's fine even if I can achieve the same by composing different functions.

    cargo-set-version 
    opened by MarcoIeni 13
  • cargo-upgrade feedback

    cargo-upgrade feedback

    When running in a workspace with parse-display 0.7.0 and parse-display 0.8.0 available

    Running this

     cargo upgrade -p parse-display   
    

    outputs this:

    1

    Excluded list contains a bit more info than is useful - a list of all the crates it didn't updated, including workspace members which it can't possibly update.

    This also does nothing to parse-display. Incompatible version is mentioned several times but unless you scroll up through several pages of output - it's impossible to see. When I ask to upgrade a specific crate - I would expect more info about what happened to it. Upgraded, not upgraded, etc.

    Running this

    cargo upgrade -p [email protected]   
    

    Produces similar output, nothing is done to parse-display, no explanation why. It's the same version as currently in use, I would expect to see something like "nothing to do about parse-display" and less about ignored stuff I didn't ask to update.

    Running this

    cargo upgrade -p [email protected]   
    

    produces an error

    Error: failed to lock to precise version
                                                               
    Caused by:                       
        error: cannot specify both aggressive and precise simultaneously
    

    but also updates Cargo.toml and Cargo.lock files.

    The error message seems confusing, same as "both aggressive and precise". If something fails - I would expect it to fail without changing anything.

    Running this

    cargo upgrade -p [email protected]
    

    produces this

    As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.
    

    (0.9.0 does not exist), but error message is strange - as an end user I'm not using offline mode.

    opened by pacak 3
  • cargo install cargo-edit failed.

    cargo install cargo-edit failed.

    git checkout openssl-3.0.0
    ./Configure
    make j8 && make install
    cargo install cargo-edit
    
       Compiling cargo-edit v0.11.6
    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "/tmp/rustcK7BMDI/symbols.o" "/tmp/cargo-installYOe2gk/release/deps/cargo_rm-5a9a0722b038c830.cargo_rm.95ec3325-cgu.0.rcgu.o" "/tmp/cargo-installYOe2gk/release/deps/cargo_rm-5a9a0722b038c830.cargo_rm.95ec3325-cgu.1.rcgu.o"
    
    
    ..........................................................................................
    
    
      = note: /usr/bin/ld: /tmp/cargo-installYOe2gk/release/deps/liblibssh2_sys-b352d6f683bf7c5e.rlib(openssl.o): undefined reference to symbol 'EVP_PKEY_get_id@@OPENSSL_3.0.0'
              /usr/bin/ld: /usr/local/lib64/libcrypto.so.3: error adding symbols: DSO missing from command line
              collect2: error: ld returned 1 exit status
    
      = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
      = note: use the `-l` flag to specify native libraries to link
      = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
    
    error: could not compile `cargo-edit` due to previous error
    error: failed to compile `cargo-edit v0.11.6`, intermediate artifacts can be found at `/tmp/cargo-installYOe2gk`
    
    opened by P4nda0s 0
  • No workflow for upgrading recursive dependencies if root dependencies are up-to-date

    No workflow for upgrading recursive dependencies if root dependencies are up-to-date

    The current design for cargo upgrade is as a replacement for cargo update but we only do recursive compatible upgrades if we modified one of the root crates. You can't just run cargo upgrade and upgrade the indirect dependencies.

    bug cargo-upgrade 
    opened by epage 0
  • Verbose output for cargo upgrade

    Verbose output for cargo upgrade

    When I run cargo upgrade --compatible ignore --incompatible allow (after running cargo update separately), I get a table of dependencies whose version in Cargo.toml doesn't match the locked version. In this case, all of the new req versions are older than the version requirements. Then, I get a long list of unchanged crates at the end.

    IMO the output should focus on things that are actually affected, and thus:

    • In the case of --compatible ignore, no rows should be printed if new req is the same as old req
    • It would be better to omit the list of unchanged crates, which can be quite long and doesn't provide very useful information
    cargo-upgrade 
    opened by djc 4
  • Should `cargo upgrade` operate on crate or dependency names?

    Should `cargo upgrade` operate on crate or dependency names?

    cargo add and cargo rm both use dependency names. cargo upgrade used to also use dependencies names but in the current pass I switched to crate names to be more like cargo update but I think that is likely unneeded consistency.

    Using dependency names would allow for better filtering of what you want upgraded (though --pinned helps)

    question cargo-upgrade 
    opened by epage 0
Releases(v0.11.7)
  • v0.11.7(Dec 23, 2022)

  • v0.11.6(Nov 14, 2022)

  • v0.11.5(Oct 9, 2022)

  • v0.11.4(Oct 6, 2022)

    0.11.4 - 2022-10-06

    Features

    set-version

    • Modify workspace.package.version and all dependents, when needed

    Fixes

    set-version

    • Update versions in workspace.dependencies in virtual workspaces
    • Be more consistent with rest of cargo in output
    Source code(tar.gz)
    Source code(zip)
  • v0.11.3(Sep 28, 2022)

  • v0.11.2(Sep 22, 2022)

  • v0.11.1(Sep 16, 2022)

    0.11.1 - 2022-09-16

    Fixes

    • Changed --compatible, --incompatible, and --pinned from accepting true|false to allow|ignore (with aliases for compatibility
      • While we are still working out how we want to express these options, this at least removes the confusion over --compatible false looking like it is the same as --incompatible.
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Sep 14, 2022)

    0.11.0 - 2022-09-14

    This release is another step in our effort to find the appropriate cargo upgrade workflow for merging into cargo.

    This new iteration is modeled on the idea "if we started from scratch, what would cargo update look like?". Besides getting us to think outside the box, I hope that we can deprecate cargo update and replace it with cargo upgrade (caution: this has not been passed by the cargo team). We need runtime with the proposed behavior with feedback to see how well the idea works in theory and if it justifies the ecosystem churn of deprecating cargo update.

    More concretely, the approach taken in this release is a cargo update-like command that implicitly modifies Cargo.lock.

    To this end

    • cargo upgrade now works on the whole workspace exclusively
      • This also resolves confusion over --package, --exclude, and the positional PKGID argument
      • This also removes any UI barriers for supporting workspace inheritance coming in 1.64
    • cargo upgrade -p [email protected] will act as if cargo update -p serde --precise 1.0.100 was performed
    • Compatible versions are upgraded by default
      • Pass --incompatible or --pinned to upgrade to incompatible versions
      • Disable the default with --compatible false
      • See this PR for context on the trade offs

    A side benefit of this approach is that users will get an approximation of minimal-version resolution so long as they stay within cargo add and cargo upgrade and commit their Cargo.lock file.

    Please include in any feedback:

    • An evaluation of current behavior that takes into account the exiting "care abouts" or any additional we don't have listed yet
    • An evaluation of how existing or new alternatives would better fit the full set of care abouts

    Breaking Changes

    upgrade

    • Compatible versions are upgraded by default, with opt-out via --compatible false
    • Pinned dependencies will be upgraded to compatible versions when --compatible true, reserving --pinned for incompatible upgrades
    • Incompatible versions require opting in with -i / --incompatible
    • When a version requirement is fully specified, the lock version will modified to use that version
    • Exclusively operate on the workspace
    • The positional argument for selecting dependencies to upgrade has moved to --package <NAME>
    • --package and --exclude now take crate names rather than dependencies names (matters when dependencies are renamed)

    Features

    upgrade

    • --recursive <true|false> for controlling how the lockfile is updated
    • Update git dependencies

    Fixes

    upgrade

    • Treat 3.2.x as pinned
    • Update lockfile in offline mode
    • Don't touch the lockfile in dry-run
    • Prefer preserving the original version requirement over compatible version upgrades (in cases where we don't know how to preserve the format)
    Source code(tar.gz)
    Source code(zip)
  • v0.10.4(Jul 29, 2022)

  • v0.10.3(Jul 27, 2022)

    0.10.3 - 2022-07-27

    Fixes

    upgrade

    • Provide table view of upgrades, like cargo outdated, to raise visibility for why a change isn't made
    • Fix where we didn't respect --offline
    • Fix --to-lockfile to update non-registry version requirements
    • Update lockfile for upgraded requirements
    • Update --help to be consistent with cargo add

    rm

    • Update --help to be consistent with cargo add
    Source code(tar.gz)
    Source code(zip)
  • v0.10.2(Jul 21, 2022)

  • v0.10.1(Jul 18, 2022)

    What's Changed

    • fix: Improve the error when running cargo-add by @epage in https://github.com/killercup/cargo-edit/pull/739
    • fix(upgrade): Report when pinned are present by @epage in https://github.com/killercup/cargo-edit/pull/740

    Full Changelog: https://github.com/killercup/cargo-edit/compare/v0.10.0...v0.10.1

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jul 18, 2022)

    What's Changed

    • chore: update toml_edit to v0.14 by @MarcoIeni in https://github.com/killercup/cargo-edit/pull/706
    • cargo upgrade: Add --skip-pinned option by @nthuemmel-scontain in https://github.com/killercup/cargo-edit/pull/709
    • Add --target flag to cargo-rm by @cassaundra in https://github.com/killercup/cargo-edit/pull/711
    • Clean up custom console output with utils by @cassaundra in https://github.com/killercup/cargo-edit/pull/712
    • feat(rm): add dry run by @cassaundra in https://github.com/killercup/cargo-edit/pull/714
    • chore: update cargo_metadata to v0.15 by @MarcoIeni in https://github.com/killercup/cargo-edit/pull/718
    • Remove cargo-add by @epage in https://github.com/killercup/cargo-edit/pull/720
    • refactor: Backport parts of cargo-edit in cargo by @epage in https://github.com/killercup/cargo-edit/pull/722
    • fix(upgrade): Prepare for stablizing preserve-precsion by @epage in https://github.com/killercup/cargo-edit/pull/724
    • fix(upgrade): Preserve more formatting by @epage in https://github.com/killercup/cargo-edit/pull/725
    • fix(upgrade): Report errors for invalid dependencies by @epage in https://github.com/killercup/cargo-edit/pull/726
    • feat(upgrade): Add --locked support by @epage in https://github.com/killercup/cargo-edit/pull/727
    • fix(upgrade): Make preserve precision the default behavior by @epage in https://github.com/killercup/cargo-edit/pull/729
    • fix: Allow --manifest-path with -p by @epage in https://github.com/killercup/cargo-edit/pull/730
    • fix(upgrade): Don't include key formatting in warnings by @epage in https://github.com/killercup/cargo-edit/pull/731
    • fix: Allow relative manifest paths by @epage in https://github.com/killercup/cargo-edit/pull/732
    • fix(upgrade)!: Remove --allow-prerelease like cargo-add by @epage in https://github.com/killercup/cargo-edit/pull/733
    • fix(upgrade): Make --skip-compatible default by @epage in https://github.com/killercup/cargo-edit/pull/734
    • fix(upgrade): Make pinned skipping the default by @epage in https://github.com/killercup/cargo-edit/pull/735
    • fix(upgrade): --to-lockfile changes all sources by @epage in https://github.com/killercup/cargo-edit/pull/736
    • fix(upgrade): Provide hint when nothing happens by @epage in https://github.com/killercup/cargo-edit/pull/738

    New Contributors

    • @MarcoIeni made their first contribution in https://github.com/killercup/cargo-edit/pull/706
    • @nthuemmel-scontain made their first contribution in https://github.com/killercup/cargo-edit/pull/709

    Full Changelog: https://github.com/killercup/cargo-edit/compare/v0.9.1...v0.10.0

    Source code(tar.gz)
    Source code(zip)
  • v0.9.1(Jul 18, 2022)

    What's Changed

    • Partially match stderr for 'invalid_workspace_root_manifest' by @SpriteOvO in https://github.com/killercup/cargo-edit/pull/693
    • fix(set-version): Don't overwrite dependency updates by @epage in https://github.com/killercup/cargo-edit/pull/703

    New Contributors

    • @SpriteOvO made their first contribution in https://github.com/killercup/cargo-edit/pull/693

    Full Changelog: https://github.com/killercup/cargo-edit/compare/v0.9.0...v0.9.1

    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Jul 18, 2022)

    What's Changed

    • enable vendored-libgit2 by default by @ordian in https://github.com/killercup/cargo-edit/pull/511
    • BUGFIX: Rm activated features accidently created empty features table by @gilescope in https://github.com/killercup/cargo-edit/pull/514
    • README: Add packaging status for cargo-edit by @kpcyrd in https://github.com/killercup/cargo-edit/pull/518
    • fix: Full TOML 1.0 compliance by @epage in https://github.com/killercup/cargo-edit/pull/519
    • test: Enable colors in more assertions by @epage in https://github.com/killercup/cargo-edit/pull/523
    • fix(cli): Use stderr for user messages by @epage in https://github.com/killercup/cargo-edit/pull/527
    • make clippy a bit happier by @savente93 in https://github.com/killercup/cargo-edit/pull/530
    • Update crates-index to 0.18.1 by @tofay in https://github.com/killercup/cargo-edit/pull/532
    • Remove unnecessary index update by @tofay in https://github.com/killercup/cargo-edit/pull/533
    • refactor: Raise visibility of pub items by @epage in https://github.com/killercup/cargo-edit/pull/539
    • refactor: Extract manifest loading logic by @epage in https://github.com/killercup/cargo-edit/pull/540
    • refactor: Make manifest loading reusable by @epage in https://github.com/killercup/cargo-edit/pull/541
    • list available features when adding a dependency through cargo-add by @savente93 in https://github.com/killercup/cargo-edit/pull/538
    • feat: Get features from registry by @epage in https://github.com/killercup/cargo-edit/pull/542
    • fix: Allow --registry with name@version by @epage in https://github.com/killercup/cargo-edit/pull/543
    • feat: Report features with name@ver deps by @epage in https://github.com/killercup/cargo-edit/pull/544
    • cargo add now validates features against manifest before adding by @savente93 in https://github.com/killercup/cargo-edit/pull/545
    • made dependency rename warning go to stderr by @BartMassey in https://github.com/killercup/cargo-edit/pull/550
    • chore: Upgrade clap3 by @epage in https://github.com/killercup/cargo-edit/pull/555
    • fix(version): Handle build metadata for absolute versions by @epage in https://github.com/killercup/cargo-edit/pull/556
    • fix: Handle colors correctly by @epage in https://github.com/killercup/cargo-edit/pull/558
    • chore: Upgrade toml_edit to 0.13 by @epage in https://github.com/killercup/cargo-edit/pull/560
    • test: Port set-version tests to trycmd by @epage in https://github.com/killercup/cargo-edit/pull/559
    • test: Port rm tests to trycmd by @epage in https://github.com/killercup/cargo-edit/pull/561
    • chore: Upgrade dependencies by @epage in https://github.com/killercup/cargo-edit/pull/563
    • test: Port cargo-upgrade tests to trycmd by @epage in https://github.com/killercup/cargo-edit/pull/562
    • test: Port cargo-add tests to trycmd by @epage in https://github.com/killercup/cargo-edit/pull/566
    • test: Switch to inline stdout/stderr by @epage in https://github.com/killercup/cargo-edit/pull/567
    • fix(add): Allow double-add with --rename by @epage in https://github.com/killercup/cargo-edit/pull/570
    • Polish cargo-add in prep for upstreaming by @epage in https://github.com/killercup/cargo-edit/pull/571
    • feat(add): Git tag and rev support by @epage in https://github.com/killercup/cargo-edit/pull/572
    • docs: Update help output by @epage in https://github.com/killercup/cargo-edit/pull/573
    • fix!: Remove --upgrade <policy> support by @epage in https://github.com/killercup/cargo-edit/pull/575
    • fix!: Remove --sort by @epage in https://github.com/killercup/cargo-edit/pull/576
    • fix(add)!: Remove implicit git support by @epage in https://github.com/killercup/cargo-edit/pull/578
    • fix: Harden our crate spec parser by @epage in https://github.com/killercup/cargo-edit/pull/580
    • fix(add)!: Use : from pkgid, rather than @ by @epage in https://github.com/killercup/cargo-edit/pull/577
    • fix!: Remove --allow-prerelease by @epage in https://github.com/killercup/cargo-edit/pull/581
    • fix(add)!: Remove --path by @epage in https://github.com/killercup/cargo-edit/pull/582
    • fix(add): Allow mixing --manifest-path with --package by @epage in https://github.com/killercup/cargo-edit/pull/583
    • fix(add)!: Remove redundant --vers by @epage in https://github.com/killercup/cargo-edit/pull/584
    • fix(add)!: --rename only overwrites itself by @epage in https://github.com/killercup/cargo-edit/pull/585
    • fix(add): Feature-gate --git by @epage in https://github.com/killercup/cargo-edit/pull/586
    • test: Ensure README is updated by @epage in https://github.com/killercup/cargo-edit/pull/588
    • fix(add): Polish the help output by @epage in https://github.com/killercup/cargo-edit/pull/589
    • refactor: Prepare for new modify logic by @epage in https://github.com/killercup/cargo-edit/pull/591
    • feat: Allow toggling default-features by @epage in https://github.com/killercup/cargo-edit/pull/593
    • fix(add)!: Re-adding appends features by @epage in https://github.com/killercup/cargo-edit/pull/594
    • fix(add): Allow disabling optional = true by @epage in https://github.com/killercup/cargo-edit/pull/595
    • fix(add): Remove dep activation once required by @epage in https://github.com/killercup/cargo-edit/pull/596
    • Revert "fix(add)!: Use : from pkgid, rather than @" by @epage in https://github.com/killercup/cargo-edit/pull/597
    • fix(add): Allow ',' to separate features by @epage in https://github.com/killercup/cargo-edit/pull/599
    • refactor: Allow immutable table access by @epage in https://github.com/killercup/cargo-edit/pull/600
    • fix(add): Allow mixing registry and path by @epage in https://github.com/killercup/cargo-edit/pull/601
    • refactor(add): Prepare to not overwrite version by @epage in https://github.com/killercup/cargo-edit/pull/602
    • test: Ensure we always populate test data by @epage in https://github.com/killercup/cargo-edit/pull/603
    • fix(add)!: Overwrite preserves version by @epage in https://github.com/killercup/cargo-edit/pull/604
    • refactor(add): Prepare for preserving path by @epage in https://github.com/killercup/cargo-edit/pull/606
    • fix(add): Preserve path on overwrite by @epage in https://github.com/killercup/cargo-edit/pull/607
    • fix(add): Preserve version on path overwrite by @epage in https://github.com/killercup/cargo-edit/pull/608
    • feat(add): Inline feature activations by @epage in https://github.com/killercup/cargo-edit/pull/609
    • fix(add): For now, only warn that inline-add is unstable by @epage in https://github.com/killercup/cargo-edit/pull/611
    • fix(add): Include optional dependencies as features by @epage in https://github.com/killercup/cargo-edit/pull/612
    • feat: Add -Z skeleton to all commands by @epage in https://github.com/killercup/cargo-edit/pull/614
    • feat(add): Add -F short flag by @epage in https://github.com/killercup/cargo-edit/pull/615
    • fix(add): Prefer copying existing dep requirements by @epage in https://github.com/killercup/cargo-edit/pull/616
    • fix(add): When copying req to dev-dep, remove version if possible by @epage in https://github.com/killercup/cargo-edit/pull/617
    • refactor(upgrade): Make it easier to modify by @epage in https://github.com/killercup/cargo-edit/pull/618
    • Make get_version return a string by @smoelius in https://github.com/killercup/cargo-edit/pull/619
    • Improve update_table_named_entry by @smoelius in https://github.com/killercup/cargo-edit/pull/620
    • refactor(upgrade): Track raw manfiest data by @smoelius in https://github.com/killercup/cargo-edit/pull/621
    • Add --preserve-precision flag to cargo-upgrade by @smoelius in https://github.com/killercup/cargo-edit/pull/613
    • feat(fetch): upgrade ureq to 2.4 by @liushuyu in https://github.com/killercup/cargo-edit/pull/622
    • feat(fetch): add support for more CPU architectures by @liushuyu in https://github.com/killercup/cargo-edit/pull/623
    • refactor: Use same error type as cargo by @epage in https://github.com/killercup/cargo-edit/pull/626
    • chore: Upgrade dependencies by @epage in https://github.com/killercup/cargo-edit/pull/627
    • refactor: Organize bins more like cargo by @epage in https://github.com/killercup/cargo-edit/pull/628
    • chore: Remove dead code by @epage in https://github.com/killercup/cargo-edit/pull/629
    • fix: Ensure external tests pass by @epage in https://github.com/killercup/cargo-edit/pull/635
    • fix(add): Don't show two separate feature lists by @epage in https://github.com/killercup/cargo-edit/pull/636
    • feat(add): Dry-run support by @epage in https://github.com/killercup/cargo-edit/pull/638
    • fix(add): Recursively resolve features by @epage in https://github.com/killercup/cargo-edit/pull/639
    • fix(add): Walk all activated features by @epage in https://github.com/killercup/cargo-edit/pull/643
    • test: Update external tests by @epage in https://github.com/killercup/cargo-edit/pull/648
    • style: Address clippy by @epage in https://github.com/killercup/cargo-edit/pull/652
    • Update dependencies by @paolobarbolini in https://github.com/killercup/cargo-edit/pull/655
    • chore: Upgrade trycmd by @epage in https://github.com/killercup/cargo-edit/pull/657
    • fix(fetch): fix a regression introduced in b5d052e4e51c7cbf8506a284615551fabc2f0cd9 by @liushuyu in https://github.com/killercup/cargo-edit/pull/675
    • chore: Upgrade dependencies by @epage in https://github.com/killercup/cargo-edit/pull/677

    New Contributors

    • @savente93 made their first contribution in https://github.com/killercup/cargo-edit/pull/530
    • @smoelius made their first contribution in https://github.com/killercup/cargo-edit/pull/619
    • @liushuyu made their first contribution in https://github.com/killercup/cargo-edit/pull/622
    • @paolobarbolini made their first contribution in https://github.com/killercup/cargo-edit/pull/655

    Full Changelog: https://github.com/killercup/cargo-edit/compare/v0.8.0...v0.9.0

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Sep 22, 2021)

    Breaking Changes

    Many programmatic APIs changed

    cargo-add

    • Dependency paths are now relative to current working directory, rather than affect crate root (#497)
    • Sane defaults when adding a dependency from within the workspace (#504)

    Features

    • New vendored-openssl crate feature (#447)
    • New vendored-libgit2 crate feature (#488)
    • Support for dotted keys in TOML (#491)

    cargo-set-version

    • New command to bump crate versions (#482)
    • Automatically update all workspace dependents (#506)

    cargo-upgrade

    • Add --exclude (#446)

    Fixes

    • Fixed various bugs when interacting with the registry (e.g. #433, #484)
    • Read config files with extensions as added with Rust 1.39 (#439)
    • rustsec
      • Removed unmaintained dirs dependency (#440)
      • Remove dependency on old hyper v0.13 (#431)
    • Respect --quiet when updating the index (#462)
    • Lookup pkg id's relative to --manifest-path rather than current working directory (#505)

    cargo-add

    • Look up versions after updating the index (#483)
    • Allow optional build dependencies (#494)
    • Dependency paths are now relative to current working directory, rather than affect crate root (#497)
    • Prevent cargo add . from working (#501)
    • Sane defaults when adding a dependency from within the workspace (#504)

    cargo-upgrade

    • Update optional dependencies with --to-lockfile (#427)
    • Actually report upgrade when package key is used (#409)

    cargo-rm

    • Remove references among features to crate being removed (#500)
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Oct 3, 2020)

    New features:

    • Keep dependencies in sorted order if they were already sorted (#421 by @joshtriplett)

    Fixes:

    • Fix for cargo-nightly (#413 by @meltinglava)
    • Normalise windows-style paths (#403 by @Michael-F-Bryan)
    • Fix for non-lowercase crate names (#398)
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Mar 19, 2020)

    New features:

    • You can now specify a branch for git dependencies (#379 by @struktured)
    • A long awaited feature to support -p flag in the workspace is finally there :tada: ` (#390 by @pwoolcoc)

    Fixes:

    • --all flag is now deprecated in favor of --workspace to match cargo (#392 by @pwoolcoc)
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Jan 19, 2020)

    This is a minor release that updates the dependencies so that it's easier to use cargo-edit as a library.

    Fixes:

    • Adding a dependency that was renamed previously (#351 by @stiiifff)

    Full changes: https://github.com/killercup/cargo-edit/compare/v0.4.2...v0.5.0

    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Dec 5, 2019)

    New features:

    • Add a --skip-compatible flag to cargo upgrade (#360)

      This flag will make cargo upgrade ignore upgrades where the old version is semver compatible with the new one. This is useful in cases where you don't want to churn the Cargo.toml files in the whole project knowing that the lockfile is already forcing the versions to be up to date.

    Other:

    • Bunch of internal clean-ups
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Oct 28, 2019)

    New features:

    • new cool feature: try passing --to-lockfile to cargo upgrade (#337 by @tofay)
    • alternative registries support (#336 by @tofay)
    • cargo add now supports --rename flag (#345)

    Bug fixes:

    • cargo upgrade works correctly with renamed dependencies (#342 by @stiiifff)
    • cargo-{add, upgrade} now works with ssh auth for git (#334)
    • cargo upgrade does not downgrade prerelease dependencies (#348)
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Aug 17, 2019)

    Major changes:

    • cargo add and cargo upgrade now supports --offline mode and minimizes network queries (#317 by @DCjanus)
    • cargo add now accepts --sort flag to sort dependencies (#322 by @thiagoarrais)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Jun 20, 2019)

  • v0.3.2(Jun 4, 2019)

  • v0.3.1(Sep 25, 2018)

  • v0.3.0(Sep 25, 2018)

    A lot has happened since the last stable release!

    The most important feature sure is that we try to not mess up your Cargo.toml files anymore! While we are not 100% there yet, cargo add foo should give you much nicer edits now.

    Other cool features:

    • Add proxy support via env variable (#179)
    • Allow simultaneous specification of both version and path (thanks, @dherman!)
    • Add specific error for a missing crate (thanks, @bjgill!)
    • cargo-upgrade now supports --precise, --dry-run, and has nicer output
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0-beta.1(Dec 18, 2017)

    Beta pre-release version to test out style (mostly) preserving TOML parser.

    You can install this with cargo install cargo-edit --vers 0.3.0-beta.1 (add --force to overwrite an older version).

    Changes

    • Don't mess up Cargo.toml structure too much (#181)
    • Add proxy support via env variable (#179)
    • Improved error handling (#167)
    • Lots of other improvements

    First time contributors

    Thanks @ibabushkin!

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0-alpha.1(Aug 15, 2017)

    Pre-release version to test out the new TOML pretty printing!

    Changes

    • When the version of a dependency, cargo-upgrade now outputs "Upgrading crate vOld -> vNew" with the same text style as cargo update. (#143)
    • Add basic workspace support with cargo upgrade --all (#153)
    • Support selecting which binaries to install (#156) with cargo install cargo-edit --no-default-features --features "add upgrade"
    • Use the newly added toml::pretty_string to format the Cargo.toml (#163)
    • Add --allow-prerelease flag to cargo upgrade (#164)

    Contributors

    Thank you, @nikhotine, @vitiral, @bjgill, @ordian, and @Eijebong!

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jul 24, 2017)

    • Add cargo-upgrade, a brand new subcommand for all your upgrading needs
    • Deprecate cargo-list, use the cargo-tree crate instead
    • Refactorings and dependency updates
      • No more curl (we use reqwest now)
      • serde 1.0
      • toml 0.4 (still messing up your carefully formatted Cargo.toml files, sorry)
    Source code(tar.gz)
    Source code(zip)
  • v0.1.6(Jan 5, 2017)

    • From now on, cargo add will not add pre-release versions like 0.6.0-alpha by default, instead choosing the latest stable release (e.g. 0.5.2). If you want to fetch a pre-release, pass the --allow-prerelease flag. (#104 by @sebasgarcep)
    Source code(tar.gz)
    Source code(zip)
Cargo subcommand for running cargo without dev-dependencies.

cargo-no-dev-deps Cargo subcommand for running cargo without dev-dependencies. This is an extraction of the --no-dev-deps flag of cargo-hack to be use

Taiki Endo 5 Jan 12, 2023
An utility application to help managing your C++ OI workspaces.

oi_helper oi_helper is an utility application to help managing your C++ OI workspaces. Why oi_helper We all know that we often need a project manager

27Onion Nebell 11 Aug 24, 2022
A CLI tool that allow you to create a temporary new rust project using cargo with already installed dependencies

cargo-temp A CLI tool that allow you to create a new rust project in a temporary directory with already installed dependencies. Install Requires Rust

Yohan Boogaert 61 Oct 31, 2022
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
This utility traverses through your filesystem looking for open-source dependencies that are seeking donations by parsing README.md and FUNDING.yml files

This utility traverses through your filesystem looking for open-source dependencies that are seeking donations by parsing README.md and FUNDING.yml files

Mufeed VH 38 Dec 30, 2022
Utility to inherit dependencies from workspace file if it occurs 'n' or more times throughout the project.

Cargo Workspace Dependency Inheritor Utility that inherits dependencies from the main workspace if they occur n or more times in the workspace. Worksp

Timon 9 Oct 14, 2022
fixred is a command line utility to fix outdated links in files with redirect URLs.

fixred fixred is a command line utility to fix outdated links in files with redirect URLs. Installation fixred is installed via cargo package manager.

Linda_pp 35 Aug 6, 2022
Rust command line utility to quickly display useful secrets in a Kubernetes namespace

kube-secrets This is a command line utility for quickly looking at secrets in a Kubernetes namespace that are typically looked at by humans. It specif

Frank Wiles 8 Feb 10, 2022
A command-line utility that creates project structure.

petridish A command-line utility that creates project structure. If you have heard of the cookiecutter project, petridish is a rust implementation of

null 11 Dec 29, 2022
Command line utility for controlling LIFX smart lights

lifxc is a command line utility for controlling LIFX smart lights. Currently, communication over the LIFX LAN protocol is supported.

Harrison Rigg 1 Nov 17, 2021
Gecko's trusty package manager and command-line utility.

Geckos have super-powers, ya'know? Grip is Gecko's trusty package manager and command-line utility. USAGE: grip [FLAGS] [file] [SUBCOMMAND] FLAGS

Gecko 2 Jan 3, 2022
A simplified recreation of the command-line utility grep written in Rust.

smolgrep A simplified recreation of the command-line utility grep written in Rust. Download and run Download Rust On Mac/Linux Open a terminal and ent

Thi Dinh 0 Dec 27, 2021
A command line utility to easily make dank memes

meme-cli A command line utility to easily make dank memes. Yes, really. Installation cargo install meme-cli Alternatively, install from source using g

null 196 Dec 26, 2022
🧠 A command-line utility for switching git branches more easily. Switch branches interactively or use a fuzzy search to find that long-forgotten branch name.

git-smart-checkout A git command extension for switching git branches more efficiently. About Interactively switch branches or fuzzy search for that f

Cezar Craciun 51 Dec 29, 2022
Command line utility to remove duplicates from the given input.

Command line utility to remove duplicates from the given input. Note that huniq does not sort the input, it just removes duplicates.

Karolin Varner 189 Dec 27, 2022
A small command-line utility for encoding and decoding bech32 strings

A small command-line utility for encoding and decoding bech32 strings.

Charlie Moog 5 Dec 26, 2022
A lightweight command line utility with some small functions for CTFs.

Ice Ice is a lightweight command line utility to help with simple problems encountered while playing CTFs. Extracted from graveyard NOTE: Most of the

Aquib 12 Dec 19, 2022
A command-line utility which aligns a block of text within the terminal (or a specified number of columns), written in Rust.

align: a command line utility for aligning text. ⭐ Overview Aligns text within the terminal (or a specified number of columns). The text is treated as

Khalil Ouali 6 Aug 11, 2023
This is a command line utility written in Rust that helps you plan factories in Satisfactory.

Satisfactory Factory Planning Utility This is a command line utility written in Rust that helps you plan factories in Satisfactory. Tell it what you w

Maurdekye 4 Nov 29, 2023