foldr-0.2.2 is not a library.
foldr-cli
foldr is a blazing-fast, flexible command-line tool written in Rust for managing reusable directory / project templates.
Easily snapshot a folder structure and reuse it anytime — great for setting up projects, configurations, or boilerplate.
🚀 Features
- 📦 Save any folder as a reusable template
- 🧱 Recreate folder structure and files with one command
- 🗃️ Templates are compressed as ZIPs for efficient storage
- 🧭 Supports versioning per template
- 🔧 Configurable storage location (default:
~/.foldr) - 🖥️ Optional terminal UI using
ratatui(Available in a future release) - 🛠️ Variable substitution and remote templates
📦 Installation
install from crates.io
# Using Cargo
Or build from source using cargo toolchain:
# or cargo build --release --features tui if you want tui support
You can also grab a prebuilt binary for your platform in the releases page
🛠️ Usage
# Save current directory as a template named 'cproject'
# or group templates (this will make a directory called c and place the template in it)
# List all saved templates
# Create a new project from template 'cproject'
# Launch the terminal UI for browsing and editing templates (only available when using the tui feature flag or from a prebuilt binary)
# update a template to the current directory and increase its version counter
# delete old versions of all or a single template
# show the contents of a template
# http support for fetching remote templates and easy sharing of templates
)
# or to create a permanent template from a remote
for the full list of commands use foldr --help
📁 Template Storage
- Templates are stored in
~/.foldr/templates/ - Each template is saved as a
.foldrfile with versioning support (its really just a zip file containing the folder and also some metadata)
⚙️ Configuration (WIP)
- configurations are stored in
~/.foldr/config.jsonor a file can be passed in the--configflag - the config file can be created using the
foldr configcommand which will create the configuration using an interactive cli - for config options see Configuration
- Note: By default foldr uses a small sqlite database cache to speed up searching and listing for templates. This can be disabled with the
use_cachekey in the config. When disabled searching and listing will manually walk the templates directory and list the templates that way, which is much slower if you have alot of templates.
🔮 Roadmap
- CLI templating functionality
- TUI to browse/search templates and preview / edit them
- Template variable substitution (creating files/directories with variable names using interactive cli)
- Support for templates from remote sources
- Publishing templates for sharing
- Cross-platform support for mac and windows
🤝 Contributing
Pull requests, issues, and feedback welcome!
Please check out the CONTRIBUTING.md once available.
📄 License
Licensed under the MIT License. See LICENSE for details.
Made with 💙 in Rust.