Thanks to visit codestin.com
Credit goes to github.com

Skip to content

terror/skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

skeleton πŸ’€

release build codecov downloads

skeleton is a tool that makes it easier to start new projects.

It stores your commonly used project specific files in one place, letting you easily apply them to new projects.

The binary is called sk and has only been tested on a Unix-based system.

Demo

asciicast

Installation

skeleton should run on any unix-based system, including Linux, MacOS, and the BSDs.

The easiest way to install it is by using cargo, the Rust package manager:

cargo install skeleton-cli

Otherwise, see below for the complete package list:

Cross-platform

Package Manager Package Command
Cargo skeleton cargo install skeleton-cli
Homebrew terror/tap/skeleton brew install terror/tap/skeleton

Pre-built binaries

Pre-built binaries for Linux, MacOS, and Windows can be found on the releases page.

Usage

In essence, a template is a file ending in .skeleton with a front-matter and content. The front-matter is structured YAML with effect and free variables.

An effect variable is pre-defined to perform some action. As of now, there are only 3 pre-defined variables of this type:

Name Type Required Description
command String No A command to run on a template post-write.
filename String Yes Specifies the name of the templates destination location during application.
groups Sequence No Groups this template belongs to, used commonly when batch applying templates.

See subcommand.rs for further elaboration on these effect variables.

A free variable is used to substitute into the templates content, you can also specify whether or not to be interactively prompted for these types of variables when applying templates.

These types of variables follow a special kind of syntax when used within templates, for instance:

---
filename: rustfmt.toml
groups: [rust-cli]
tab_spaces: 2
---
edition = "2018"
max_width = 80
newline_style = "Unix"
tab_spaces = {% tab_spaces %}
use_field_init_shorthand = true
use_try_shorthand = true

Note that {% tab_spaces %} will replace to 2 when applying this template.

For more information, consult the help output of the command-line interface:

skeleton-cli 0.2.2
Liam <[email protected]>
A project scaffolding utility

Usage: sk <COMMAND>

Commands:
  add     Add a new template
  apply   Apply a template
  edit    Edit an existing template
  list    List all templates
  remove  Remove an existing template
  rename  Rename an existing template
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Prior Art

skeleton is a re-implementation and improvement of the Python program I wrote a while back called bp, which you can find here.

About

πŸ’€ A project scaffolding utility

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published