{"slug": "show-hn-ttsc-typescript-v7-toolchain-plugin-and-codegraph-reducing-90-tokens", "title": "Show HN: TTSC, TypeScript v7 ToolChain, plugin and codegraph reducing 90% tokens", "summary": "Samchon released TTSC, a TypeScript v7 toolchain that includes a compiler-powered plugin system, a type-safe executor (ttsx), a lint tool (@ttsc/lint), and an MCP code graph (@ttsc/graph) that reduces token usage for coding agents by up to 86%. The toolchain supports multiple bundlers and includes VS Code integration, aiming to improve developer productivity and AI-assisted coding efficiency.", "body_md": "A `typescript-go`\n\ntoolchain for compiler-powered plugins and type-safe execution.\n\n: build, check, and transform.`ttsc`\n\n: execute TypeScript with type checking.`ttsx`\n\n: lint violations as compiler errors.`@ttsc/lint`\n\n: MCP code graph that reduce token usage.`@ttsc/graph`\n\n**plugin support**: compiler-powered libraries, such as`typia`\n\n.\n\nInstall `ttsc`\n\n, `@ttsc/lint`\n\n, and the native TypeScript compiler:\n\n```\nnpm install -D ttsc @ttsc/lint typescript\n```\n\nRun TypeScript directly with `ttsx`\n\n(CLI command):\n\n```\nnpx ttsx src/index.ts\n```\n\nBuild, check, or watch the project with `ttsc`\n\n:\n\n```\nnpx ttsc\nnpx ttsc --noEmit\nnpx ttsc --watch\n```\n\nRewrite source files in place with the `@ttsc/lint`\n\nformat rules:\n\n```\nnpx ttsc format\n```\n\nUse `@ttsc/unplugin`\n\nwhen a bundler owns your build.\n\nIt runs `ttsc`\n\nplugins inside supported bundlers.\n\n```\nnpm install -D ttsc @ttsc/lint typescript\nnpm install -D @ttsc/unplugin\n```\n\nMinimal Vite setup:\n\n``` python\n// vite.config.ts\nimport ttsc from \"@ttsc/unplugin/vite\";\nimport { defineConfig } from \"vite\";\n\nexport default defineConfig({\n  plugins: [ttsc()],\n});\n```\n\nSupported bundlers:\n\n- Vite\n- Rollup\n- Rolldown\n- esbuild\n- Webpack\n- Rspack\n- Next.js\n- Farm\n- Bun\n\nSee [ @ttsc/unplugin](https://github.com/samchon/ttsc/tree/master/packages/unplugin) for full setup and adapter options.\n\nReact Native and Expo bundle with Metro, so the `ttsc`\n\nCLI and `@ttsc/unplugin`\n\nnever run. `@ttsc/metro`\n\nis a Metro transformer that runs `ttsc`\n\nplugins on each TypeScript file, then hands the result to your existing Expo or React-Native Babel transformer.\n\n```\nnpm install -D ttsc @ttsc/lint typescript\nnpm install -D @ttsc/metro\n```\n\nWrap your Metro config (CommonJS, the standard for `metro.config.js`\n\n):\n\n``` js\n// metro.config.js (Expo)\nconst { getDefaultConfig } = require(\"expo/metro-config\");\nconst { withTtsc } = require(\"@ttsc/metro\");\n\nmodule.exports = withTtsc(getDefaultConfig(__dirname));\n```\n\nFor bare React Native, wrap `getDefaultConfig`\n\nfrom `@react-native/metro-config`\n\ninstead. See [ @ttsc/metro](https://github.com/samchon/ttsc/tree/master/packages/metro) for options and the v1 caveats.\n\nInstall the VS Code extension for live TypeScript-Go editor features plus saved-state ttsc plugin diagnostics and actions.\n\nInstall it from the VS Code Marketplace by searching `ttsc`\n\n, or run:\n\n```\nnpx @ttsc/vscode\n```\n\nThen turn on format-on-save in `.vscode/settings.json`\n\n:\n\n```\n\"[typescript][typescriptreact]\": {\n  \"editor.defaultFormatter\": \"samchon.ttsc\",\n  \"editor.formatOnSave\": true\n}\n```\n\nLint fixes stay off-save by default; opt in with `\"editor.codeActionsOnSave\": { \"source.fixAll.ttsc\": \"explicit\" }`\n\n.\n\nSee [ @ttsc/vscode](https://github.com/samchon/ttsc/tree/master/packages/vscode) for requirements and settings.\n\n`@ttsc/graph`\n\ngives a coding agent a checker-resolved map of your project, over MCP.\n\nIt answers what relates to a symbol and what a change affects, straight from the type checker, so the agent stops grepping and re-reading files.\n\nIt also carries the project's full diagnostics: type errors, `@ttsc/lint`\n\nviolations, and plugin findings. They are fused onto the graph, so an agent sees a change's reach over what is already broken before editing.\n\n```\nnpm install -D ttsc @ttsc/graph typescript\n```\n\nPoint your agent's MCP client at it. For Claude Code:\n\n```\n{\n  \"mcpServers\": {\n    \"ttsc-graph\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ttsc/graph\"]\n    }\n  }\n}\n```\n\nOn codegraph's own agent-cost benchmark, Claude agents answer reading zero files, cutting tokens by 77% to 86% and tool calls by 94% to 95%. See [ @ttsc/graph](https://github.com/samchon/ttsc/tree/master/packages/graph) and the\n\n[benchmark](https://ttsc.dev/docs/benchmark/graph).\n\nYour agent picks the tools up from the MCP handshake and uses them on its own. See [Setup](https://ttsc.dev/docs/setup#coding-agents-ttscgraph) for the full walk-through.\n\nPlugins let libraries add compile-time checks, transforms, and type-driven code generation to normal `ttsc`\n\nand `ttsx`\n\nruns.\n\n```\n# compile\nnpx ttsc\n\n# execute\nnpx ttsx src/index.ts\n```\n\nA transform uses TypeScript types to generate JavaScript before runtime.\n\n``` python\nimport typia, { tags } from \"typia\";\nimport { v4 } from \"uuid\";\n\nconst matched: boolean = typia.is<IMember>({\n  id: v4(),\n  email: \"samchon.github@gmail.com\",\n  age: 30,\n});\nconsole.log(matched); // true\n\ninterface IMember {\n  id: string & tags.Format<\"uuid\">;\n  email: string & tags.Format<\"email\">;\n  age: number &\n    tags.Type<\"uint32\"> &\n    tags.ExclusiveMinimum<19> &\n    tags.Maximum<100>;\n}\n```\n\nThe transform replaces `typia.is<IMember>()`\n\nwith dedicated JavaScript checks at build time:\n\n``` python\nimport typia from \"typia\";\nimport * as __typia_transform__isFormatEmail from \"typia/lib/internal/_isFormatEmail\";\nimport * as __typia_transform__isFormatUuid from \"typia/lib/internal/_isFormatUuid\";\nimport * as __typia_transform__isTypeUint32 from \"typia/lib/internal/_isTypeUint32\";\nimport { v4 } from \"uuid\";\n\nconst matched = (() => {\n  const _io0 = (input) =>\n    \"string\" === typeof input.id &&\n    __typia_transform__isFormatUuid._isFormatUuid(input.id) &&\n    \"string\" === typeof input.email &&\n    __typia_transform__isFormatEmail._isFormatEmail(input.email) &&\n    \"number\" === typeof input.age &&\n    __typia_transform__isTypeUint32._isTypeUint32(input.age) &&\n    19 < input.age &&\n    input.age <= 100;\n  return (input) => \"object\" === typeof input && null !== input && _io0(input);\n})()({\n  id: v4(),\n  email: \"samchon.github@gmail.com\",\n  age: 30,\n});\nconsole.log(matched); // true\n```\n\nEmbed `ttsc`\n\nfrom another Node tool with the `TtscCompiler`\n\nclass:\n\n``` js\nimport { TtscCompiler } from \"ttsc\";\n\nconst compiler = new TtscCompiler({ cwd: \"./project\" });\nconst result = compiler.compile();\n\nif (result.type === \"success\") {\n  for (const [path, text] of Object.entries(result.output)) {\n    // path is project-relative (\"dist/index.js\", \"dist/index.d.ts\", ...)\n    console.log(path, text.length);\n  }\n} else if (result.type === \"failure\") {\n  for (const d of result.diagnostics) {\n    console.error(`${d.file}:${d.line}:${d.character} ${d.messageText}`);\n  }\n}\n```\n\nWhen one process transforms a project's files repeatedly (a watch server, an editor, a codegen tool), `TtscService`\n\nkeeps the compiler host warm instead of recompiling per call. It compiles the project once, then answers per-file transform requests, and reflects in-memory edits through `updateFile`\n\n:\n\n``` js\nimport { TtscService } from \"ttsc\";\n\nconst service = new TtscService({ cwd: \"./project\" });\ntry {\n  const code = await service.transformFile(\"src/index.ts\");\n  await service.updateFile(\"src/index.ts\", \"export const x: number = 2;\\n\");\n  const next = await service.transformFile(\"src/index.ts\");\n} finally {\n  service.dispose();\n}\n```\n\n`TtscService`\n\nruns through the linked-plugin host, so the project must declare at least one transform-stage plugin.\n\nSee the [Programmatic API guide](https://ttsc.dev/docs/ttsc/api) for the full lifecycle, plugin overrides, and patterns. For browser embedding, see [ @ttsc/wasm](https://github.com/samchon/ttsc/tree/master/packages/wasm) and the higher-level\n\n[package.](https://github.com/samchon/ttsc/tree/master/packages/playground)\n\n`@ttsc/playground`\n\n`ttsc`\n\nships a few small utility plugins in this repository.\n\n: adds`@ttsc/banner`\n\n`@packageDocumentation`\n\nJSDoc banners.: lints and formats TypeScript source.`@ttsc/lint`\n\n: MCP server exposing a checker-resolved code graph and diagnostics to coding agents.`@ttsc/graph`\n\n: rewrites source path aliases so JS and declaration emit receive relative imports.`@ttsc/paths`\n\n: removes configured calls and`@ttsc/strip`\n\n`debugger`\n\nstatements.: runs`@ttsc/unplugin`\n\n`ttsc`\n\nplugins inside bundlers supported by`unplugin`\n\n.: runs`@ttsc/metro`\n\n`ttsc`\n\nplugins inside Metro for React Native and Expo.\n\nPlugin authors should start from the [ Guide Documents](https://ttsc.dev/docs).\n\nEcosystem plugins are listed below; PRs adding `ttsc`\n\nplugins are welcome.\n\n: generates NestJS routes, OpenAPI, and SDKs.`nestia`\n\n: generates validators, serializers, and type-driven runtime code.`typia`\n\nThanks for your support.\n\nYour [donation](https://github.com/sponsors/samchon) encourages `ttsc`\n\ndevelopment.", "url": "https://wpnews.pro/news/show-hn-ttsc-typescript-v7-toolchain-plugin-and-codegraph-reducing-90-tokens", "canonical_source": "https://github.com/samchon/ttsc", "published_at": "2026-07-10 11:08:30+00:00", "updated_at": "2026-07-10 11:35:23.991471+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-tools"], "entities": ["Samchon", "TTSC", "TypeScript", "Vite", "Claude Code", "VS Code", "Expo", "Metro"], "alternates": {"html": "https://wpnews.pro/news/show-hn-ttsc-typescript-v7-toolchain-plugin-and-codegraph-reducing-90-tokens", "markdown": "https://wpnews.pro/news/show-hn-ttsc-typescript-v7-toolchain-plugin-and-codegraph-reducing-90-tokens.md", "text": "https://wpnews.pro/news/show-hn-ttsc-typescript-v7-toolchain-plugin-and-codegraph-reducing-90-tokens.txt", "jsonld": "https://wpnews.pro/news/show-hn-ttsc-typescript-v7-toolchain-plugin-and-codegraph-reducing-90-tokens.jsonld"}}