Liftoff tries to resemble and is inspired by Rusts cargo new foo --<some_option>
command and aims to get you up and running with coding as fast as possible, in any language.
Example
Simple python project in folder my_python_project
:
generates this file tree
from this config file:
language = "python"
git = true
license = "Unlicense"
directories = [
,
]
files = [
,
,
,
]
Install
with cargo
binary releases are in the works...
After having a binary on your system, run
liftoff install
Disclaimer: this will download template and license files to ~/.kick/
How To
Usage and Options
General
)
Create a new Project
<NAME>
)
)
All OPTIONS can optionally be explicitly set in the config file itself. See Working with Files.
Licenses
The following Licenses can be chosen from the command line --license <Identifier>
or set in the config file license = <Identifier>
Name | Identifier | Name | Identifier |
---|---|---|---|
Unlicense | unlicense (Default) |
Apache 2.0 | apache-2.0 |
MIT | mit |
EPL 2.0 | epl-2.0 |
GPL 3.0 | gpl-3.0 |
GPL 2.0 | gpl-2.0 |
BSD 3.0 | bsd-3.0 |
BSD 2.0 | bsd-2.0 |
LGPL 2.1 | lgpl-2.1 |
LGPL 3.0 | lgpl-3.0 |
AGPL 3.0 | agpl-3.0 |
MPL 2.0 | mpl-2.0 |
Disclaimer: I am not responsible for legal damages due to license issues. Double check the generated license
CI Options
The following Ci Services can be chosen from the command line --ci <Identifier>
or set in the config file ci = <Identifier>
.
Name | Identifier |
---|---|
Travis CI | travisci |
Circle CI | circleci |
AppVeyor | appveyor |
Templates
These Templates are available after installation.
Using default Templates
If you want to use a default template, just choose the base name of the config file (without the file extenstion) as the --config <NAME>
parameter. E.g.
for cpp.sane
Custom Templates
If you are not happy with the templates given, you can do two things:
a) quickly adapt a template
with e.g. template cpp copies base template cpp.sane to $PWD/my_cpp.sane
, edit it to your taste!. Now simply run liftoff
with the adapted template
Want to save the adjusted config?
The adjusted template will be placed to $HOME/.liftoff/configs/
and can be used with --config my_cpp
(without the file extension)
b) see next section
Writing Config Files
The config files follow the sane specification by Bloom. Here's a quick overview of the format.
Top Level Variables
All OPTIONS in liftoff new -h
can be manually set in a file OR manually set with command line options (although command line options always overwrite file defaults)
The only top level variables, that have to exist are
language
: language identifier matching the gitignore.io api names
Files
Individual files are described by
name
: a file nametemplate
(optional): a file template: web link or file pathcontent
(optional): a string that will be echoed into the file. Iftemplate
ANDcontent
is set, the file will be overwritten bycontent
!
but must be wrapped into a Files list:
files = [
,
... # more files
]
Directories
name
: a directory name- file or list of files consisting of
name
: a file nametemplate
(optional): a file template: web link or file pathcontent
(optional): a string that will be echoed into the file. Iftemplate
ANDcontent
is set, the file will be overwritten bycontent
!
files in directory must be wrapped into a directories list:
directories = [
,
]
Variable Substitution
You can set variables, enclosed in $(<variable>)
in the config file. Supported substitutable variables are
project
author
(if set)language
license
date
year
month
day
E.g. config file
language = "c++"
git = false
...
files = [
,
...
]
with liftoff command liftoff new test_project --config /path/to/config.sane
will be evaluated into README_test_project.md
(Note: Markdown not rendered here)
* *
CI
Supported Services
Name | Identifier |
---|---|
Travis CI | travisci |
Circle CI | circleci |
AppVeyor | appveyor |
A service is described by
name
: see Identifier abovetemplate
(optional): web link or file path
ci = {
name = "circleci", # see support CI Services in section Options
template = "some_file" # optional: web link or file path!
}
Building
Requirements:
- rust >= 1.26.0 (fs::read_to_string())
libssl-dev