| Crates.io | code-snip |
| lib.rs | code-snip |
| version | 0.1.1 |
| created_at | 2025-02-19 23:17:42.470635+00 |
| updated_at | 2025-02-19 23:18:43.844717+00 |
| description | A CLI tool to create images from code snippets. |
| homepage | |
| repository | https://github.com/max-taylor/code-snip |
| max_upload_size | |
| id | 1561994 |
| size | 57,591 |
code-snip is a Rust binary that simplifies the process of generating code snippets. It allows you to quickly create and save code snippets by specifying the input code and the desired output file name.
Install code-snip via Cargo:
cargo install code-snip
code-snip --input "fn main() { println!(\"Hello, world!\"); }" --output snippet.rs
input: The code you want to create a snippet for.output: The filename for the generated snippet.You can configure the export path via the SYNTAX_EXPORT_PATH environment variable. If set, all generated snippets will be saved in this directory:
export SYNTAX_EXPORT_PATH="/path/to/snippets"
All code snippets will then be exported to {SYNTAX_EXPORT_PATH}/{output}.
This project is licensed under the MIT License.