Repository navigation
Conversation
- bench/generate-api-fixtures.mjs: SYNTHETIC HEY API responses generated from basecamp/hey-sdk openapi.json (go/v0.31.1, the SDK behind hey 1.7.0) - bench/capture.mjs: runs the real hey binary against a local read-only mock API (or, with --real, read-only commands against your own account; output gitignored) and records --json and --styled output - bench/tokens.mjs (npm run bench:tokens): counts tokens with js-tiktoken o200k_base and cl100k_base for hey --json, hey --styled, hey-axi TOON and hey-axi --json; --write refreshes docs/benchmarks.md - docs/benchmarks.md: results, methodology, limitations, rerun guide - test/bench.test.js: allowlist, mock is GET-only, bench runs, docs in sync
This was referenced Oct 2, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A reproducible token-usage benchmark comparing what an agent reads from raw HEY CLI output vs hey-axi output for 9 representative commands:
box list,box view imbox, a longthread read,label list,screener list,event week,todo list, a pagedsearch, and an error response.npm run bench:tokenscounts tokens with js-tiktokeno200k_baseandcl100k_basefor:hey … --jsonhey … --styled(human output)--jsonhey-axi runs for real against a replay of the captured HEY response.
--writerefreshesdocs/benchmarks.md;--realuses your own captures.npm run bench:captureruns the real HEY CLI v1.7.0 binary againstbench/lib/mock-hey-api.mjs, a local mock API that answers GET only and returns 405 for anything else. It usesHEY_BASE_URL, a dummyHEY_TOKENand a throwawayHOME, so both outputs come from HEY's real formatting code.--realinstead runs the read-only allowlist (bench/commands.mjs) against your logged-in account and writes to the gitignoredbench/captures/real/.npm run bench:fixturesregenerates the synthetic API responses from basecamp/hey-sdkopenapi.json@go/v0.31.1(the SDK hey 1.7.0 is built on). Shapes come from the spec, values are invented, and per-endpoint shapers produce the structure the CLI interprets. Everything is checked in and markedsynthetic: true.docs/benchmarks.mdcovers results, takeaways, methodology, limitations, and how to rerun on your own mailbox. Linked from the README.test/bench.test.js: the commands are on the read-only allowlist, the mock refuses non-GET, the benchmark runs on the synthetic captures, and the docs table matches a fresh run.Results (synthetic data, measured)
Measured on synthetic captures from hey 1.7.0, tokenizers from js-tiktoken. Negative % = hey-axi output is larger.
o200k_base (GPT-4o / GPT-4.1 / o-series)
hey --jsonhey --styled--jsonhey --json--styledcl100k_base (GPT-4 / GPT-3.5)
hey --jsonhey --styled--jsonhey --json--styledTakeaways:
hey --json, and 35–44% on flat lists.--styledoutput is 5–24× smaller than either JSON form, because it shows only a few columns.Limitations
@anthropic-ai/tokenizeris Claude 2-era. OpenAI encodings are used as a proxy.How tested
npm test: 85/85 pass (81 existing + 4 new). Usesjs-tiktoken, a new devDependency pinned in the lockfile.Needs real-HEY testing
On your Mac:
npm ci && npm run bench:capture -- --real && npm run bench:tokens -- --real. It's read-only, the output is gitignored, andBENCH_THREAD_IDpicks a long thread.Targets
main. Not for auto-merge.