> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipes CLI

> Run AI-powered recipes from the command line

# Recipes CLI

Run pre-built AI-powered workflows (recipes) directly from the command line.

## Prerequisites

* PraisonAI installed: `pip install praisonai`
* OpenAI API key: `export OPENAI_API_KEY=your_key`
* External dependencies vary by recipe (ffmpeg, pandoc, etc.)

<Warning>
  Recipes shipped with PraisonAI are trusted, but if you run a third-party or remotely fetched recipe, its `tools.py` will only execute if you have explicitly set `PRAISONAI_ALLOW_TEMPLATE_TOOLS=1`. This default-deny behaviour was introduced in PR #1579 (GHSA-xcmw-grxf-wjhj). Always inspect a recipe's `tools.py` before opting in. See [Security Environment Variables](/docs/features/security-environment-variables#praisonai_allow_template_tools) for details.
</Warning>

## List Available Recipes

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates list
```

## Get Recipe Info

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates info ai-podcast-cleaner
```

## Run a Recipe

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run <recipe-name> <input> [options]
```

### Common Options

| Option            | Description                                                          |
| ----------------- | -------------------------------------------------------------------- |
| `--output`, `-o`  | Output mode: `silent`, `status`, `trace`, `verbose`, `debug`, `json` |
| `--dry-run`       | Show plan without executing                                          |
| `--force`         | Overwrite existing output                                            |
| `--verbose`, `-v` | Alias for `--output verbose`                                         |
| `--preset`        | Use a preset configuration                                           |

### Output Modes

| Mode      | Description                                                        |
| --------- | ------------------------------------------------------------------ |
| `silent`  | No output (default, best performance)                              |
| `status`  | Shows tool calls inline: `▸ tool → result ✓`                       |
| `trace`   | Timestamped execution trace: `[HH:MM:SS] ▸ tool → result [0.2s] ✓` |
| `verbose` | Full interactive output with panels                                |
| `debug`   | Trace + metrics (tokens, cost, model)                              |
| `json`    | Machine-readable JSONL events                                      |

## Video/Audio Recipes

### ai-podcast-cleaner

Clean podcast audio with noise reduction, normalization, and transcription.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Basic usage
praison templates run ai-podcast-cleaner recording.wav

# With output directory
praison templates run ai-podcast-cleaner recording.mp3 --output ./cleaned/

# Aggressive cleanup
praison templates run ai-podcast-cleaner recording.wav --preset aggressive

# Dry run
praison templates run ai-podcast-cleaner recording.wav --dry-run
```

### ai-video-to-gif

Convert video to optimized GIF.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-video-to-gif video.mp4
praison templates run ai-video-to-gif video.mp4 --start 10 --duration 3
```

### ai-audio-splitter

Split audio by silence detection.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-audio-splitter long_audio.mp3
praison templates run ai-audio-splitter podcast.wav --min-silence 2.0
```

### ai-video-thumbnails

Extract thumbnails from video.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-video-thumbnails video.mp4
praison templates run ai-video-thumbnails video.mp4 --count 10
```

### ai-audio-normalizer

Normalize audio loudness.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-audio-normalizer audio.mp3
praison templates run ai-audio-normalizer audio.wav --target-lufs -14
```

## Document Recipes

### ai-pdf-to-markdown

Convert PDF to Markdown.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-pdf-to-markdown document.pdf
praison templates run ai-pdf-to-markdown document.pdf --ocr
```

### ai-markdown-to-pdf

Convert Markdown to PDF.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-markdown-to-pdf document.md
```

### ai-pdf-summarizer

Summarize PDF documents.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-pdf-summarizer document.pdf
```

### ai-slide-to-notes

Convert slides to notes.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-slide-to-notes presentation.pdf
```

### ai-doc-translator

Translate documents.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-doc-translator document.md --language es
```

## Image Recipes

### ai-image-optimizer

Optimize images for web.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-image-optimizer ./images/
praison templates run ai-image-optimizer photo.jpg --quality 80
```

### ai-image-cataloger

Catalog images with AI captions.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-image-cataloger ./photos/
```

### ai-screenshot-ocr

Extract text from screenshots.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-screenshot-ocr screenshot.png
```

### ai-image-resizer

Batch resize images.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-image-resizer ./images/
praison templates run ai-image-resizer ./images/ --sizes "1920,1280,640"
```

## Code/Repo Recipes

### ai-repo-readme

Generate README for repository.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-repo-readme ./my-project
```

### ai-changelog-generator

Generate changelog from git history.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-changelog-generator ./my-repo
praison templates run ai-changelog-generator ./my-repo --since v1.0.0
```

### ai-code-documenter

Generate code documentation.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-code-documenter ./src/
```

### ai-dependency-auditor

Audit project dependencies.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-dependency-auditor ./my-project
```

## Data Recipes

### ai-csv-cleaner

Clean CSV files.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-csv-cleaner data.csv
praison templates run ai-csv-cleaner data.csv --drop-duplicates
```

### ai-json-to-csv

Convert JSON to CSV.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-json-to-csv data.json
```

### ai-data-profiler

Profile data files.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-data-profiler data.csv
```

### ai-schema-generator

Generate JSON Schema.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-schema-generator data.json
```

## Web Recipes

### ai-url-to-markdown

Extract article from URL.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-url-to-markdown https://example.com/article
```

### ai-sitemap-scraper

Scrape sitemap URLs.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-sitemap-scraper https://example.com/sitemap.xml
```

## Packaging Recipes

### ai-folder-packager

Package folder with manifest.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-folder-packager ./my-project
praison templates run ai-folder-packager ./my-project --format tar.gz
```

## Output Structure

All recipes produce:

* Primary output files (varies by recipe)
* `run.json` - Execution metadata
* `run.log` - Execution log (if verbose)

### run.json Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "recipe": "ai-podcast-cleaner",
  "version": "1.0.0",
  "started_at": "2024-12-29T00:00:00Z",
  "completed_at": "2024-12-29T00:01:00Z",
  "status": "success",
  "input": "./recording.wav",
  "output_dir": "./outputs/ai-podcast-cleaner/20241229-000000/",
  "config": {},
  "outputs": [
    {"name": "cleaned.mp3", "path": "cleaned.mp3", "size": 1234567}
  ],
  "metrics": {"duration_sec": 60.5}
}
```

## Troubleshooting

### Missing External Dependencies

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Check dependencies
praison tools check

# Install ffmpeg (macOS)
brew install ffmpeg

# Install poppler (macOS)
brew install poppler

# Install pandoc (macOS)
brew install pandoc
```

### Missing API Key

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export OPENAI_API_KEY=your_key_here
```

### Permission Errors

Use `--force` to overwrite existing output:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praison templates run ai-podcast-cleaner recording.wav --force
```
