| Crates.io | t-box |
| lib.rs | t-box |
| version | 0.1.1 |
| created_at | 2024-12-24 07:05:05.674518+00 |
| updated_at | 2024-12-24 07:21:18.573299+00 |
| description | A CLI tool for managing file templates |
| homepage | |
| repository | https://github.com/your-username/t-box |
| max_upload_size | |
| id | 1493702 |
| size | 23,096 |
T-Box is a command-line tool to manage file templates. It allows you to register templates, list all available templates, and create files from these templates with ease.
Rust: Make sure you have Rust installed on your system. You can install Rust using the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
To install this CLI globally:
Clone the repository:
git clone https://github.com/your-username/t-box.git
cd t-box
Install the CLI globally using Cargo:
cargo install --path .
Verify the installation:
t-box --help
To register a new template:
t-box register <template-name> <template-file-path>
Example:
t-box register solidity solidity_template.txt
To view all registered templates:
t-box list
Example Output:
Registered templates:
- solidity
- rust
To create a file from a registered template:
t-box create <template-name> <target-file-path>
Example:
t-box create solidity example.sol
If the template solidity is registered, the file example.sol will be created with its content.
src/
├── main.rs # Entry point of the application
├── cli.rs # Command-line argument parsing
├── template.rs # Template management logic
├── utils.rs # Utility functions (optional)
To run the project locally:
Clone the repository:
git clone https://github.com/your-username/t-box.git
cd t-box
Run the project:
cargo run -- <command>
For example:
cargo run -- list
To run tests:
cargo test
Ensure the code follows Rust's style guidelines using rustfmt:
cargo fmt
Contributions are welcome! Please follow the steps below:
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
This project is licensed under the MIT License.
Special thanks to the open-source community for providing inspiration and support. """
with open("README.md", "w") as file: file.write(readme_content)
"README.md has been successfully created!"