Show HN: Ctoken – CLI util to count LLM tokens in files, dirs or input RimantasZ released Ctoken, a CLI utility that counts LLM tokens in files, directories, or stdin input, similar to how cloc counts lines of code. The tool helps developers estimate context window usage for coding agents and LLM-based apps, supporting grouping by file type, filtering by glob patterns, and customizable profiles. Ctoken is available via Homebrew, .deb package, Windows zip, and Cargo install from GitHub. ctoken is a cli utility to count tokens in a file or a directory and its contents — similar to how cloc is used for lines code. Useful for understanding how much context a file or directory would consume when feeding it to a coding agent. When developing AI agends or LLM based apps in general, sometimes it is interesting to know how much a certain data will impact context window - that is how much tokens a certain file or set of files will translate to. There are various options - estimate it by size or word count, use various calculators on the web, or call one of LLM providers APIs - but all of them become inconvenient when this needs to be done repeadedly or on larger set of files. Thats where ctoken utility comes in - type ctoken