Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Whytype

БесплатноНе проверен

Give coding agents the TypeScript compiler's actual reasoning — MCP server + CLI that turn type errors into because-chains pointing at the declaration to fix

GitHubEmbed

Описание

Give coding agents the TypeScript compiler's actual reasoning — MCP server + CLI that turn type errors into because-chains pointing at the declaration to fix

README

The compiler, explaining itself. An agent debugging TypeScript sees what tsc prints: the flattened summary of a forty-line elaboration. The actual cause — a declaration three levels down the reasoning, often in another file — never reaches the context window, so the agent guesses: a cast, an any, another wasted edit–compile–fail loop. WhyType extracts the compiler's own reasoning — because-chains, inference bindings, conditional-type verdicts — and hands it to whoever is debugging, agent or human:

npm i -D whytype && npx whytype init   # MCP server registered; agents stop guessing

Playground: whytype.dev · Docs: whytype.dev/docs · npm: whytype

Parts

  • whytype on npm (core/) — MCP server for agents (npx whytype mcp: whytype_diagnostics / whytype_explain / whytype_snippet), one-command setup (npx whytype init, --hooks for a Claude Code PostToolUse check), CLI (npx whytype file:line:col, whytype check), and the extraction engine as a library.
  • Playgroundwhytype.dev: click an error, read the reasoning; a gallery of the greatest hits of TS confusion (examples button). Runs entirely client-side — the compiler lives in a web worker, nothing leaves the tab; sharing is a compressed #code/... URL.
  • VS Code extension (extension/) — renders the same because-chain for your own project's tsserver diagnostics via a "Why?" quick fix.

Architecture

  • engine/ — the extraction engine, worker-hosted. TS 6 (the last JS-based compiler, aliased as typescript-strada) is the data source until the tsgo stable API lands in TS 7.1; every internal-API touch is quarantined in engine/adapter.ts, the single seam for that port.
  • Conditional-type verdicts are never approximated: the engine synthesizes probe aliases (type __WT_P0 = [check] extends [target] ? ... : ...) into one extra program and reads back what the checker actually decided.
  • src/ — Vite + React + Monaco playground UI.
  • spike/ — Phase 0 feasibility spike and the Node test harness.

Develop

npm install        # also copies TS lib files into engine/libs/
npm run dev        # playground on http://localhost:5173
npm test           # engine test harness (tsx spike/test-engine.ts)
npm run build      # production build to dist/

Privacy

Your code never leaves the tab — analysis is 100% in-browser, there is no backend. The hosted playground page loads self-hosted Plausible page analytics (cookieless, counts visits only; it sees URLs, never editor content). Share links encode code into the URL fragment — fragments are never transmitted to servers; the recipient's browser decompresses the code locally.

License

MIT © Eldora Studio

from github.com/zeelib1/whytype

Установка Whytype

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/zeelib1/whytype

FAQ

Whytype MCP бесплатный?

Да, Whytype MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Whytype?

Нет, Whytype работает без API-ключей и переменных окружения.

Whytype — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Whytype в Claude Desktop, Claude Code или Cursor?

Открой Whytype на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Whytype with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development