Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: all upSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

TokenLens

Registry of LLM model information including context sizes for AI applications.

Prompts, structured output and evals npm MIT

Used in agent projects
12
0.2% of 4,818 JS/TS repos built with AI coding agents; 41 counting our dependency samples
Gid Score
39 /100
#2644 of 3,794 tools, #49 in prompts, structured output and evals · ranking
Rank in prompts, structured output and evals
#7 of 72
by use in those projects
Downloads
543K
npm, last 7 days, tokenlens
GitHub stars
268
13 forks · last push Jul 2, 2026

How TokenLens is used

TokenLens is a dependency in 12 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 41 projects, and what it is used with below comes from all of them. The most used alternative in our scan is GPT Tokenizer (14 projects). Projects that use it most often also use AI SDK (100.0%), Class Variance Authority (100.0%), clsx (100.0%).

TokenLens popularity over time

Top tools by Gid Score

TokenLens: downloads per weeknpm, tokenlens 543,482
TokenLens: GitHub starsxn1cklas/tokenlens 268

Gid Score 39: downloads 58, use in agent projects 38, GitHub stars 0, downloads trend 62 (each 0-100). How it is calculated.

Often used with TokenLens

AI SDK100.0% of TokenLens projects · 22.7× more than average
Class Variance Authority100.0% of TokenLens projects · 6.1× more than average
clsx100.0% of TokenLens projects · 5.1× more than average
Lucide React100.0% of TokenLens projects · 5.0× more than average
Streamdown100.0% of TokenLens projects · 194.0× more than average
Radix UI97.6% of TokenLens projects · 7.5× more than average
Nanoid (JavaScript)97.6% of TokenLens projects · 59.4× more than average
Tailwind Merge97.6% of TokenLens projects · 5.2× more than average

From all 41 projects in our scan that use TokenLens, including the dependency samples.

By coding agent

Cursor0.4% of projects set up for it
Claude Code0.2% of projects set up for it
GitHub Copilot0.2% of projects set up for it

Share of public repos configured for each agent that list TokenLens as a dependency.

Install

Packagenpm install tokenlens
Main stacksNext.js (34), TypeScript / JavaScript (7)
Example projectsmastra-ai/ui-dojo, LiorVainer/data-israel, agents-ui/agents-kit, ssdeanx/AgentStack, nsoybean/nira-ai

Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside TokenLens are not listed here; they are in "Often used with".

Tool Gid Score Used in agent projectsDownloads / wk GitHub starsLicense
GPT Tokenizer npm
JavaScript BPE tokenizer with pricing and token counts for OpenAI models.
44 14 (0.3%) 1.2M 855 MIT
tiktoken (JavaScript) npm
JavaScript/WASM bindings for OpenAI's tokenizer for token counting.
43 10 (0.2%) 806K 1,073 MIT
js-tiktoken npm
JavaScript implementation of OpenAI's tiktoken for counting and encoding tokens.
51 5 (0.1%) 5.7M 1,073 MIT

More in Prompts, structured output and evals: Ultracite tiktoken (Python) tokenizers LangSmith Langfuse (Python) @graphql-codegen/typescript-operations partial-json TOON

Is TokenLens right for your project? Ask AgentGid →