This is goods, a small CLI tool to add dependencies to a Cargo.toml automatically, kinda like npm.
You can install it by running (sudo) npm i -g goods and then running gds install cargopackage in a directory where a Cargo file is present. Goods automatically checks if the crate even exists by looking through the GitHub index.
That being said, the project is at its very start, so if you have suggestions of any kind or maybe improvements, post them here or create a PR on GitHub!
@darthdeus@birkenfeld Makes sense, but I don't think my Rust is good enough to properly fabricate something there. (Which is why I wrote it in Node ;))
It shouldn't be too difficult, given that Cargo already knows how to handle .toml files. You wouldn't have to write much code, probably just plug in at the right places.
AFAIK, it doesn't have to be written in rust to be a cargo subcommand-- if it has a binary named "cargo-something" and you have it installed in your $PATH, you can then run it as if it were a cargo subcommand, that is, with cargo something.
It would be nice to have a flag to cargo install subcommand, like cargo install --save. @kstep
This is exactly what I was going to suggest. That matches the behavior of npm install --save (and likewise with other, similar tools). You might also think about using the Cargo manifest's [dev-dependencies] section to do something like what you can do with npm install --save-dev.