| Crates.io | scaffy |
| lib.rs | scaffy |
| version | 0.1.3 |
| created_at | 2025-12-29 22:28:23.330572+00 |
| updated_at | 2025-12-30 22:19:45.21816+00 |
| description | A convenient template scaffolding TUI |
| homepage | |
| repository | https://github.com/HydrogenMacro/scaffy |
| max_upload_size | |
| id | 2011590 |
| size | 143,505 |
A convenient project template scaffolding TUI.
cargo install scaffy
Just run scaffy in any directory, you can choose any template and where to clone it within the TUI. Keyboard navigation instructions are provided at the bottom of the TUI.
The searchbar considers strictly spelled case-insensitive queries separated by spaces, which are each filtered through every template to see if their name, description, or tags contain it.
/templates/templates.jsonEvery template should be a subdirectory of /templates and have a corresponding entry within templates/templates.json.
templates.json contains an array of objects with the following entries (all required):
| Key | Value Type | Value Description |
|---|---|---|
| name | string | A display name; serves as the header for the TUI list entry |
| path | string | The name of the template folder in /templates. This should be unique from any other template. Do not include a leading slash. |
| author | string | The author's Github username, preferably |
| description | string | A concise description about the template's contents. Try to make this less than 100 characters, as extraneous characters are cut off in the TUI. |
| tags |
|
This holds the tags associated with the template. Each tag category holds a record instead of an array in order to have an associated version string, with null being an unspecified vesion. |
Add the files/folders of the template to /templates/<path specified in templates.json>. Make sure that when you're done, there shouldn't be any unnecessary files (such as node_modules or package_lock.json for node.js, but they should be in the .gitignore).
The user can provide a project name in the initialization stage, which can be used in any template file as needed. Just insert the following strings at where the project name should be:
| Replacement String | Resulting Inserted Project Name (assuming user entered Project name example) |
|---|---|
| @@SCAFFY_PROJECT_NAME@@ | Project name example |
| @@SCAFFY_PROJECT_NAME_TITLECASE@@ | Project Name Example |
| @@SCAFFY_PROJECT_NAME_UPPERCASE@@ | PROJECT NAME EXAMPLE |
| @@SCAFFY_PROJECT_NAME_LOWERCASE@@ | project name example |
| @@SCAFFY_PROJECT_NAME_SNAKECASE@@ | Project_name_example | @@SCAFFY_PROJECT_NAME_LOWERSNAKECASE@@ | project_name_example |
| @@SCAFFY_PROJECT_NAME_UPPERSNAKECASE@@ | PROJECT_NAME_EXAMPLE | @@SCAFFY_PROJECT_NAME_LOWERCAMELCASE@@ | projectNameExample | @@SCAFFY_PROJECT_NAME_UPPERCAMELCASE@@ | ProjectNameExample |
| @@SCAFFY_PROJECT_NAME_KEBABCASE@@ | Project-name-example |
| @@SCAFFY_PROJECT_NAME_LOWERKEBABCASE@@ | project-name-example |
| @@SCAFFY_PROJECT_NAME_UPPERKEBABCASE@@ | PROJECT-NAME-EXAMPLE |
After making a template, run node scripts/gen-paths.js in order to generate an associated file in templates/__scaffy_template_contents. This file is currently neccesary for each template, but this requirement may eventually be unneccesary.