Menu

Replace a headless Claude Code script with Maki to cut token spend
📰

Replace a headless Claude Code script with Maki to cut token spend

DEV Community: rust·Deduped·6 days ago
#Pa7CJEU3
#devtorust#devto#dev#maki#install
Reading 0:00
15s threshold

Headless Claude Code scripts are handy: pipe a prompt in, get structured output out, wire it into CI or a cron job. They are also where token spend quietly piles up, because every run re-reads files in full and drags bash output into the context window.

tontinton/maki is an open source coding agent built around one goal: use as few context tokens as possible. Its README says it can run UI-less with output compatible with Claude Code's stream-json format, which makes it a candidate drop-in for existing scripts. This post covers what it does differently, how to install it, and how to point a headless script at it.

Why it uses fewer tokens

Per the README, maki attacks the biggest token sinks directly:

An index tool uses tree-sitter to produce a skeleton of a file with the exact start and end lines of each item, so the agent can read only the function it needs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.