Claude Code config

Token Limit

Monitor how many tokens your code and configs consume in AI tools. Set budgets and get alerts when limits are hit

65 stars 1 forksConfig & memory Source

Install

Install
npx token-limit README.md docs/guide.md

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/azat-io/token-limit.git

From the README

Token Limit

Token Limit helps you monitor how many tokens your AI context files consume. Set token budgets for your prompts, documentation, and configs, then get alerts when limits are exceeded.

Keep your AI costs predictable and avoid hitting context window limits that break your applications.

Why

AI context files are becoming a standard part of modern development workflows. Projects now commonly include .context/, CLAUDE.md, .clinerules, .cursorrules, and other AI instruction files directly in their repositories.

As these files grow in size and complexity, it becomes crucial to monitor their token consumption to avoid unexpected API costs and context window limitations.

Key Features

- Multi-model support for OpenAI GPT and Anthropic Claude
- CI integration to catch budget overruns in pull requests
- Flexible configuration for different AI use cases
- Real token costs instead of inaccurate file sizes
- Cost budgets in dollars and cents, not just tokens
- Up-to-date pricing from OpenRouter API instead of hardcoded values

How It Works

1. Configure your token budgets in token-limit.config.ts, package.json, or other supported formats
2. Analyze files using official tokenizers for each AI model (tiktoken, Anthropic)
3. Report which files exceed limits with detailed breakdowns
4. Prevent costly overruns by failing CI builds when budgets are exceeded

Usage

Quick Start

1. Install Token Limit:

2. Create a configuration file (e.g., token-limit.config.ts or .token-limit.json):

3. Add a script to your package.json:

4. Run the analysis:

Command Line Usage

You can also run Token Limit directly from the command line:

Configuration

Token Limit supports multiple configuration formats to suit your project needs. You can define token limits, models, and file paths in…
Read the full README on GitHub

Details

Language
TypeScript
License
MIT
Last updated
26 April 2026
Topics
aichatgptclaudecontexttokens

FAQ

What is Token Limit?

Monitor how many tokens your code and configs consume in AI tools. Set budgets and get alerts when limits are hit It is a config for Claude Code, from azat-io/token-limit on GitHub.

How do I install Token Limit?

Run npx token-limit README.md docs/guide.md, then follow the setup in the README.

Is Token Limit popular?

azat-io/token-limit has 65 GitHub stars and 1 forks. It was last updated on 26 April 2026.

More config & memory

Browse the most popular Claude Code mods, all config & memory, or the skills and MCP server directories.