Skip to content

Back to the catalog

simonwillison.nettool

ttok 0.4

ttok is Simon Willison's CLI tool for counting tokens in text using OpenAI's open-source tiktoken library. This 0.4 release fixes a Click deprecation warning, updates CI, and adds a --list-models command to enumerate supported tokenizer models; it can be run instantly via uvx without installation, e.g. piping a file's contents into it to get a token count.

TL;DR Simon Willison's tiktoken-based CLI for counting tokens gets a small maintenance release (0.4) with a new --list-models flag.

Organisations named here

  • OpenAI
  • Simon Willison

Technologies named here

  • ttok
  • tiktoken
  • Click
  • uvx
  • OpenAI API
  • Python