{"repo":"lirantal/tokenu","free":true,"listed":false,"github":"https://github.com/lirantal/tokenu","clone":"git clone https://github.com/lirantal/tokenu.git","description":"a unix-like du command line tool to count token usage per files and directories","language":"TypeScript","stars":66,"topics":["agent-cli","agents","ai-agents","gpt-3","gpt-tokenizer","large-language-models","llm","tokenization","tokenizer","command-line"],"license":"Apache-2.0","category":"ai-agents","readme_excerpt":"tokenu A Unix du -like CLI that counts token usage per file and directory. Why tokenu? When we needed to find out which folder was eating up disk space, we reached for the classic Linux du command. Today, when writing code with LLMs and AI agents, the question has changed: which folder is eating up my context window? Every time you feed files and directories into a prompt or a coding agent, it's easy to lose control — exceed the model's limits (GPT-5.5, Claude Opus 4.6, Sonnet 4.5, etc), or just burn money on unnecessary context. tokenu answers this question: run a single command and get a directory tree that reveals exactly how many tokens each part of your project consumes. What can you do with it? - Understand your project's token footprint — before pasting a folder into an LLM, see how much of the context window it will consume. - Find expensive files — discover that one auto-generated JSON, lockfile, or bundle that silently blows up your token budget. - Budget context for AI agents — pipe --json output into an autonomous agent pipeline so the agent can plan which files to read within its \"memory budget\". - Guard your context with hooks — build a pre-read hook for tools like Claude Code that blocks or warns before loading files above a certain token threshold, preventing a single huge file from clogging the entire context. - Compare encodings — quickly see how token counts differ across models ( gpt-5.4 vs claude-4.6-opus-high ) to estimate costs before switching. - Audit","default_branch":null,"files":null,"tree":[],"storefront":"/r/lirantal","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lirantal/tokenu/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}