GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者提供的说明(英文原文)
Find out why a TypeScript project is slow: measured analysis and before/after comparison.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"whyts": {
"command": "npx",
"args": [
"-y",
"whyts-mcp"
]
}
}
}在终端中运行这条命令
claude mcp add whyts -- npx -y whyts-mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"whyts": {
"command": "npx",
"args": [
"-y",
"whyts-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"whyts": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"whyts-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
注册名称已通过 GitHub 账户 musatoktas 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.8.10)于16天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有:GitHub, Desktop Commander, Cloudflare MCP
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Find out why your TypeScript project is slow.
A small CLI that turns compiler diagnostics, traces, and import relationships into evidence you can act on. It says where the check is slow, and for three known patterns it also says why and what to do. No account, API key, or LLM required.
npx whyts
Run it in the folder of your tsconfig.json. It runs the real compiler once and prints at most three actions. To prove that a type change helped, use npx whyts compare (see below). To give the same evidence to an AI coding agent, use claude mcp add --transport stdio whyts -- npx -y whyts-mcp.
Found with whyts: a 7.4 s type check that went to 0.06 s (TanStack Form) and vue-tsc going from 80 s to 0.56 s (Vue). See Real cases.
Requires Node.js 20+ and a TypeScript project with dependencies installed.
npx whyts --project .
For repeatable runs, pin a version: npx whyts@0.8.4 --project .
To run from a checkout:
git clone https://github.com/musatoktas/whyts.git
cd whyts npm ci --ignore-scripts npm run demo node src/cli.js --project /path/to/your/tsconfig.json
By default, whyts prints at most three actions and one summary line. Each action has a pattern, a location, a short remedy and a link. The image above is a recorded run. Use --verbose for the full report.
whyts 0.8.5 · TypeScript 5.9.3 · repro-project/tsconfig.json
Check 10.20s · Total 10.80s · 65 files · 1 compiler error · 2 findings in the full report. Use --verbose to see them.
Eight patterns have a remedy. Each one was seen in a real project before it was added.
| Pattern | Trace evidence | Remedy |
|---|---|---|
recursive-type-instantiation | A TS2589 error and the instantiateType_DepthLimit events. whyts finds the type alias that owns the type parameters at the limit, a reference cycle by name between aliases, and a type argument that refers to itself | Stop the expansion on a type that was visited, or add a depth limit |
partial-constraint | A TS2589 error at a type reference, and instantiateType_DepthLimit events inside a generic type. A type parameter of the referenced declaration has a constraint that gives that generic type fewer type arguments than it declares, so the omitted ones take their defaults | Give all type arguments in the constraint, for example any for each. If the constraint is in a dependency, tell its maintainers |
instantiation-expression | A TS2589 error at a type reference to a type alias whose body is a conditional type, such as ReturnType or Parameters. A type argument is an instantiation expression (typeof f ), and the instantiateType_DepthLimit events are not inside that alias | Write the conditional type in place, with the expression as the checked type. For ReturnType, the declared return type of f can be used instead |
builder-chain | A TS2589 error at the start of a chain of method calls, and instantiateType_DepthLimit events inside a class. The method called most often in the chain, followed back through variables, takes and returns that class, and is called at least 32 times | Build the calls as separate values of at most 32 calls each, and join them with the same method. Cutting the chain into variables does not help |
nested-declaration | A TS2589 error at a type or at the name of a declaration, and instantiateType_DepthLimit events inside a generic type. Through type aliases, interfaces and typeof, the type reaches a value whose written type in a declaration file nests that generic type at least 8 levels deep | Write the data type by hand as named interfaces, and annotate the value in its source with a type that names them. If the declaration is in a dependency, tell its maintainers |
callback-inference | A check chain whose focus is a call that took 200 ms or more, and recorded type comparisons and nested checks cover at most 25% of it. The trace has no event for type argument inference. The call gives no type arguments, a generic declaration of the callee has a parameter whose type uses its type parameters, and the argument for it is a function with its own type: a name of a function, or a function whose parameters all have types | In the declaration, wrap the whole parameter type (for a rest parameter, its element type) in NoInfer<...> (TypeScript 5.4 or later). At the call site, give the type argument, or pass an arrow function without parameter types. If the declaration is in a dependency, tell its maintainers |
variance-computation | getVariancesWorker events with the type id, the number of type parameters and the result. whyts reports the outermost events, the largest nested ones, and their union time | Reduce type parameters, simplify return types. An in or out annotation is not a guaranteed fix |
program-load | The program is big, and the check is not. The compiler counters (Total time, Check time, Memory used, parse and bind time) and the import graph. whyts reports the files from node_modules, the largest packages, the file that brings most of them, and the typeof import() references that bring them | Use a narrower entry point, or ask the maintainers of the package to move the references to an opt-in entry point. skipLibCheck does not help: it skips checking, not loading |
A program-load action looks like this (vuetify 4.2.4, a project that only has import { createVuetify } from "vuetify"; the lines are shortened):
1. [measured] Program load: 421 dependency files, vuetify has 407; Check time is 0.01s of 4.22s
Where: ../node_modules/vuetify/lib/framework.d.ts:1:1 The program has 480 files: 421 in node_modules (13.8 MB of source), 58 compiler library files and 1 of your own. ... Memory used 577 MB in the traced run. Largest packages by files: vuetify 407 (12 MB), @vuetify/v0 3 (0 MB), vue 2 (0 MB), ... 409 of them (11.9 MB) come only through 218 typeof import() type references in ../node_modules/vuetify/lib/framework.d.ts, to ../node_modules/vuetify/lib/components/index.d.ts (192), ... Shortest import chain: index.ts -> ../node_modules/vuetify/lib/framework.d.ts -> ../node_modules/vuetify/lib/components/index.d.ts Fix: Each typeof import() reference in ... loads its target for every project that imports the package. Ask the maintainers to move them to an opt-in entry point. skipLibCheck skips checking these files, not loading them. ...
Rules:
measured when the compiler recorded it (the error or the trace events). The name-based walk over type aliases is syntax only: it can miss a cycle that runs through imports it cannot match by name, or through a type that is not a declaration of the program.instantiateType_DepthLimit, getVariancesWorker). In TypeScript 7 they carry a checkerId, and whyts uses one checker, so the type ids stay unique.program-load pattern needs all of these: 200 files or more from node_modules, a Total time of 1 s or more, a Check time of at most 1 s and at most 10% of the Total time, and one file that alone brings 100 files or more (and 25% of the dependency files). The compiler library files and your own files do not count as dependency files. A project with a normal amount of its own code has a larger Check time and does not match. The counters come from the traced run, where Memory used is higher than in a plain run.program-load is a measurement of the program, not of the check. It does not say that removing the files makes the check faster: the check time of such a program is already small. It reads typeof import('pkg') in declaration files as an import. A file that is also brought by a regular import is not counted as brought only by those references.callback-inference is a match of the call shape and of the time that the trace does not explain. The trace has no event for inference, so whyts does not prove that inference is the cost. It reads only the syntax of the callee declarations and of the argument. It does not know which overload the compiler chose. A type parameter that is wrapped in NoInfer deep inside the parameter type still matches: in telegraf (#2016), that form did not change the time, and NoInfer around the whole element type did.whyts found the place in each case below. The tRPC fix is merged. The other fixes are open pull requests in those projects, so they are proposals until the maintainers merge them. The Vuetify row is a measurement in an issue, with no fix. Each number comes from my own measurement on the stated compiler version.
| Project | What whyts found | Result |
|---|---|---|
| tRPC (#6997) | TS2589 in Serialize (serialize.ts:35) when the type contains a recursive JSON type such as Prisma.JsonValue | A fix in PR #7660, merged on 2026-10-19. The repro had TS2589 on main and has no error with the fix. Instantiations went from 89,700 to 78,502. The type-check time of packages/server did not change (within noise) |
| TanStack Form (#1474) | TS2589 in DeepKeys: the type alias refers to itself through DeepKeyAndValueArray | A fix in PR #2422. Check time of the repro went from 7.4 s to 0.06 s (whyts compare, 10 runs, separated). form-core stayed within noise |
| TypeORM (#8559) | TS2589 in QueryDeepPartialEntity (QueryPartialEntity.ts:17) for types that contain themselves | A fix in PR #12943. whyts reports the diagnosis before the change and reports none after it |
| Vue (#14323) | defineModel with a defineEmits call signature that ends in void makes OverloadUnionRecursive (@vue/shared) run to the depth limit. It is 100% of the Check time | A fix in [PR #15851](https://githu
只显示了开头部分;其余内容请在仓库中阅读