| Crates.io | packlet |
| lib.rs | packlet |
| version | 0.2.0 |
| created_at | 2025-10-04 10:40:28.271871+00 |
| updated_at | 2025-11-02 16:22:29.866898+00 |
| description | A high-performance tool that bundles local code dependencies into a single markdown file by following import statements from an entry point |
| homepage | |
| repository | https://github.com/kirillleventcov/packlet |
| max_upload_size | |
| id | 1867783 |
| size | 129,017 |
A high-performance tool that bundles local code dependencies into a single markdown file by following import statements from an entry point.
Packlet traverses your codebase starting from any JavaScript or TypeScript file, discovers all locally imported files, and bundles them into a single document. Unlike tools that bundle entire repositories, Packlet only includes files that are actually imported, making it ideal for sharing specific features or debugging dependency chains.
cargo install packlet
Or build from source:
git clone https://github.com/kirillleventcov/packlet
cd packlet
cargo build --release
cargo install --path .
Bundle dependencies from an entry point:
packlet bundle src/index.ts
This creates index.packlet.md containing the dependency tree and all discovered local files.
# Specify output location
packlet bundle src/app.tsx --output bundle.md
# Limit traversal depth
packlet bundle src/index.js --max-depth 3
# Filter by extensions
packlet bundle main.ts --extensions ts,tsx
# Visualize dependency tree only
packlet graph src/index.js
Fast - Parallel dependency analysis using async Rust
Smart - Understands ES modules, CommonJS, dynamic imports, and TypeScript paths
Local-only - Excludes node_modules and external packages automatically
Framework-aware - Handles React, Vue, Svelte, and Angular patterns
Configurable - Control traversal depth, file types, and output format
The generated markdown includes:
Given this structure:
src/
index.ts
utils/helper.ts
components/Button.tsx
Running packlet bundle src/index.ts produces a markdown file with the dependency tree and all three files' contents, properly formatted with syntax highlighting.
Currently supports JavaScript and TypeScript with full understanding of:
Create packlet.toml in your project root for persistent settings:
[output]
format = "markdown"
[javascript]
resolution = "typescript"
tsconfig_path = "./tsconfig.json"
[traversal]
max_depth = 50
MIT