git404hub

what is promptscan fr?

joandino/promptscan — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5Setup · easy

tl;dr

PromptScan is a command-line tool that statically scans your codebase for LLM API calls and reports each prompt's token count, dollar cost, duplicates, and dead code.

vibe map

mindmap
  root((PromptScan))
    What it does
      Scans code for LLM calls
      Estimates token cost
      Flags duplicate prompts
    Tech stack
      Node.js
      TypeScript
      tree-sitter
    Use cases
      Pre-ship cost estimate
      CI cost comments
      Find dead prompts
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Estimate the dollar cost of every LLM prompt in your codebase before shipping.

VIBE 2

Find duplicate or near-duplicate prompts scattered across your project.

VIBE 3

Run in CI to comment on a pull request with prompt cost and diff changes.

VIBE 4

Spot prompt constants and context blocks nothing references anymore.

what's the stack?

Node.jsTypeScripttree-sitter

how it stacks up fr

joandino/promptscan0xkinno/astraea0xkinno/halcyon
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardhard
Complexity2/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Requires Node 18 or newer, supports Python, TypeScript, and JavaScript codebases.

in plain english

PromptScan is a command line tool that scans your codebase to find every place your code calls a large language model API, and reports how many tokens each prompt uses and roughly how much it costs in dollars. Along the way it flags prompts that are duplicated across your code, prompt text stored in a constant that nothing in the code actually uses anymore, and prompts that have quietly grown very large. It works through static analysis, reading your source files rather than running your program or calling any API, so there is no key to configure and nothing gets sent anywhere. Because it only reads code, if a prompt is built at runtime from a database value or a request parameter, PromptScan marks that call as unresolved instead of guessing what the text might be. It understands Python, TypeScript, and JavaScript code, and recognizes calls made through the OpenAI, Anthropic, and LangChain libraries, as well as the litellm router library in Python and the Vercel AI SDK in TypeScript, tracing model and provider names back through variables, constructor calls, and imports across files. It requires Node 18 or newer to run. Unlike tools such as LangSmith, Langfuse, or Helicone, which watch your calls after they run in production, PromptScan looks at the code itself, so it can catch a cost problem before anything ships and costs nothing to run since there is no live API traffic involved. You install it globally with npm, or run it without installing using npx. The basic command scans a folder and prints a summary table of call sites, token counts, and estimated cost, with options to output full JSON, add a projected monthly bill based on your own usage numbers, or compare the prompts changed between two git commits. Output columns mark whether a number is an exact count, an approximation, or only partially resolved. There is also a free browser based version where you can paste a code snippet and see its cost estimate without installing anything.

prompts (copy fr)

prompt 1
Run PromptScan on my src folder and explain the duplicate prompts it finds.
prompt 2
Show me how to add a volume config to PromptScan for a projected monthly LLM bill.
prompt 3
Help me set up PromptScan in a GitHub Actions CI pipeline to check pull requests.
prompt 4
What does PromptScan's confidence marker mean for an unresolved prompt?

Frequently asked questions

what is promptscan fr?

PromptScan is a command-line tool that statically scans your codebase for LLM API calls and reports each prompt's token count, dollar cost, duplicates, and dead code.

What language is promptscan written in?

Mainly TypeScript. The stack also includes Node.js, TypeScript, tree-sitter.

How hard is promptscan to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is promptscan for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.