ttok 0.4
Release: ttok 0.4 ttok is my CLI tool for counting tokens, using OpenAI's open source tiktoken library. It hasn't been in updated in a couple of years, but I finally fixed a Click warning, updated CI, and added a --list-models command to list available models.
The article announces the release of ttok 0.4, a CLI tool for counting tokens using OpenAI's tiktoken library.
What happened
The author released ttok 0.4, an updated version of their CLI tool for token counting. The update includes several improvements and new features.
Why it matters
For AI developers and machine learning engineers, tools like ttok help in efficiently managing and understanding token usage in models, which is crucial for optimizing performance and cost.
- ttok 0.4 offers improved functionality for token counting.
- The new --list-models command provides better model visibility.
- Integration with uvx allows for seamless token counting in file pipelines.
The bigger picture
The update enhances the usability and functionality of ttok, making it more efficient for users to count tokens in their projects.
The release of ttok 0.4 brings several improvements to the token counting tool, benefiting AI developers and engineers.
Technical details
- CLI tool
- OpenAI's tiktoken library
- Click warning fix
- CI update
- -list-models command
- uvx integration
FAQ
What is ttok 0.4?
ttok 0.4 is a CLI tool for counting tokens using OpenAI's tiktoken library.
What new features does ttok 0.4 include?
ttok 0.4 includes fixing a Click warning, updating CI, and adding a --list-models command.
How does ttok 0.4 work with uvx?
ttok works with uvx, allowing users to count tokens in files via a pipeline like 'cat file.txt | uvx ttok'.
This summary and analysis were generated with AI from the original article and may contain errors. Read the original for the full story.
Read the full story
Originally published by Simon Willison on Oct 8, 2026.
Comments
Sign in to join the discussion.