ByteScope

Context Cost

How many tokens a repo is, what that context window costs, and what the rules files repeat.

The repo stays in this tab. The anonymous event is the tool id, whether a rules file was found, and success or failure. No path, token count, or amount.

Before you scan

  • Token counts use o200k_base. That matches OpenAI. Claude and Gemini usually run 10–30% higher. This is an estimate, not a bill.
  • Only the .gitignore at the repo root is read. A .gitignore in a subfolder is not. .git and node_modules are always skipped.
  • This version does not look for rules that contradict each other. There is no control for it.
  • Paths and the lines of a dead reference or a repeated sentence stay in this tab. They are not uploaded.
  • Suggestions are text on this page. No file is changed.

Repo

Pick the repo root. Subfolders are walked. .git, node_modules, and root .gitignore matches are not opened.

folder
—
files
—

Rate card checked 2026-09-22

Changing these reprices the scan already in this tab. It does not read the folder again.

Browser support

Renaming and deleting files where they sit needs the File System Access API, which only Chromium browsers ship. Everything below happens on your machine either way — nothing is ever uploaded.

capabilityChromeEdgeFirefoxSafari
Open a folder from diskwindow.showDirectoryPicker — Chrome/Edge 86 and later, desktop only✓supported✓supported✗not supported✗not supported
Rename a file in placeFileSystemFileHandle.move — Chrome/Edge 111 and later✓supported✓supported✗not supported✗not supported
Delete a file in placeFileSystemDirectoryHandle.removeEntry✓supported✓supported✗not supported✗not supported
Remember the folder for next timethe handle is kept in IndexedDB on this device; permission is asked again✓supported✓supported✗not supported✗not supported

detected in this browser

  • window.showDirectoryPicker …
  • FileSystemFileHandle.move …
  • indexedDB …

On Firefox or Safari, or on any phone or tablet, this page can explain the job but cannot do it. Open it on desktop Chrome or Edge.

About this tool

Point this page at a repo when the question is how many tokens is my codebase, what it costs to put that tree in a context window, and whether the rules files point at something missing or say the same sentence three times. The walk, the count and the prices stay in this tab.

An estimate, not a bill

The count uses OpenAI's o200k_base tokenizer, loaded with await import() the first time a scan runs. It matches OpenAI models. Claude and Gemini tokenize differently, and the same text is usually 10–30% more tokens there. A claude md token count here is that estimate, not Claude's tokenizer, and it is not an invoice.

The root .gitignore only

Filtering reads the .gitignore at the root of the repo: comments that start with #, blank lines, ! negations, directory rules that end in /, and globs with *, ** and ?. A .gitignore inside a subfolder is not read. .git/ and node_modules/ are always skipped, and a negation cannot bring them back. This version does not look for rules that contradict each other. There is no control for that, because it is not implemented.

The per-turn price is the rules file

The rules check prices the text that is loaded on every turn. Output is 0, because a rules file is read in and nothing is written back. That figure is not the cost of the whole conversation, and it is separate from the context window cost calculator total for the rest of the tree. The cache-hit rate starts high because a system prompt is sent again every turn and usually hits. .cursorrules size is part of that rules total when the file is there.

What stays in this tab

Nothing is uploaded. The anonymous event carries the tool id, whether a rules file was found, and whether the scan succeeded. The screen shows paths, and it shows the line of a dead reference or a repeated sentence, because the line is the finding. Those words stay in this tab. The page never edits a file. A browser without the folder picker still gets this page, including the text below: use the file input.

Frequently asked questions

Is the repo uploaded to count tokens?

No. The walk and the tokenizer run in this tab, in a worker, one file at a time. The anonymous event is the tool id, whether a rules file was found, and success or failure. It does not include a path, a token count, or an amount.

Why does this disagree with Claude's token count?

This page counts with o200k_base, which is the OpenAI tokenizer. Claude and Gemini use different ones. The same text is usually 10–30% more tokens on those. Treat the number as an estimate. Do not pay a bill from it.

Does a .gitignore in a subfolder apply?

No. Only the .gitignore at the root is read. Comments, blank lines, ! negations, directory rules and * / ** / ? globs in that file are honored. A nested .gitignore is ignored in this version, and the page says so. .git/ and node_modules/ are skipped even if a rule names them.

Will this find rules that contradict each other?

No. Contradiction detection is not in this version, and there is no button for it. The check is mechanical: what the rules files cost to load each turn, which backtick paths and script names are missing, and which sentence appears at least three times.

What does the per-turn price include?

Only the rules files, loaded again each turn. Output is 0 because those files are read in and nothing is written back. It is not the price of the rest of the conversation, and it is not the price of stuffing the whole tree into one prompt. That second number is listed separately, as input only, also with no reply.

Which browsers can pick the folder?

Chrome, Edge and Opera on desktop can use the folder picker and can remember it. Firefox and Safari use the file input. The count stays in the tab either way, and this text is on the page for every browser. A text file over 8 MiB is sized and marked tokens-not-counted.