kickstart-0.1.0 is not a library.
Visit the last successful build:
kickstart-0.6.0
kickstart
A CLI tool to easily get a new project up and running by using pre-made templates. This is a more powerful version of an equivalent tool in Python, cookiecutter.
Installation
Currently, kickstart is available only through crates.io:
Features
- Cross-platform: Windows, Mac and Linux supported
- Single binary: no need to install a virtualenv or anything else
- Templaces can be made for any kind of projects, not limited to Rust
- Simple CLI usage: only one command
- Directory names and filenames can be templated:
{{ repo_name }}/{{author.md}}is a valid path - All templating done through Tera
- Choose your own adventure: supports conditional questions based on previous answers
- Can load templates from a local directory or from a Git repository
Try it out
# From the root of this repo
# Anywhere
Creating your own template
Creating a template is fairly simple: create files and then just add a template.toml in the root folder. Here is a description of all the fields available in it:
# Required, name of the template
= "Django"
# Optional, longer form description
= "A fully-featured Django template"
# Required, the version of the kickstart schema, currently only `1` is used
= 1
# Optional, the URL of the template
= "https://google.com"
# Optional, a list of authors for this template
= [
]
# Optional, a list of keywords for this template
= [
]
# Optional, those files will NOT be copied over when generating the template
# Use it to remove template-specific like its CI or its README/docs
= [
"README.md",
"CONTRIBUTING.md",
".travis.yml",
"docs",
]
# Optional, a list of patterns. All files matching one of the patterns will
# be copied over without going through Tera.
# Use it for files that contain syntax similar to Tera for example
= [
"*.html",
]
# A list of variables, the schema is explained in detail below
[[]]
= "project_name"
= "My Project"
= "What is the name of this project?"
[[]]
= "database"
= "postgres"
= "Which database do you want to use?"
= ["postgres", "mysql", "sqlite"]
[[]]
= "pg_version"
= "10.4"
= "Which version of Postgres?"
= [
"10.4",
"10.3",
"10.2",
"10.1",
"9.6",
"9.5",
"9.4",
"9.3",
]
= { = "database", = "postgres" }
[[]]
= "auth_method"
= "jwt"
= "How are users going to be authenticated?"
= ["jwt", "sessions", "none"]
[[]]
= "sentry"
= true
= "Do you want to add Sentry integration?"
[[]]
= "spa"
= false
= "Is the frontend a SPA?"
[[]]
= "js_framework"
= "React"
= "Which JS framework do you want to setup?"
= [
"React",
"Angular",
"Vue",
"None",
]
= { = "spa", = true }
[[]]
= "typescript"
= true
= "Do you want to use TypeScript?"
= { = "spa", = true }
A variable has the following required fields:
name: the name of the variable in Tera contextdefault: the default value for that question,kickstartuses that to deduce the type of that value (only string, bool and integer are currently supported)prompt: the text to display to the user
And two more optional fields:
choices: a list of potential values,kickstartwill make the user pick oneonly_if: this question will only be asked if the variablenamehas the valuevalue
List of templates
None for now.