OptionDefaultDescription
--project <path> tsconfig.json Path to the TypeScript project config.
--min-referrers <number> 2 Minimum unique referrer files required for a candidate.
--referrer-count-exclude <globs> none Comma-separated project-relative *, **, and ? globs excluded from eligibility counts but still rewritten.
--placement-style <style> collocation Destination strategy: collocation or repo-types.
--include <kinds> type,interface Declaration kinds included in analysis.
--ignore-file <path> none Candidate IDs, stable keys, or sourcePath#SymbolName entries to ignore.
--include-existing-types false Include declarations in types directories or types.ts files.
--include-generated false Include generated source files in analysis.

Path alias behavior

type-tune reads compilerOptions.baseUrl and compilerOptions.paths from the loaded TypeScript project. When an existing alias can still address the destination, rewritten imports keep that style. Otherwise, a project-relative import is used.

shell
pnpm exec type-tune extract OrderSummary \
  --from src/features/order/schema.ts \
  --to src/features/order/types/order.ts \
  --project tsconfig.json \
  --dry-run