Cook with AI Enrollment closed
AI & LLMs Runs locally

Repo Context Estimator

Paste a file listing with sizes and estimate whether your codebase fits each model context window, with ignore patterns.

ELI5

It checks how much of your project an AI model could read at once.

A little more detail

What this tool does

Pasting a whole repository into a prompt rarely fits. This tool parses the output of commands like du or find, applies ignore patterns for lockfiles and build output, estimates tokens from file sizes, and shows how much of each model context window your code would use.

Use it to
  • Check whether a repo or folder fits a model context window
  • See which directories and file types dominate the token count
  • Test how ignore patterns shrink the context footprint
Interactive workspace Results update as you type
How to get your file list

Run one of these in your repo root, then paste the output below.

Linux

find . -type f -not -path './.git/*' -printf '%s %p\n'

macOS

find . -type f -not -path './.git/*' -exec stat -f '%z %N'  +
File listing
Size units

lines skipped (unparseable).

Ignore patterns

Toggle groups to exclude from the token estimate. Binary and media files are always skipped.

Summary

Paste a file listing to see estimates.

Token estimate uses bytes÷4 (~±15% vs real tokenizers). Only text files that pass your ignore filters count toward the total.

Context fit by model

Sorted by fit first, then lowest window usage. Tight means over 70% of the window.

Model Context window % used Bar Verdict
Breakdown
Top directories by tokens
Directory Tokens %
Top extensions by tokens
Extension Tokens %

Coding agents do not need the whole repo in context at once. Retrieval, search, and file-by-file reading are how real tools work. This page estimates the theoretical paste-everything case.

Your file listing never leaves the browser. Parsing, filtering, and token estimates run entirely on your device. Nothing is uploaded.

Paste output from find or du and the tool totals text file sizes after your ignore rules. Each included byte becomes roughly one token per four bytes, the same chars÷4 heuristic as our token cost calculator.

Compare the estimate against published context windows for major models. Use it to see whether dependencies or build artifacts dominate your footprint, and which window size you need if you ever tried to stuff the whole tree into one prompt.