cd /news/ai-tools/ttok-0-4 · home › topics › ai-tools › article
[ARTICLE · art-147971] src=simonwillison.net ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

ttok 0.4

Simon Willison released ttok 0.4, an update to his CLI token-counting tool built on OpenAI's open source tiktoken library. The release fixes a Click warning, updates CI, and adds a --list-models command for listing available models, and the tool can be run via uvx, as in `cat file.txt | uvx ttok`.

read1 min views5 publishedOct 8, 2026

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.

It works with uvx, so you can count tokens in anything like this:

cat file.txt | uvx ttok

Tags: projects, ai, openai, generative-ai, llms, tokenization

── more in #ai-tools 4 stories · sorted by recency
── more on @ttok 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ttok-0-4] indexed:0 read:1min 2026-10-08 · —