# Recipes

# Recipes

End-to-end shell pipelines that chain `visa-cli` commands into deployable
artifacts. Every recipe uses the canonical `--json` envelope contract
documented in the [CLI piping guide](https://github.com/Visa-Crypto-Labs/Visa-mono/blob/main/docs/agents/CLI_PIPING.md).

These pages are versioned alongside the CLI — a contract test (see
`packages/cli/tests/unit/recipe-surface.test.ts`) checks that every
subcommand and flag referenced in these recipes exists in the CLI surface on
every PR, so the docs can't drift from the binary.

| Recipe | Outcome | Approx cost |
|---|---|---|
| [A — Landing site builder](/docs/recipes/a-landing-site) | Deployable single-page site with logo, hero, copy, ambient music | ~$0.17 |
| [B — Album drop](/docs/recipes/b-album) | 90s instrumental track + cover art + music video bundle | ~$0.21 |
| [C — Podcast episode](/docs/recipes/c-podcast) | Article URL → script → narrated audio + cover art | ~$0.11 |
| [D — Vision-critic refinement loop](/docs/recipes/d-vision-loop) | N rounds of image generation + LLM critique | ~$0.05 × N |
| [E — PR description auto-writer](/docs/recipes/e-pr-writer) | `git diff` → polished PR body | ~$0.04 |
| [F — Voice-cloned audiobook chapter](/docs/recipes/f-audiobook) | Reference audio + chapter text → narrated MP3 | ~$0.03 / chapter |
| [G — Image → 3D asset](/docs/recipes/g-image-to-3d) | Prompt → reference image → printable mesh | ~$0.12 |
| [H — Multi-modal news roundup](/docs/recipes/h-news-roundup) | Topic → 5 headlines + per-story illustration | ~$0.21 |

## Prerequisites

- `visa-cli >= 2.1.0` (introduces the `--json` envelope contract)
- An enrolled card (`visa-cli cards add`)
- A funded balance (`visa-cli balance topup --amount 5`)
- `jq` for JSON field extraction (or use `--from-stdin <field>` instead)

## Running a recipe

Every recipe is a self-contained `bash` script. To run:

```bash
chmod +x recipe.sh
./recipe.sh
```

The `--yes` flag on every paid command in the recipes is what lets them run
in non-TTY shells (cron, CI, scripts). Strip it if you want each charge to
require an interactive confirmation.
