ttok 0.4
Why CEREBRO kept it
Earlier ttok CLI release; token counting utility
The text below is an automated extraction of the article at https://simonwillison.net/2026/Oct/8/ttok/, stored verbatim in the public cerebro-vault repository. Copyright remains with the original publisher (simonwillison.net).
<p><strong>Release:</strong> <a href="https://github.com/simonw/ttok/releases/tag/0.4">ttok 0.4</a></p> <p><code>ttok</code> is my CLI tool for counting tokens, using OpenAI's open source <a href="https://github.com/openai/tiktoken">tiktoken</a> library.</p> <p>It hasn't been in updated in a couple of years, but I finally fixed a Click warning, updated CI, and added a <code>--list-models</code> command to list available models.</p> <p>It works with <code>uvx</code>, so you can count tokens in anything like this:</p> <pre><code>cat file.txt | uvx ttok </code></pre> <p>
Backlinks
Appeared in 1 briefing