What you need

The npm package requires Node.js 22 or newer. Its launcher runs a platform-specific Rust binary. Supported hosts are:

  • macOS arm64 and x64
  • Linux x64 with glibc or musl
  • Windows x64

On any other platform, running the CLI fails with an unsupported-platform error. Scan one tsconfig.json at a time. In a monorepo, repeat the command for each package you want to analyze.

Install the npm package

Published releases are on npm and GitHub Releases . Source and issues live in the repository .

pnpm add -D type-tune

Run the binary that the local install provides:

shell
pnpm exec type-tune --version
# after npm install -D type-tune:
npx type-tune --version

pnpm exec and npx use the project install when type-tune is already a dependency. A bare npx type-tune scan --project tsconfig.json without that dependency downloads the package for one invocation.

Run the first scan

scan is read-only. It lists exported type aliases and interface declarations in .ts and .tsx files selected by the project config. The default --project is tsconfig.json, and a candidate needs two referrer files outside its own file.

shell
pnpm exec type-tune scan --project tsconfig.json
pnpm exec type-tune scan --project tsconfig.json --explain

--explain reports why discovered exported declarations were excluded, such as insufficient referrers or an existing type location. Generated files are excluded during discovery unless --include-generated is specified. Declaration files such as .d.ts are not candidates. .vue, .svelte, .astro, and JavaScript files are not scanned or rewritten.

The examples on this site use pnpm exec. After npm install -D type-tune, replace that prefix with npx and keep the same arguments.

When the scan shows a declaration you might move, continue with the scan, plan, review, dry-run, and apply workflow . To move one symbol you already chose, see the extract example .