Skip to main content
Glama
README.md
<div align="center">

# ๐Ÿฅ’ macro-pickle

<img src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=700&size=22&pause=1000&color=6366F1&center=true&vCenter=true&multiline=true&repeat=true&width=640&height=80&lines=Local+AI+Creative+Tooling+%7C+No+Database;Image+%2B+Video+Gen+%E2%9A%A1+Typed+Prompt+Engine;Gemini+%E2%80%A2+Imagen+%E2%80%A2+fal.ai+%E2%80%A2+Veo+%E2%80%A2+Kling" alt="Typing SVG" />

[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://typescriptlang.org)
[![Gemini](https://img.shields.io/badge/Gemini-Vision-8B5CF6?style=for-the-badge&logo=google&logoColor=white)](https://ai.google.dev)
[![Imagen](https://img.shields.io/badge/Imagen-4.0-EC4899?style=for-the-badge&logo=google&logoColor=white)](https://ai.google.dev)
[![fal.ai](https://img.shields.io/badge/fal.ai-FLUX_%2B_Kling-7C3AED?style=for-the-badge&logoColor=white)](https://fal.ai)
[![MCP](https://img.shields.io/badge/MCP-desktop_server-F59E0B?style=for-the-badge)](https://modelcontextprotocol.io)
[![License](https://img.shields.io/badge/License-MIT-A855F7?style=for-the-badge)](LICENSE)

[![PRSMTECH](https://img.shields.io/badge/maintained_by-PRSMTECH-6366F1?style=for-the-badge&labelColor=0C0C0C)](https://github.com/PRSMTECH)
[![MrJPTech](https://img.shields.io/badge/author-MrJPTech-6366F1?style=for-the-badge&labelColor=0C0C0C)](https://github.com/MrJPTech)

<img src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png" alt="rainbow line" width="100%"/>

**๐Ÿฅ’ Local, database-free AI creative tooling โ€” image & video generation plus a typed, brand-aware Prompt Engine, driven through Claude. No database, no web app. Big dill. ๐ŸŒถ๏ธ**

</div>

## ๐Ÿ‘€ What it is

`macro-pickle` is a command-line + MCP toolkit for generating brand-aware imagery and video and for engineering the prompts behind them. There is **no database and no web app** โ€” every rail writes files to disk, and finalized prompts are exported as copy-paste markdown you can drop into any notes vault.

It runs through Claude โ€” CLI scripts via `tsx`, a desktop **MCP server**, and Claude Code **skills/commands** โ€” with **Google** (Gemini vision, Imagen, Veo, Nano Banana) and **fal.ai** (FLUX et al., Kling video) as the generation backends.

## ๐Ÿšฆ Quick start (0 to pickle in 60 seconds ๐Ÿƒ๐Ÿ’จ)

**Prerequisites:** Node 20+, [pnpm](https://pnpm.io), and at least one API key.

```bash
git clone https://github.com/MrJPTech/macro-pickle.git
cd macro-pickle
pnpm install

cp .env.example .env.local        # then add your keys (see below)
pnpm lint                         # tsc --noEmit โ€” verifies the install
pnpm prompt --brands              # list the installed brand profiles
pnpm img "a neon pickle mascot, dark studio bg"     # Imagen โ†’ PNG on disk
```

### ๐Ÿ”‘ Keys

Everything is optional except the backend you actually use โ€” nothing is required to *build* prompts, only to render pixels.

| Variable | Needed for | Get one |
|:---|:---|:---|
| `GOOGLE_API_KEY` | Gemini vision/OCR, Imagen, Veo, Nano Banana, Omni Flash | [ai.google.dev](https://ai.google.dev) |
| `FAL_KEY` | Kling video + FLUX / Recraft / Ideogram / SD3.5 images | [fal.ai](https://fal.ai) |
| `BYTEPLUS_API_KEY` ยท `RUNWAY_API_KEY` ยท `REPLICATE_API_TOKEN` | Optional extra video providers via the model registry | see [`.env.example`](.env.example) |

### ๐Ÿ“ Where output goes

All paths are yours to set โ€” the defaults are all repo-relative, so a fresh clone works with no configuration.

| Variable | Default | What it controls |
|:---|:---|:---|
| `MACRO_PICKLE_EXPORT_DIR` | `./generated-images` | Where rendered images/clips land. Point it at a synced folder (iCloud/Drive/Dropbox) to review on your phone. |
| `MACRO_PICKLE_PROMPT_VAULT` | `./exported-prompts` | Where `--save` writes finalized prompt notes. Point it at an Obsidian/Logseq vault to collect them there. |
| `MACRO_PICKLE_OMNI_DIR` | falls back to export dir | Default output for `pnpm omni` video edits. |
| `MACRO_PICKLE_BRANDS_DIR` | `content/brands` | Where brand profiles are loaded from โ€” keep private brands outside the repo. |

<details>
<summary><b>โšก Scripts (buttons to mash ๐ŸŽฎ)</b></summary>

| Command | What it does |
|:--------|:-------------|
| `pnpm prompt` | Build image/video prompts via the **Prompt Engine** (`--image`/`--video`, `--brand`, `--json`, `--save`, `--gen`) |
| `pnpm img` | Imagen 4.0 reference-image generation โ†’ `MACRO_PICKLE_EXPORT_DIR` |
| `pnpm fal` | fal.ai image models (FLUX / Recraft / Ideogram / SD3.5) โ€” Prompt Engine parity |
| `pnpm nano` | **Nano Banana** face-lock generation from reference photos (likenesses you have rights to) |
| `pnpm veo` | Google **Veo** video โ€” text-to-video, image-to-video, and `--refs` ASSET identity lock |
| `pnpm kling` | **Kling** video via fal.ai โ€” i2v / t2v / start+end interpolation |
| `pnpm describe` | Gemini vision: product **OCR + in-use scene recommendation** (UGC rail); `--paddle` for the local OCR sidecar |
| `pnpm ocr` | Optional local **PaddleOCR** sidecar (high-recall small/CJK text + geometry) |
| `pnpm analyze-video` | Describe a reference/competitor clip for mirroring |
| `pnpm scene:new`/`refs`/`select`/`analyze`/`video` | **Media pipeline** โ€” two-stage: text โ†’ reference frames โ†’ curate โ†’ re-prompt to video ([docs/media-pipeline.md](docs/media-pipeline.md)) |
| `pnpm rank-skus` ยท `pnpm gen-clips` | **Store batch clips** โ€” rank a store's SKUs by sales โ†’ generic referenceโ†’video batch (Veo free + Kling paid), spend-gated |
| `pnpm omni` ยท `pnpm seedance` ยท `pnpm wan` | Gemini **Omni Flash** conversational video editing ยท Seedance ยท Wan video rails |
| `pnpm models` | Browse / select across the cross-provider video-model registry |
| `pnpm mcp:image` | Run the `macro-pickle-images` desktop **MCP server** |
| `pnpm lint` | Type-check the whole toolkit (`tsc --noEmit`) |

</details>

<details>
<summary><b>๐ŸŽจ Prompt Engine (the secret sauce ๐Ÿงช)</b></summary>

`scripts/lib/prompts/` turns the methodology in [`content/knowledge/PROMPT-COOKBOOK.md`](content/knowledge/PROMPT-COOKBOOK.md) (synthesized from a fleet of reference repos) into typed, deterministic builders โ€” **no DB required**:

| Piece | What it does |
|:------|:-------------|
| `buildImagePrompt` | Nano Banana "Perfect Prompt" formula โ€” Subject + Action + Context + Composition + Lighting + Style |
| `buildVideoPrompt` | Seedance/Veo "Director Brief" โ€” Scene ยท Subject ยท Camera ยท Action ยท Audio ยท Pacing + time-segmented beats + on-screen captions |
| Brand profiles | `content/brands/*.json` โ€” style, palette, prefer/avoid, suffix, IP-safe cast proxies; auto-applied via `--brand` |
| UGC layer | `scripts/lib/prompts/ugc.ts` โ€” faceless short-form selling formats (hero still โ†’ lifestyle still โ†’ 9:16 spot) |
| `lintScene` | Continuity & IP-safety linter โ€” single-beat, fixed-camera, stationary-cycle, atmospherics |

> ๐Ÿ““ **Export convention:** finalized prompts are written as copy-paste markdown โ€” `pnpm prompt โ€ฆ --save`, or `save: true` on the MCP build tools. They land in `./exported-prompts/` unless you point `MACRO_PICKLE_PROMPT_VAULT` at a notes vault.

</details>

<details>
<summary><b>๐ŸŽฌ Media Pipeline โ€” idea โ†’ references โ†’ video (the <code>scene:*</code> flow ๐ŸŽž๏ธ)</b></summary>

The two-stage workflow at the heart of the toolkit: turn an idea into **reference images**, curate the winners, then **re-prompt them into video** โ€” across Nano Banana / Imagen / Veo / Kling / Gemini. A local `scene.json` manifest tracks every prompt, frame, and clip ([full walkthrough](docs/media-pipeline.md)).

```bash
pnpm scene:new    my-scene        # scaffold scene.json (reference + video prompts)
pnpm scene:refs   my-scene        # Stage 1 โ€” generate reference-frame candidates
pnpm scene:select my-scene <ids>  # curate the keepers
pnpm scene:analyze my-scene       # (optional) Gemini grounding of the picks
pnpm scene:video  my-scene        # Stage 2 โ€” selected frames โ†’ Veo clip
```

| Piece | What it does |
|:------|:-------------|
| `scene-store` | Local JSON manifest โ€” prompts, frames, selections, clips per scene |
| `PromptEnhancer` | Gemini chain-of-thought prompt rewriter (+ exemplar banks) that **directs** your idea |
| `groundFrames` | Image โ†’ understanding feedback loop โ€” keeps Stage 2 on-subject / on-brand |
| Veo modes | `ingredients` (ASSET refs) ยท `firstLast` (firstโ†’last frame) ยท `firstFrame` (i2v) |

> Built on the **same `scripts/lib/` clients** as the rest of the toolkit โ€” one set of model clients, no duplication.

</details>

<details>
<summary><b>๐Ÿค– MCP server, skills & commands (Claude's toolbelt ๐Ÿ› ๏ธ)</b></summary>

- **MCP** (`macro-pickle-images`, `pnpm mcp:image`) โ€” exposes `build_image_prompt`, `build_video_prompt`, `describe_product`, `build_ugc_spot`, `analyze_reference_video`, `lint_scene`, `generate_image`, `generate_video` to Claude Desktop.
- **Skills** (`.claude/skills/`) โ€” `openmontage-video-prompting` (cinematography), `ugc-shortform-prompting` (selling layer), `character-lock` (identity / face lock).
- **Commands** (`.claude/commands/`) โ€” `/pickle-prompt` ยท `/pickle-ugc` ยท `/pickle-pipeline` (`scene:*`) ยท `/pickle-winners` โ†’ `/pickle-clips` (rank winners โ†’ batch clips) ยท `/pickle-ref` (clean references) ยท `/pickle-describe` (OCR + scene rec) ยท `/pickle-character` (face-lock) ยท `/pickle-brand` (new brand profile).

</details>

<details>
<summary><b>๐Ÿ› ๏ธ Stack (what's under the hood ๐ŸŽ๏ธ)</b></summary>

| Layer | Technology |
|:------|:-----------|
| Language / runtime | TypeScript (strict, ESM) on Node via `tsx` |
| Image / video | `@google/genai` (Gemini ยท Imagen ยท Veo ยท Nano Banana) ยท `@fal-ai/client` (FLUX ยท Kling) |
| MCP | `@modelcontextprotocol/sdk` |
| Validation | `zod` |
| Optional OCR sidecar | Python + PaddleOCR (`scripts/py/`, opt-in) |

</details>

<details>
<summary><b>๐Ÿ“‚ Layout (where the bodies are buried โšฐ๏ธ๐Ÿ—บ๏ธ)</b></summary>

```
macro-pickle/
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ lib/                # generation cores: imagen, fal, veo, kling, nano-banana, vision, paddleocr
โ”‚   โ”‚   โ”œโ”€โ”€ prompts/        # the Prompt Engine (builders, brand, scene, export, ugc, lint)
โ”‚   โ”‚   โ””โ”€โ”€ pipeline/       # scene-store + prompt-enhancer + exemplars + presets
โ”‚   โ”œโ”€โ”€ pipeline/           # scene:new/refs/select/analyze/video CLI
โ”‚   โ”œโ”€โ”€ generate-*.ts       # pnpm img / fal / nano / veo / kling
โ”‚   โ”œโ”€โ”€ build-prompt.ts     # pnpm prompt
โ”‚   โ”œโ”€โ”€ describe-product.ts ยท ocr.ts ยท analyze-video.ts   # vision / OCR rails
โ”‚   โ”œโ”€โ”€ gen-clips.ts ยท rank-skus.ts   # store batch-clip rails
โ”‚   โ””โ”€โ”€ py/                 # optional PaddleOCR sidecar
โ”œโ”€โ”€ mcp/image-server/       # macro-pickle-images desktop MCP
โ”œโ”€โ”€ content/
โ”‚   โ”œโ”€โ”€ brands/             # brand profiles (*.json) โ€” `quiet-desk` is the worked example
โ”‚   โ”œโ”€โ”€ briefs/             # scene briefs โ€” `example-logo/` shows the format
โ”‚   โ”œโ”€โ”€ clip-scenes/        # per-store batch-clip scene configs (`example-store.json`)
โ”‚   โ””โ”€โ”€ knowledge/          # PROMPT-COOKBOOK.md methodology
โ””โ”€โ”€ .claude/                # skills + slash commands
```

</details>

## ๐Ÿ“œ License

MIT โ€” see [LICENSE](LICENSE). Free as a pickle at a deli counter. ๐Ÿฅช

<img src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png" alt="rainbow line" width="100%"/>

<div align="center">

**๐Ÿง‘โ€๐Ÿณ Lovingly brined by [MrJPTech](https://github.com/MrJPTech) ยท a [PRSMTECH](https://github.com/PRSMTECH) project**

**๐Ÿ“… Last Updated**: July 2026 ยท **Status**: ๐ŸŽจ Local database-free creative toolkit โ€” image + video gen, Prompt Engine, MCP ยท **Vibe**: kind of a big dill ๐Ÿฅ’

[![Back to top](https://img.shields.io/badge/Back%20to%20Top-โ†‘-6366F1?style=for-the-badge)](#-macro-pickle)

<img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&customColorList=6,11,20&height=100&section=footer" width="100%" />

</div>