An AI-powered essay generation, review, and revision pipeline using OpenRouter via the Vercel AI SDK.
To install dependencies:
bun installSet the OPENROUTER_API_KEY environment variable:
export OPENROUTER_API_KEY=your_api_key_hereOr create a .env file:
OPENROUTER_API_KEY=your_api_key_here
To run:
bun run index.tsThe CLI will prompt you for an essay topic, then:
- Generate an initial essay using model A
- Review the essay using model B
- Generate a revised essay using model A with the feedback
All outputs are saved as markdown files in the runs/ directory.
This project was created using bun init in bun v1.3.2. Bun is a fast all-in-one JavaScript runtime.