Skip to content

Add Anthropic Sonnet-powered LLM GIF generation pipeline#2

Open
apshoemaker wants to merge 1 commit into
mainfrom
codex/linear-mention-dig-6-llm-gifs
Open

Add Anthropic Sonnet-powered LLM GIF generation pipeline#2
apshoemaker wants to merge 1 commit into
mainfrom
codex/linear-mention-dig-6-llm-gifs

Conversation

@apshoemaker

Copy link
Copy Markdown
Owner

Motivation

  • Implement an LLM-driven producer that turns a natural-language prompt into an ND75-ready animated GIF so users can pipe generated animations into the existing push workflow.
  • Use Anthropic (Sonnet) as the model backend and follow TDD: add failing tests first, then implement the feature to satisfy them.

Description

  • Added nd75_screen/llm_gif.py to call the Anthropic Messages API, parse a JSON storyboard, render frames at 135x240 (ND75) and emit GIF bytes via generate_gif_bytes_from_prompt.
  • Added a producer CLI nd75_screen.cli.llm (nd75-llm-gif) that accepts a prompt and writes generated GIF bytes to stdout for piping into nd75-push.
  • Added tests/test_cli_llm.py with TDD-first coverage for CLI stdout behavior, default model wiring (DEFAULT_MODEL), rendering to ND75 size, and reading ANTHROPIC_API_KEY from the environment.
  • Registered the anthropic>=0.84.0 dependency and the nd75-llm-gif script in pyproject.toml, updated README.md with usage examples, and updated the lockfile to include the new deps.

Testing

  • Ran uv run pytest tests/test_cli_llm.py -q initially to confirm the red test (module missing) during TDD, then re-ran after implementation and observed 3 passed for that file.
  • Ran the full test suite with uv run pytest tests/ -q and observed 79 passed indicating no regressions across the project.
  • Verified the new CLI help with uv run python -m nd75_screen.cli.llm --help, which produced the expected usage output.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant