← Products CLI ยท Rust / Python Source ↗ tc Like wc, but for tokens. Counts tokens in files or stdin using o200k_base. Install brew install omarish/tap/tc tctc counting tokens in three files, then in a pipeline.tc$tc README.md main.go encoding.go2288 README.md1304 main.go389 encoding.go3981 total$printf 'Explain this diff.' | tc4$Counts tokens, not characters or words.Always o200k_base -- the encoding GPT-4oreads.One count per file, then a total. The sameshape wc has printed since 1971.With no files it reads stdin, so it dropsinto a pipeline without ceremony.