Crates.io | snippy |
lib.rs | snippy |
version | 0.1.3 |
source | src |
created_at | 2024-09-03 18:51:12.881383 |
updated_at | 2024-10-09 05:49:08.591549 |
description | A command-line tool for that makes using LLMs for code generation a breeze |
homepage | https://github.com/nikhil-pandey/snippy |
repository | https://github.com/nikhil-pandey/snippy |
max_upload_size | |
id | 1361943 |
size | 173,092 |
Snippy is a command-line tool for copying code snippets to the clipboard with optional formatting features. It's designed to make sharing code easier and more efficient, with special features for working with Large Language Models. β¨Here's a quick demo of Snippy in action:
https://github.com/user-attachments/assets/64d4ac13-8e3b-4923-8c74-95ad37a92e20
To install snippy
, you need to have Rust installed. Then you can install it using cargo
:
cargo install snippy
snippy [OPTIONS] [FILES]...
Copy files to clipboard with default settings:
snippy copy file1.rs file2.py
Copy files without markdown ticks:
snippy copy --no-markdown file1.rs file2.py
Add line numbers with a custom prefix:
snippy copy --line-number 3 --prefix ">> " file1.rs file2.py
Copy files formatted as XML:
snippy copy --xml file1.rs file2.py
Watch clipboard for changes and process new content:
snippy watch
The watch command (watch
) is particularly powerful when working with LLMs:
snippy watch
This mode continuously monitors your clipboard. When you copy output from an LLM, snippy automatically processes and applies the code to your workspace. πͺ
To use this feature effectively:
prompts/
directory for example prompts that work well with Snippy.Example of a Snippy-friendly code format:
### src/main.rs
```rust
fn main() {
println!("Hello, Snippy!");
}
```
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request. π
If you encounter any problems or have any questions, please open an issue on the GitHub repository. We're here to help! π
Happy coding with Snippy! π