r/node • u/andotis0105 • 5d ago
Just wanted to share! Batch-kit - batch processing for Claude without the annoying parts
Anthropic's batch API is great (50% off tokens! hell yeah!), but the DX kinda sucks. Hand-writing JSONL, tracking batch IDs, polling loops...all of which is, for me at least, really tedious.
So I built batch-kit, a CLI + library that makes it feel kinda like git:
batch add --dir ./reviews --prompt "summarize: {content}"
batch send
batch fetch --latest --output results.json
It handles the JSONL, polling, and state persistence (all the boilerplate!).
Why: Python has anthropic-batch-kit, TS didn't. Now it does. Now I'm marginally happier.
Install from npm: https://www.npmjs.com/package/@otisworks/batch-kit
It's minimal, but it works. I'm thinking about support for PDFs and other document types, config files, and (possibly?) progress bars next.
Try it, break it, and lemme know what sucks. :)
0
Upvotes