| Crates.io | traiy_cli |
| lib.rs | traiy_cli |
| version | 0.0.12 |
| created_at | 2025-05-07 04:44:47.695949+00 |
| updated_at | 2025-05-25 03:09:29.739915+00 |
| description | An utility to serve AI suggestions according to user-provided guidelines and (optionally) context |
| homepage | |
| repository | https://github.com/maulberto3/traiy |
| max_upload_size | |
| id | 1663473 |
| size | 66,718 |
Traiy CLI (traiy_cli) is a tool that leverages the power of Large Language Models (LLMs) to provide insightful recommendations for enhancing documents via CLI, based on specific guidelines and optional context.
NOTE: Right now, traiy features only a CLI interface. However, a TUI is coming soon i.e. tray_tui crate.
It's designed to streamline the process of improving your content i.e. input file, by offering targeted suggestions for anything you want focus on i.e. guidelines while also (optionally) considering your own custom information i.e. context.
simple_logger crate.To use Traiy CLI, you need to have Rust and Cargo installed on your system. You can install Traiy from crates.io:
cargo install traiy_cli
Here's a basic usage example.
Supposse you have the following file:
input.csv
Hey! Just push the pedals, like in motion, one after the other; I mean you can't push both at the same time, but at the same time you can! Speaking of 'at the same time', you must not all, do your thing. So: steer well, push, look up, ride. Oh, and beware of your sorroundings.Easy right?
Hey, those seem like hard to follow instructions for a toddler, right?
Let's use traiy to make it better. First, let's create the guideline:
guideline.csv
Explain clearly but friendly how to ride a bike to my son.
For sure, the AI doesn't know my son, so let's create another file:
guideline.csv
My kid's name is Jimmy. His bike is called Rocket and it's red. The neighborhood is hilly: ups and downs.
Now, to see traiy in action, just hit in terminal:
LLM_API_KEY=<yours> traiy_cli recommend -i /path_to_/input.csv -g /path_to_/guideline.csv -c /path_to_/context.csv -l google -m gemini-2.0-flash
Wait a couple of seconds, and you will see traiy's output at a new folder, called similar to the input file i.e. input_traiy.
And just like that, you have the best recommendations on how to enhance your input file i.e. better instructions on how to teach Jimmy how to ride a bike.
Here's how such recommendations might look like:
Remember to hit 'traiy --help' to see more options.
traiy --help
Traiy expects CSV files for input, guidelines, and context. If you have files in other formats i.e. *.docx, *.pdf, *.xlsx, etc, convert them to csv as well and use them as you see fit.
Traiy generates a new directory (named based on the input file name) in the same directory as the input file. This directory contains one Markdown file showing recommendations. You can do whatever you like with these files: edit the recommendations, accept them as they are, etc.
Here are some planned features and improvements for Traiy:
Contributions to Traiy are welcome! Please feel free to submit pull requests or open issues for bug fixes, feature requests, or general discussions.
This project is licensed under the MIT License