CLI Tool Utilities & Power Tools ★ 2,060 stars on GitHub

ts-prune

Scan your TypeScript project to discover functions, variables, and components that are never used elsewhere.

Get Command-Line Tool →
Command-Line Utility (No Graphical Interface): This program runs inside your system terminal or command prompt rather than opening a desktop window. Follow the official installation instructions below.

Guide and Overview

What it does in plain English

This helpful utility scans your programming project to detect pieces of code that are exported but never actually called or imported anywhere else. It reads your project rules and outputs a neat list of dormant items for you to review.

Who it’s for

  • Software developers maintaining large codebases who want to remove dead code and reduce clutter.
  • Quality assurance engineers ensuring every exported module serves a live purpose.
  • Project maintainers preparing code cleanups before major version updates.

Key features

  • Scans project settings automatically to understand your file structure.
  • Reports unused items with exact file names and line numbers for easy tracking.
  • Ignores specific files or folders using simple regular expressions.

How to install (Download)

You can install this tool directly through your favorite package manager by running npm install --save-dev ts-prune, yarn add --dev ts-prune, or pnpm add --save-dev ts-prune in your project folder. You can also view the project source and releases page at GitHub Releases.

Pros and Cons

  • Pros: Free and open source, runs quickly, leaves source files untouched during analysis.
  • Cons: Cannot automatically detect uses created through complex dynamic imports or software foundation magic.

Optional commercial services unrelated to the open-source developer. Clicking an #ad link helps fund HubHum at no extra cost to you.

  • ★ Top Recommended — Systeme.io: Free-forever all-in-one platform to build landing pages, newsletters, and automated workflows with zero monthly fees — Activate Systeme.io → (#ad)
  • AdGuard: Block intrusive ads, tracking scripts, and phishing domains system-wide across all browsers and desktop apps — AdGuard (#ad)
  • InterServer: Launch and host self-hosted web apps 24/7 on managed Linux cloud VPS servers starting at $3/month — InterServer (#ad)

Official Source & Credits: Official Source / Credits

Affiliate transparency (#ad): Some links on this page are affiliate links. If you choose to activate a service through them, we may earn a commission at no extra cost to you.

Your Saved Favorites

Your favorite apps are saved right here in this browser.


Sign in with one click to link your GitHub profile and sync favorites.