ttok 0.4

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Very little changes; ttok 0.4 is a maintenance release of a niche token-counting CLI that adds a --list-models flag and fixes a warning.

Read this as

ttok is a free command-line tool by developer Simon Willison that counts tokens, the word fragments that AI models read and charge for. Version 0.4 updates the tool after two idle years, fixing a code warning, refreshing its automated testing setup, and adding a command that lists the AI models it can count tokens for. It now runs via uvx, so anyone with the uv tool installed can pipe any text file into it and get a count. The article gives no usage numbers or benchmarks.

Simon Willison released ttok 0.4, a small maintenance update to his free, open-source command-line token counter, the first change in roughly two years. The update fixes a Click library warning, updates continuous integration, and adds a --list-models option listing supported models. There is no business impact: it is a free developer utility, the article names no customers, costs, or competitors, and nothing here requires action from any organisation.

ttok 0.4 wraps OpenAI's tiktoken library to count tokens from stdin or files. The release fixes a Click deprecation warning, updates CI configuration, and adds a --list-models command enumerating available tiktoken model tokenizers. It is now installable and runnable via uvx, e.g. 'cat file.txt | uvx ttok'. The article states no benchmarks, token counts, or model version specifics beyond that.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

ttok tiktoken Click uvx uv

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading