René's URL Explorer Experiment


Title: CLI Arguments | Knip

Open Graph Title: CLI Arguments

Description: Every Knip command-line flag, grouped by mode, scope, fix, output and troubleshooting, with shortcuts and exit codes.

Open Graph Description: Every Knip command-line flag, grouped by mode, scope, fix, output and troubleshooting, with shortcuts and exit codes.

Opengraph URL: https://knip.dev/reference/cli

Generator: Starlight v0.42.10

direct link

Domain: knip.dev

og:typearticle
og:localeen
og:site_nameKnip
twitter:cardsummary_large_image
og:imagehttps://knip.dev/og/docs/reference/cli.webp
twitter:imagehttps://knip.dev/og/docs/reference/cli.webp

Links:

Skip to contenthttps://knip.dev/reference/cli#_top
Kniphttps://knip.dev/
GitHubhttps://github.com/webpro-nl/knip
Blueskyhttps://bsky.app/profile/webpro.nl
npmhttps://www.npmx.dev/package/knip
RSShttps://knip.dev/blog/rss.xml
Bloghttps://knip.dev/blog
Bloghttps://knip.dev/blog
Getting Startedhttps://knip.dev/overview/getting-started
How Knip workshttps://knip.dev/explanations/how-knip-works
Your First Cleanuphttps://knip.dev/overview/first-cleanup
Configurationhttps://knip.dev/overview/configuration
Why use Knip?https://knip.dev/explanations/why-use-knip
Entry Fileshttps://knip.dev/explanations/entry-files
Pluginshttps://knip.dev/explanations/plugins
Configuring Project Fileshttps://knip.dev/guides/configuring-project-files
Production Modehttps://knip.dev/features/production-mode
Configuration Hintshttps://knip.dev/reference/configuration-hints
Compilershttps://knip.dev/features/compilers
Script Parserhttps://knip.dev/features/script-parser
Source Mappinghttps://knip.dev/features/source-mapping
Custom Elementshttps://knip.dev/features/custom-elements
Namespace Importshttps://knip.dev/guides/namespace-imports
Working with CommonJShttps://knip.dev/guides/working-with-commonjs
Monorepos & Workspaceshttps://knip.dev/features/monorepos-and-workspaces
Integrated Monoreposhttps://knip.dev/features/integrated-monorepos
Catalogshttps://knip.dev/features/catalogs
Troubleshootinghttps://knip.dev/guides/troubleshooting
Resolve reported issueshttps://knip.dev/guides/handling-issues
Known Issueshttps://knip.dev/reference/known-issues
Auto-fixhttps://knip.dev/features/auto-fix
FAQhttps://knip.dev/reference/faq
Related Toolinghttps://knip.dev/reference/related-tooling
Adopt Knip graduallyhttps://knip.dev/guides/adopt-gradually
Using Knip in CIhttps://knip.dev/guides/using-knip-in-ci
Performancehttps://knip.dev/guides/performance
Integrationshttps://knip.dev/reference/integrations
CLI Argumentshttps://knip.dev/reference/cli
Configurationhttps://knip.dev/reference/configuration
Dynamic Configurationhttps://knip.dev/reference/dynamic-configuration
Issue Typeshttps://knip.dev/reference/issue-types
Rules & Filtershttps://knip.dev/features/rules-and-filters
JSDoc & TSDoc Tagshttps://knip.dev/reference/jsdoc-tsdoc-tags
Reporters & Preprocessorshttps://knip.dev/features/reporters
Plugins (210)https://knip.dev/reference/plugins
Featureshttps://knip.dev/overview/features
Comparison & Migrationhttps://knip.dev/explanations/comparison-and-migration
Playgroundhttps://knip.dev/playground
Contributing to Kniphttps://knip.dev/guides/contributing
Issue Reproductionhttps://knip.dev/guides/issue-reproduction
Writing A Pluginhttps://knip.dev/writing-a-plugin
Inputshttps://knip.dev/writing-a-plugin/inputs
Argument Parsinghttps://knip.dev/writing-a-plugin/argument-parsing
GitHubhttps://github.com/webpro-nl/knip
Blueskyhttps://bsky.app/profile/webpro.nl
npmhttps://www.npmx.dev/package/knip
RSShttps://knip.dev/blog/rss.xml
Bloghttps://knip.dev/blog
Overviewhttps://knip.dev/reference/cli#_top
Generalhttps://knip.dev/reference/cli#general
--helphttps://knip.dev/reference/cli#--help
--versionhttps://knip.dev/reference/cli#--version
--no-progresshttps://knip.dev/reference/cli#--no-progress
--config [file]https://knip.dev/reference/cli#--config-file
--use-tsconfig-fileshttps://knip.dev/reference/cli#--use-tsconfig-files
--tsConfig [file]https://knip.dev/reference/cli#--tsconfig-file
knip-bunhttps://knip.dev/reference/cli#knip-bun
NO_COLORhttps://knip.dev/reference/cli#no_color
KNIP_DISABLE_RAW_TRANSFERhttps://knip.dev/reference/cli#knip_disable_raw_transfer
Modehttps://knip.dev/reference/cli#mode
--cachehttps://knip.dev/reference/cli#--cache
--cache-locationhttps://knip.dev/reference/cli#--cache-location
--include-entry-exportshttps://knip.dev/reference/cli#--include-entry-exports
--include-subpath-exportshttps://knip.dev/reference/cli#--include-subpath-exports
--no-gitignorehttps://knip.dev/reference/cli#--no-gitignore
--productionhttps://knip.dev/reference/cli#--production
--stricthttps://knip.dev/reference/cli#--strict
--watchhttps://knip.dev/reference/cli#--watch
Scopehttps://knip.dev/reference/cli#scope
--workspace [filter]https://knip.dev/reference/cli#--workspace-filter
--directory [dir]https://knip.dev/reference/cli#--directory-dir
--excludehttps://knip.dev/reference/cli#--exclude
--includehttps://knip.dev/reference/cli#--include
--dependencieshttps://knip.dev/reference/cli#--dependencies
--exportshttps://knip.dev/reference/cli#--exports
--fileshttps://knip.dev/reference/cli#--files
--cycleshttps://knip.dev/reference/cli#--cycles
--tagshttps://knip.dev/reference/cli#--tags
Fixhttps://knip.dev/reference/cli#fix
--fixhttps://knip.dev/reference/cli#--fix
--fix-typehttps://knip.dev/reference/cli#--fix-type
--allow-remove-fileshttps://knip.dev/reference/cli#--allow-remove-files
--formathttps://knip.dev/reference/cli#--format
Outputhttps://knip.dev/reference/cli#output
--preprocessor [preprocessor]https://knip.dev/reference/cli#--preprocessor-preprocessor
--preprocessor-options [json]https://knip.dev/reference/cli#--preprocessor-options-json
--reporter [reporter]https://knip.dev/reference/cli#--reporter-reporter
--reporter-options [json]https://knip.dev/reference/cli#--reporter-options-json
--output-file [reporter=]pathhttps://knip.dev/reference/cli#--output-file-reporterpath
--no-config-hintshttps://knip.dev/reference/cli#--no-config-hints
--no-tag-hintshttps://knip.dev/reference/cli#--no-tag-hints
--treat-config-hints-as-errorshttps://knip.dev/reference/cli#--treat-config-hints-as-errors
--treat-tag-hints-as-errorshttps://knip.dev/reference/cli#--treat-tag-hints-as-errors
--max-issueshttps://knip.dev/reference/cli#--max-issues
--max-show-issueshttps://knip.dev/reference/cli#--max-show-issues
--no-exit-codehttps://knip.dev/reference/cli#--no-exit-code
Troubleshootinghttps://knip.dev/reference/cli#troubleshooting
--debughttps://knip.dev/reference/cli#--debug
--memoryhttps://knip.dev/reference/cli#--memory
--memory-realtimehttps://knip.dev/reference/cli#--memory-realtime
--performancehttps://knip.dev/reference/cli#--performance
--durationhttps://knip.dev/reference/cli#--duration
--performance-fnhttps://knip.dev/reference/cli#--performance-fn
--tracehttps://knip.dev/reference/cli#--trace
--trace-dependency [name]https://knip.dev/reference/cli#--trace-dependency-name
--trace-export [name]https://knip.dev/reference/cli#--trace-export-name
--trace-file [path]https://knip.dev/reference/cli#--trace-file-path
Overviewhttps://knip.dev/reference/cli#_top
Generalhttps://knip.dev/reference/cli#general
--helphttps://knip.dev/reference/cli#--help
--versionhttps://knip.dev/reference/cli#--version
--no-progresshttps://knip.dev/reference/cli#--no-progress
--config [file]https://knip.dev/reference/cli#--config-file
--use-tsconfig-fileshttps://knip.dev/reference/cli#--use-tsconfig-files
--tsConfig [file]https://knip.dev/reference/cli#--tsconfig-file
knip-bunhttps://knip.dev/reference/cli#knip-bun
NO_COLORhttps://knip.dev/reference/cli#no_color
KNIP_DISABLE_RAW_TRANSFERhttps://knip.dev/reference/cli#knip_disable_raw_transfer
Modehttps://knip.dev/reference/cli#mode
--cachehttps://knip.dev/reference/cli#--cache
--cache-locationhttps://knip.dev/reference/cli#--cache-location
--include-entry-exportshttps://knip.dev/reference/cli#--include-entry-exports
--include-subpath-exportshttps://knip.dev/reference/cli#--include-subpath-exports
--no-gitignorehttps://knip.dev/reference/cli#--no-gitignore
--productionhttps://knip.dev/reference/cli#--production
--stricthttps://knip.dev/reference/cli#--strict
--watchhttps://knip.dev/reference/cli#--watch
Scopehttps://knip.dev/reference/cli#scope
--workspace [filter]https://knip.dev/reference/cli#--workspace-filter
--directory [dir]https://knip.dev/reference/cli#--directory-dir
--excludehttps://knip.dev/reference/cli#--exclude
--includehttps://knip.dev/reference/cli#--include
--dependencieshttps://knip.dev/reference/cli#--dependencies
--exportshttps://knip.dev/reference/cli#--exports
--fileshttps://knip.dev/reference/cli#--files
--cycleshttps://knip.dev/reference/cli#--cycles
--tagshttps://knip.dev/reference/cli#--tags
Fixhttps://knip.dev/reference/cli#fix
--fixhttps://knip.dev/reference/cli#--fix
--fix-typehttps://knip.dev/reference/cli#--fix-type
--allow-remove-fileshttps://knip.dev/reference/cli#--allow-remove-files
--formathttps://knip.dev/reference/cli#--format
Outputhttps://knip.dev/reference/cli#output
--preprocessor [preprocessor]https://knip.dev/reference/cli#--preprocessor-preprocessor
--preprocessor-options [json]https://knip.dev/reference/cli#--preprocessor-options-json
--reporter [reporter]https://knip.dev/reference/cli#--reporter-reporter
--reporter-options [json]https://knip.dev/reference/cli#--reporter-options-json
--output-file [reporter=]pathhttps://knip.dev/reference/cli#--output-file-reporterpath
--no-config-hintshttps://knip.dev/reference/cli#--no-config-hints
--no-tag-hintshttps://knip.dev/reference/cli#--no-tag-hints
--treat-config-hints-as-errorshttps://knip.dev/reference/cli#--treat-config-hints-as-errors
--treat-tag-hints-as-errorshttps://knip.dev/reference/cli#--treat-tag-hints-as-errors
--max-issueshttps://knip.dev/reference/cli#--max-issues
--max-show-issueshttps://knip.dev/reference/cli#--max-show-issues
--no-exit-codehttps://knip.dev/reference/cli#--no-exit-code
Troubleshootinghttps://knip.dev/reference/cli#troubleshooting
--debughttps://knip.dev/reference/cli#--debug
--memoryhttps://knip.dev/reference/cli#--memory
--memory-realtimehttps://knip.dev/reference/cli#--memory-realtime
--performancehttps://knip.dev/reference/cli#--performance
--durationhttps://knip.dev/reference/cli#--duration
--performance-fnhttps://knip.dev/reference/cli#--performance-fn
--tracehttps://knip.dev/reference/cli#--trace
--trace-dependency [name]https://knip.dev/reference/cli#--trace-dependency-name
--trace-export [name]https://knip.dev/reference/cli#--trace-export-name
--trace-file [path]https://knip.dev/reference/cli#--trace-file-path
Section titled “General”https://knip.dev/reference/cli#general
Section titled “--help”https://knip.dev/reference/cli#--help
Section titled “--version”https://knip.dev/reference/cli#--version
Section titled “--no-progress”https://knip.dev/reference/cli#--no-progress
Section titled “--config [file]”https://knip.dev/reference/cli#--config-file
Section titled “--use-tsconfig-files”https://knip.dev/reference/cli#--use-tsconfig-files
editor extension, MCP server and language serverhttps://knip.dev/reference/integrations
Section titled “--tsConfig [file]”https://knip.dev/reference/cli#--tsconfig-file
Section titled “knip-bun”https://knip.dev/reference/cli#knip-bun
Bunhttps://bun.sh
known issueshttps://knip.dev/reference/known-issues
Section titled “NO_COLOR”https://knip.dev/reference/cli#no_color
NO_COLORhttps://no-color.org/
picocolorshttps://www.npmx.dev/package/picocolors
Section titled “KNIP_DISABLE_RAW_TRANSFER”https://knip.dev/reference/cli#knip_disable_raw_transfer
Section titled “Mode”https://knip.dev/reference/cli#mode
Section titled “--cache”https://knip.dev/reference/cli#--cache
stale cache resultshttps://knip.dev/reference/known-issues#stale-cache-results
Section titled “--cache-location”https://knip.dev/reference/cli#--cache-location
Section titled “--include-entry-exports”https://knip.dev/reference/cli#--include-entry-exports
includeEntryExportshttps://knip.dev/reference/configuration#includeentryexports
Section titled “--include-subpath-exports”https://knip.dev/reference/cli#--include-subpath-exports
includeSubpathExportshttps://knip.dev/reference/configuration#includesubpathexports
Section titled “--no-gitignore”https://knip.dev/reference/cli#--no-gitignore
Section titled “--production”https://knip.dev/reference/cli#--production
Production Modehttps://knip.dev/features/production-mode
Section titled “--strict”https://knip.dev/reference/cli#--strict
production modehttps://knip.dev/reference/cli#--production
Production Modehttps://knip.dev/features/production-mode
Section titled “--watch”https://knip.dev/reference/cli#--watch
Section titled “Scope”https://knip.dev/reference/cli#scope
Section titled “--workspace [filter]”https://knip.dev/reference/cli#--workspace-filter
filter workspaceshttps://knip.dev/features/monorepos-and-workspaces#filter-workspaces
Section titled “--directory [dir]”https://knip.dev/reference/cli#--directory-dir
Section titled “--exclude”https://knip.dev/reference/cli#--exclude
Section titled “--include”https://knip.dev/reference/cli#--include
off by defaulthttps://knip.dev/guides/namespace-imports
issue typeshttps://knip.dev/reference/issue-types
Section titled “--dependencies”https://knip.dev/reference/cli#--dependencies
Section titled “--exports”https://knip.dev/reference/cli#--exports
Section titled “--files”https://knip.dev/reference/cli#--files
Section titled “--cycles”https://knip.dev/reference/cli#--cycles
cycles reporterhttps://knip.dev/features/reporters#cycles
Section titled “--tags”https://knip.dev/reference/cli#--tags
Section titled “Fix”https://knip.dev/reference/cli#fix
Section titled “--fix”https://knip.dev/reference/cli#--fix
auto-fixhttps://knip.dev/features/auto-fix
Section titled “--fix-type”https://knip.dev/reference/cli#--fix-type
issue typeshttps://knip.dev/reference/issue-types
Section titled “--allow-remove-files”https://knip.dev/reference/cli#--allow-remove-files
Section titled “--format”https://knip.dev/reference/cli#--format
Section titled “Output”https://knip.dev/reference/cli#output
Section titled “--preprocessor [preprocessor]”https://knip.dev/reference/cli#--preprocessor-preprocessor
reporter(s)https://knip.dev/reference/cli#--reporter-reporter
Reporters & Preprocessorshttps://knip.dev/features/reporters
Section titled “--preprocessor-options [json]”https://knip.dev/reference/cli#--preprocessor-options-json
Section titled “--reporter [reporter]”https://knip.dev/reference/cli#--reporter-reporter
Reporters & Preprocessorshttps://knip.dev/features/reporters
Section titled “--reporter-options [json]”https://knip.dev/reference/cli#--reporter-options-json
Section titled “--output-file [reporter=]path”https://knip.dev/reference/cli#--output-file-reporterpath
Writing to a filehttps://knip.dev/features/reporters#writing-to-a-file
Section titled “--no-config-hints”https://knip.dev/reference/cli#--no-config-hints
Section titled “--no-tag-hints”https://knip.dev/reference/cli#--no-tag-hints
Section titled “--treat-config-hints-as-errors”https://knip.dev/reference/cli#--treat-config-hints-as-errors
Section titled “--treat-tag-hints-as-errors”https://knip.dev/reference/cli#--treat-tag-hints-as-errors
Section titled “--max-issues”https://knip.dev/reference/cli#--max-issues
Section titled “--max-show-issues”https://knip.dev/reference/cli#--max-show-issues
Section titled “--no-exit-code”https://knip.dev/reference/cli#--no-exit-code
Section titled “Troubleshooting”https://knip.dev/reference/cli#troubleshooting
Section titled “--debug”https://knip.dev/reference/cli#--debug
debug outputhttps://knip.dev/guides/troubleshooting#debug
Section titled “--memory”https://knip.dev/reference/cli#--memory
Section titled “--memory-realtime”https://knip.dev/reference/cli#--memory-realtime
Section titled “--performance”https://knip.dev/reference/cli#--performance
GitHub issuehttps://github.com/oven-sh/bun/issues/9271
Section titled “--duration”https://knip.dev/reference/cli#--duration
Section titled “--performance-fn”https://knip.dev/reference/cli#--performance-fn
Section titled “--trace”https://knip.dev/reference/cli#--trace
Tracehttps://knip.dev/guides/troubleshooting#trace
Section titled “--trace-dependency [name]”https://knip.dev/reference/cli#--trace-dependency-name
--tracehttps://knip.dev/reference/cli#--trace
Section titled “--trace-export [name]”https://knip.dev/reference/cli#--trace-export-name
--tracehttps://knip.dev/reference/cli#--trace
Section titled “--trace-file [path]”https://knip.dev/reference/cli#--trace-file-path
--tracehttps://knip.dev/reference/cli#--trace
Edit pagehttps://github.com/webpro-nl/knip/edit/main/packages/docs/src/content/docs/reference/cli.md
PreviousIntegrationshttps://knip.dev/reference/integrations
NextConfigurationhttps://knip.dev/reference/configuration
ISC Licensehttps://github.com/webpro-nl/knip/blob/main/LICENSE
Lars Kapperthttps://www.webpro.nl

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.