Usage
Here are some common ways to use reclaimspace:
Interactive Mode (Default)
This is the default behavior. It lists all the folders, and you can select which ones to delete.
npx reclaimspace
Auto-Delete Everything
This will find all reclaimable items and delete them automatically without confirmation.
npx reclaimspace --yes
Dry Run (Preview)
This will list all the items that can be deleted but won't actually delete anything.
npx reclaimspace --dry
Scan a Specific Folder
You can specify one or more directories to scan.
npx reclaimspace <foldername>
Combine Flags and Folders
You can combine any of the flags with a specific folder.
npx reclaimspace --yes my-project
Enable Build Analysis
This will enable build analysis logs.
npx reclaimspace --build-analysis
Ignore Certain Folders
You can exclude folders from the scan by providing a comma-separated list of patterns.
npx reclaimspace --ignore "node_modules,dist"
Include Only Specific Folders
You can specify a comma-separated list of patterns to include in the scan. When this flag is used, only folders matching these patterns will be considered.
npx reclaimspace --include "my-custom-build,temp-files"
Features
- Interactive Deletion: Navigate through a list of found items and select which ones to delete.
- Categorized & Grouped: Results are grouped by type for clarity.
- Size Information: See the size of each item and the total reclaimable space.
- Concurrent Scanning: Quickly finds and processes files.
- Build Artifact Detection: Intelligently detects build folders.
- Auto-Delete Mode: Use the
--yesflag to delete all found items without confirmation. - Dry Run Mode: Use the
--dryflag to see what would be deleted without actually deleting anything. - Ignore Patterns: Exclude specific folders or patterns using a
.reclaimspacercfile or the--ignoreflag. - Clickable Paths: Paths displayed in the terminal are clickable links (requires terminal emulator support).
- Cool Logo: Displays a cool logo when you run the tool.
Configuration
You can create a .reclaimspacerc file in the root of your project to specify folders and
patterns to ignore.
Example .reclaimspacerc file:
# Ignore all node_modules folders
node_modules
# Ignore a specific build folder
my-project/dist
Detected Items
reclaimspace detects the following categories:
- Node Modules
node_modules
- Build/Cache Folders
.next,dist,build,storybook-static,.nuxt,.svelte-kit,.angular,out,.expo,.turbo,.cache
- Testing/Reporting Folders
coverage,.nyc_output
Contributing
Contributions are welcome! Please read the contributing guidelines to get started.