https://github.com/cargo-generate/cargo-generate
cargo, make me a project
https://github.com/cargo-generate/cargo-generate
cargo cargo-generate liquid placeholders rust template-generator template-project
Last synced: 7 days ago
JSON representation
cargo, make me a project
- Host: GitHub
- URL: https://github.com/cargo-generate/cargo-generate
- Owner: cargo-generate
- License: apache-2.0
- Created: 2018-05-29T12:35:37.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T21:20:06.000Z (15 days ago)
- Last Synced: 2025-04-01T16:12:32.823Z (14 days ago)
- Topics: cargo, cargo-generate, liquid, placeholders, rust, template-generator, template-project
- Language: Rust
- Homepage: https://cargo-generate.github.io/cargo-generate
- Size: 3.98 MB
- Stars: 2,098
- Watchers: 10
- Forks: 169
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-ccamel - cargo-generate/cargo-generate - cargo, make me a project (Rust)
- awesome-rust - cargo-generate - existing git repository as a template. (Development tools / Build system)
- awesome-rust-cn - cargo-generate - 通过利用预先存在的git仓库作为模板,生成一个锈蚀项目. (开发工具 Development tools / 构建系统 Build system)
- awesome-rust - cargo-generate - A generator of a rust project by leveraging a pre-existing git repository as a template. (Development tools / Build system)
- awesome-rust - cargo-generate - 使用模板快速生成Rust项目 (虚拟化 / 构建系统)
- awesome-rust - cargo-generate - 使用模板快速生成Rust项目 (虚拟化 / 构建系统)
- fucking-awesome-rust - cargo-generate - A generator of a rust project by leveraging a pre-existing git repository as a template. (Development tools / Build system)
- fucking-awesome-rust - cargo-generate - A generator of a rust project by leveraging a pre-existing git repository as a template. (Development tools / Build system)
README
# cargo-generate
[](https://github.com/cargo-generate/cargo-generate/actions?query=workflow%3ABuild+branch%3Amain+)
[](https://crates.io/crates/cargo-generate)
[](https://deps.rs/repo/github/cargo-generate/cargo-generate)
[](https://matrix.to/#/#cargo-generate:matrix.org)> 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]:
[this template]: https://github.com/rustwasm/wasm-pack-template
## Documentation
See the `cargo-generate` [guide](https://cargo-generate.github.io/cargo-generate/index.html) for complete documentation.
## Templates
One place to find templates is to look for the [cargo-generate topic](https://github.com/topics/cargo-generate) on
GitHub.## Quickstart
### Installation
```sh
cargo install cargo-generate
```or if you have [no time, use cargo-binstall](https://github.com/cargo-bins/cargo-binstall):
```sh
cargo binstall cargo-generate
```### Usage
```sh
# 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
```## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)
or [apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0))
* MIT license ([LICENSE-MIT](LICENSE-MIT) or [opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))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![CONTRIBUTING notes]: CONTRIBUTING.md