Skip to content

grittypuffy/cargofold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cargofold

Extensible scaffolder for Rust projects

Why?

cargo new and cargo init are nice. But when working on multiple projects where I had to quickly whip out a project, I had to copy multiple files and ensure stuff works.

I am a person of creature and prefer working in same tech stack and frameworks, so this was a death sentence for me.

Having a CLI scaffolder that's minimal, fast and accessible will save loads of time for me (and, hopefully for other Rustaceans out there, I believe!)

Installation

Dependencies

  • rustup toolchain (stable)
  • git

Setup

  1. Clone the repository
    git clone https://github.com/grittypuffy/cargofold
  2. Install the project
    cd cargofold
    cargo install --path .
  3. Run the binary. Ensure ~/.cargo/bin is in PATH
    cargofold

Usage

Initialize a project

You can initialize a new project using init command.

cargofold init --category <category> --name <project-name>
# Or, you can use short flags
cargofold init -c <category> -n <project-name>

Available categories are: cli, web, api

Initialize from a project template

Altenatively, you can initialize a new project from a project template or a Git repository

# From local template
cargofold from --path <file-system-path-to-template>
cargofold from --p <file-system-path-to-template>

# From Git repository
cargofold from --git <git-repo-url>
cargofold from --g <git-repo-url>

Commands

  • init: Create a new project
  • from: Create a project from a template
  • help (-h): Help of cargofold and subcommands

Credits

cargofold would not exist without these amazing libraries:

  • clap for developing Rust CLI applications in blazing fast manner
  • tera for project templating
  • git2 for handling template scaffolding from remote repositories and instantiating Git repositories.

This project was inspired by vgo for Go.

License

cargofold is licensed under the MIT license for permissive usage. For more information, check out the LICENSE file.

About

Extensible scaffolder for Rust projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages