| Crates.io | dumpfs |
| lib.rs | dumpfs |
| version | 0.1.0 |
| created_at | 2025-08-07 20:28:27.217839+00 |
| updated_at | 2025-08-07 20:28:27.217839+00 |
| description | A tool for dumping codebase information for LLMs efficiently and effectively |
| homepage | https://github.com/kkharji/dumpfs |
| repository | https://github.com/kkharji/dumpfs |
| max_upload_size | |
| id | 1785774 |
| size | 403,984 |
TLDR: A tool for dumping codebase information for LLMs efficiently and effectively.
It analyzes a codebase and generates a structured representation that can be fed to large language models (LLMs). It supports local directories, individual files, and remote Git repositories even under specific directory.
Status: It's safe to say it's ready for daily use, as I've been using for a while now.
cargo install dumpfs
npm install @kkharji/dumpfs
# Basic usage (current directory, output to stdout)
dumpfs gen
# Scan a specific directory with output to a file
dumpfs gen /path/to/project -o project_dump.md
# Scan with specific output format
dumpfs gen . -o output.xml -f xml
# Copy to the generate content Clipboard
dumpfs gen . --clip
# Filter files using ignore patterns
dumpfs gen . -i "*.log,*.tmp,node_modules/*"
# Include only specific files
dumpfs gen . -I "*.rs,*.toml"
# Show additional metadata in output
dumpfs gen . -smp
# Skip file contents, show only structure
dumpfs gen . --skip-content
# Scan a remote Git repository
dumpfs gen https://github.com/username/repo -o repo_dump.md
# Generate completion (supports bash)
dumpfs completion zsh ~/.config/zsh/completions/_dumpfs
import { scan } from '@kkharji/dumpfs';
// Basic usage - scan current directory
const result = await scan('.');
const llmText = await result.llmText();
console.log(llmText);
// With options - scan with custom settings
const result = await scan('/path/to/project', {
maxDepth: 3,
ignorePatterns: ['node_modules/**', '*.log'],
includePatterns: ['*.js', '*.ts', '*.json'],
skipContent: false,
model: 'gpt4' // Enable token counting
});
// Generate different output formats
const markdownOutput = await result.llmText();
// Customize output options
const customOutput = await result.llmText({
showPermissions: true,
showSize: true,
showModified: true,
includeTreeOutline: true,
omitFileContents: false
});
🚀 Node.js Bindings (NAPI)
@kkharji/dumpfs🧠Token Counting & LLM Integration
âš¡ Enhanced CLI
🔧 Performance Improvements
The architecture supports several important features:
User input (path/URL) → Subject
Subject initializes appropriate source (local/remote)
Scanner traverses files with parallel workers
Files are processed according to type and options
Results are collected into a tree structure
Formatter converts tree to desired output format
Results are saved or displayed
dumpfs is organized into several key modules that work together to analyze and format codebase content for LLMs:
src/subject.rs)src/fs/)src/git/)src/tk/)src/fs/fmt/)src/error.rs)src/cache.rs)src/cli/)