45 releases (18 breaking)

0.18.1 Feb 25, 2023
0.17.6 Jan 19, 2023
0.17.4 Dec 14, 2022
0.17.3 Nov 11, 2022
0.1.1 Jul 27, 2018

#33 in Cargo plugins

Download history 5643/week @ 2022-11-30 5528/week @ 2022-12-07 5296/week @ 2022-12-14 3921/week @ 2022-12-21 4002/week @ 2022-12-28 4841/week @ 2023-01-04 5873/week @ 2023-01-11 5931/week @ 2023-01-18 6013/week @ 2023-01-25 4795/week @ 2023-02-01 5254/week @ 2023-02-08 5899/week @ 2023-02-15 7042/week @ 2023-02-22 7272/week @ 2023-03-01 6975/week @ 2023-03-08 4749/week @ 2023-03-15

27,097 downloads per month
Used in 6 crates

MIT/Apache

190KB
5K SLoC

cargo-generate

Build status crates.io dependency status Chat on Matrix

cargo, make me a project

cargo-generate is a developer tool to help you get up and running quickly with a new Rust project by leveraging a pre-existing git repository as a template.

Here's an example of using cargo-generate with this template: demo.gif

Documentation

See the cargo-generate guide for complete documentation.

Templates

One place to find templates is to look for the cargo-generate topic on GitHub.

Quickstart

Installation

cargo install cargo-generate

Usage

# templates on github
cargo generate --git https://github.com/username-on-github/mytemplate.git

# or just
cargo generate username-on-github/mytemplate

# templates on other git platforms
cargo generate gl:username-on-gitlab/mytemplate
cargo generate bb:username-on-bitbucket/mytemplate

# this scheme is also available for github
cargo generate gh:username-on-github/mytemplate

# for a complete list of arguments and options
cargo help generate

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. If you want to contribute to cargo-generate, please read our CONTRIBUTING notes.

cargo-generate would not be what it is today without the wonderful contributions from the community. Thank you!

Dependencies

~28–62MB
~1M SLoC