OSS Tanbou

find unused files, dependencies, and exports across JavaScript and TypeScript projects

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
12,379
Primary language
TypeScript
License
ISC
Repository last updated
Sep 29, 2026
On this page

Overview

Knip is a CLI for finding unused files, dependencies, exports, and related issues in JavaScript and TypeScript projects. It analyzes entrypoints and tool configuration to trace reachable code, reports unused or unlisted dependencies, supports monorepos, and can auto-fix selected issue types.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Report unused files, dependencies, exports, and related issues together

Knip analyzes source and project configuration to report unused files, dependencies, unlisted dependencies, exports, and multiple other issue categories in one run.

Sources: [2][5]

Infer real entrypoints from plugins and project configuration

Plugins understand common tool and framework conventions so analysis is not limited to a raw import graph. Project-specific reachability gaps can be addressed with explicit entries and configuration.

Sources: [4][5]

Best fit

Fits dead-code cleanup before refactors and continuous checks in CI

It is useful for exposing unused code and dependencies during cleanup work, maintaining monorepos, and preventing unused code from accumulating again through CI checks.

Sources: [2][4]

Before adoption

Do not treat every reported item as an automatic deletion instruction

The official guide recommends checking reachability and configuration when a result looks wrong instead of immediately ignoring or deleting it. Confirm why an item is reported before removing code.

Sources: [4]

Version 6.38.0 requires Node.js 20.19+ on the supported 20.x line or Node.js 22.12+

The 6.38.0 package metadata requires Node.js ^20.19.0 || >=22.12.0. When using auto-fix, keep the fix scope explicit and review the resulting diff before accepting it.

Sources: [6][5]

Official sources

  1. [1]webpro-nl/knip repository(2026-09-30)
  2. [2]Knip README(2026-09-30)
  3. [3]Knip getting started guide(2026-09-30)
  4. [4]Knip first cleanup guide(2026-09-30)
  5. [5]Knip CLI reference(2026-09-30)
  6. [6]Knip 6.38.0 package metadata(2026-09-30)
  7. [7]Knip 6.38.0 release(2026-09-30)
  8. [8]Knip ISC license(2026-09-30)
Supplemental curator note

Knip is valuable because it understands many tool-driven entrypoints that simple import scans miss. Its report should still be treated as analysis rather than a deletion command, with reachability and plugin configuration checked before cleanup.

Try it in 3 steps

  1. 1

    Create a Knip configuration

    Run the recommended setup to add Knip and initial project configuration. Knip v6 requires Node.js 20.19.0 or newer.

    npm init @knip/config
  2. 2

    Limit the first report

    Start with a small report and inspect why unused files, dependencies, or exports are being reported before changing code.

    npm run knip -- --max-show-issues 5
  3. 3

    Auto-fix only unused exports

    Keep the automatic fix scope limited to unused exports. Review the diff afterward and confirm findings are not caused by missing entrypoints or configuration.

    npm run knip -- --fix --exports
Check the official README

Growth

Growth trends · Last 30 days

12,379 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • deadcode
  • dependency-analysis
  • dependency-management
  • javascript
  • lint
  • linter
  • maintenance
  • typescript
  • unused-code
  • unused-exports
Stars
12,379
Forks
506
Watchers
16
Open issues
18
Owner type
Organization
Primary language
TypeScript
License
ISC
Repository last updated
Sep 29, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?