Skip to content
/ skely Public

A simple command line tool for using and managing skeleton projects

License

Notifications You must be signed in to change notification settings

pants721/skely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4a8c2dd Β· Feb 28, 2024

History

80 Commits
Feb 28, 2024
Mar 18, 2023
Mar 2, 2023
Feb 27, 2024
Feb 27, 2024
Mar 2, 2023
Feb 28, 2024
Mar 18, 2023

Repository files navigation

Skely πŸ’€

A simple command line tool for managing and using skeleton projects

About

Skely is very simple. All it does is copy a given template file or directory from ~.config/sk to a specified directory.

Installation

To install Skely run

cargo install skely

Configuration

Settings

As of right now, Skely's configuration is very simple. It is one file at ~/.config/config.toml. The default configuration looks like this:

# Skely config
editor = ""
placeholder = "PLACEHOLDER"

As you many have guessed, the editor option is the editor you would like Skely to use. The string should contain the proper command to call the editor. For example, if I wanted to use Neovim, I wouldn't use editor = "neovim", I would use editor = "nvim so that Skely can properly execute it. Placeholder is a bit more complicated. Placeholder is the string that you want to be replaced in all the skeleton files with your project's name. To disable this option simply leave it blank as ""

Configuring New Skeletons

To configure a new skeleton, you can either configure it manually by creating it in the ~/.config/skeletons directory as a directory or file under the name you would like to identify it by, or you can run the sk add foo command to open ~/.config/skeletons/foo.sk in your preferred text editor. Interactive directory creation is currently under development.

Usage

Directory

We have a skeleton structured like this:

~/.config/sk/skeletons/
β”œβ”€ c/
β”‚  β”œβ”€ src/
β”‚  β”‚  β”œβ”€ main.c
β”‚  β”œβ”€ CMakeLists.txt

The pattern for creating a new project using a template is

sk new <ID> <PATH>

To create a new project using this template in directory foo you would use the command

sk new c foo

Single File

We have a template for a CMakeLists.txt:

~/.config/sk/skeletons/
β”œβ”€ cmake.sk

To copy this file to our project as CMakeLists.txt you would use the command

sk new cmake CMakeLists.txt

If you were to run

sk new cmake .

It would copy cmake.sk to your current project with the name cmake.sk

Remove

To remove a configured skeleton foo, you would run

sk remove foo

Pretty simple

List

Equally as simple, to list configured skeletons, run

sk list

Shocking!

If you've read this far, thank you for taking interest in my software, it is much appreciated :).

About

A simple command line tool for using and managing skeleton projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages