Skip to content

chaliy/trickery

Repository files navigation

Trickery

Coding Agent friendly tool to magically generate text and images.

CI Crates.io Repo: Agent Friendly

Stand With Ukraine

CLI for generating textual and visual artifacts using LLM. Designed for CI/CD pipelines and AI coding agents.

Idea is simple: need to generate docs, images, or other artifacts as part of CI? This tool integrates seamlessly into scripts and agent workflows.

Tip

This README was generated with trickery trickery generate ./prompts/trickery_readme.md > README.md

Demo

Demo Screenshot

How to install

If you have rust/cargo installed, you can install trickery with:

cargo install trickery
trickery --help

How to use

export OPENAI_API_KEY=s....d
trickery generate ./prompts/trickery_readme.md > README.md

Using with OpenAI-compatible gateways

You can use trickery with any OpenAI-compatible API gateway (like LiteLLM, Azure OpenAI, or local models) by setting the OPENAI_BASE_URL environment variable:

export OPENAI_API_KEY=your-key
export OPENAI_BASE_URL=http://localhost:4000/v1
trickery generate ./prompts/my_prompt.md

Input file could be any text file, with Jinja2-like template variables, like {{"{{app_version}}"}}. To set this variables, please use -v flag, like -v app_version=1.0.0.

Documentation

Agent-Friendly Design

Trickery is built with AI coding agents in mind:

  • Rich error messages - Errors include context and recovery hints, so agents can self-correct
  • Full help system - Run trickery help --full for comprehensive documentation with examples
  • Predictable output - Use --json for structured output that's easy to parse
  • Template variables - Reproducible prompts with {{ variable }} substitution
  • Auto-detection - Input can be file path or direct text, no flags needed
  • Exit codes - Proper exit codes for script/agent error handling

Українською 🇺🇦

Trickery — невеликий інструмент командного рядка для автоматичної генерації текстових артефактів за допомогою великих мовних моделей. Ідея проста: якщо вам потрібно генерувати документацію, звіти або інші тексти в рамках CI/CD, цей інструмент допоможе інтегрувати виклики LLM у ваші скрипти та конвеєри. Доступні варіанти підстановки змінних у шаблонах, можливість роботи з мультимодальними підказками та простий інтерфейс для інтеграції в існуючі процеси.

Якщо маєте питання або пропозиції — ласкаво просимо відкрити issue або pull request у репозиторії.

Dad Joke

Why did the developer go broke? Because he used up all his cache.

About

Magic tool to generate things

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •