52 releases

0.21.0 May 2, 2024
0.20.0 Mar 27, 2024
0.19.0 Dec 14, 2023
0.18.5 Nov 11, 2023
0.1.1 Jul 27, 2018

#4 in Cargo plugins

Download history 7139/week @ 2024-01-30 6818/week @ 2024-02-06 6014/week @ 2024-02-13 6971/week @ 2024-02-20 7428/week @ 2024-02-27 6959/week @ 2024-03-05 6822/week @ 2024-03-12 7256/week @ 2024-03-19 8887/week @ 2024-03-26 8600/week @ 2024-04-02 7449/week @ 2024-04-09 8395/week @ 2024-04-16 8199/week @ 2024-04-23 7920/week @ 2024-04-30 7746/week @ 2024-05-07 5882/week @ 2024-05-14

31,018 downloads per month
Used in 11 crates


5.5K SLoC


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


See the cargo-generate guide for complete documentation.


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



cargo install cargo-generate

or if you have no time, use cargo-binstall:

cargo binstall cargo-generate


# 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 # translates to https://gitlab.com/username-on-gitlab/mytemplate.git
cargo generate bb:username-on-bitbucket/mytemplate # translates to https://bitbucket.org/username-on-bitbucket/mytemplate.git
cargo generate sr:username-on-sourcehut/mytemplate # translates to https://git.sr.ht/~username-on-sourcehut/mytemplate (note the tilde)

# this scheme is also available for github
cargo generate gh:username-on-github/mytemplate # translates to https://github.com/username-on-github/mytemplate.git

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


Licensed under either of

at your option.


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!


~867K SLoC