Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>KnipNew to Visual Studio Code? Get it now.
Knip

Knip

Lars Kappert

|
892 installs
| (2) | Free
| Sponsor
Find unused files, dependencies, and exports in JavaScript/TypeScript projects
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Knip Editor Extension for VS Code/Open VSX

The Knip Editor Extension for VS Code/Open VSX is powered by Knip: Find unused files, dependencies, and exports in your JavaScript/TypeScript projects.

  • Website: knip.dev
  • GitHub repo: webpro-nl/knip
  • Follow @webpro.nl on Bluesky for updates
  • Blogpost: Knip for Editors & Agents
  • Sponsor Knip

What Is This?

The usual suspects like red squiggles for unused exports are there. What really moves the needle for DX with Knip's module graph is navigation. A completely unique way to view & fly through codebases for developers who care. Connect the dots during development and refactors, while keeping things in check. We're starting out with 3 key features:

  1. Hover over Export for import & usage locations
  2. Imports Tree View for direct links to implementations
  3. Exports Tree View for direct links to import & usage locations

Features

  • Diagnostics for unused files, dependencies, and exports
  • Hover on exports to see import locations
  • Tree views for imports and exports
  • Code actions to fix or ignore issues
  • CodeLens showing import counts for exports

MCP Tools

The extension provides MCP tools for coding agents:

  • knip-configure — Run Knip and configure
  • knip-docs — Get Knip documentation by topic

In other words, you can tell your coding agent to "configure knip" and it will RTFM so you don't have to. Using a newer model results in an optimized knip.json file and an uncluttered codebase.

Screenshots

  • Lint Findings
  • Imports & Exports
  • Contention
    • Circular Dependencies
    • Conflicts
    • Branching
  • VS Code Extension Settings

Lint Findings

Lint Findings

Imports & Exports

hover

Contention

The IDE extension shows extra issues in the tree views like circular dependencies. We're starting out with some extra novelties like conflicting and branched/diamond-shaped import chains.

Circular Dependencies

If an import is part of a circular dependency, Knip will display:

Circular Dependencies

Conflicts

TypeScript shows direct conflicts when importing or re-exporting the same named export from different files. Except when the problem is more subtle and the chain spans more than one file. Knip warns:

Conflicts

Branching

Branched or diamond-shaped imports chains indicate unnecessary re-exports and complexity. They help to untangle large codebases and shrink or get rid of barrel files. Knip warns:

Branching

VS Code Extension Settings

VS Code Extension Settings

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft