Paths-LE: Zero Hassle Path Extraction
Extract thousands of paths in under a second
JavaScript, TypeScript, JSON, HTML, CSS, TOML, CSV, and Environment files
⚡ See It In Action
Before: Manually searching through 500 lines for import paths (15 minutes)
import { Button } from './components/Button'
import { Header } from '../layout/Header'
// ... 50 more imports scattered across files
After: One command extracts all 52 paths in under a second
./components/Button (line 1)
../layout/Header (line 2)
./utils/helpers (line 15)
... (52 paths total)
Time Saved: Minutes → Under a second ⚡
✅ Why Paths-LE?
- Extract thousands of paths in under a second - Faster than manual searching
- Zero Config - Install → Press
Cmd+Alt+P → Done
- Battle-Tested - 289 unit tests, 93.55% coverage, zero critical vulnerabilities
- Security-Hardened - 64 tests prevent path traversal, symlink exploits, injection attacks
Perfect for refactoring, dependency audits, and import analysis.
🙏 Thank You
If Paths-LE saves you time, a quick rating helps other developers discover it:
⭐ Open VSX • VS Code Marketplace
Key Features
- Complete path detection - Absolute, relative, Windows, Unix formats
- Powerful post-processing - Deduplicate and sort (alphabetically or by length)
- Dependency analysis - Identify missing files and circular dependencies
- 9 file formats - JavaScript, TypeScript, JSON, HTML, CSS, TOML, CSV, ENV, Log
- Smart filtering - Excludes npm packages (like 'react' or 'lodash')
- Cross-platform - Handles both Windows and Unix paths
- Canonical resolution 🆕 - Monorepo and symlink support (disabled by default for security)
- 13 languages - English, Chinese, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Portuguese, Russian, Ukrainian, Vietnamese
🚀 More from the LE Family
💡 Use Cases
- Import Analysis - Extract local imports from JS/TS (auto-excludes npm packages)
- Asset Auditing - Find all images, scripts, and styles referenced in HTML/CSS
- Config Validation - Pull file paths from JSON/TOML configs for verification
- Dependency Mapping - Track file references across your codebase
TOML & Environment Files
Extract file paths from configuration files:
# Extract from config.toml
[paths]
data_dir = "./data"
log_file = "/var/log/app.log"
backup_path = "C:\\backups\\app"
# Extract from .env
DATABASE_PATH=./data/app.db
LOG_FILE=/var/log/app.log
BACKUP_DIR=C:\backups
CSV Data Analysis
Extract paths from CSV data files:
path,type,description
./src/main.js,file,Main application file
/var/log/app.log,file,Application log
C:\Users\Name\data,dir,User data directory
Dependency Mapping & Validation
- Map file dependencies across JavaScript/TypeScript projects
- Identify missing or broken references in HTML/CSS
- Validate configuration file paths
- Analyze import patterns and detect circular dependencies
🚀 Quick Start
- Install from Open VSX or VS Code Marketplace
- Open any supported file (
.js, .ts, .json, .html, .css, .toml, .csv, .env)
- Run
Paths-LE: Extract Paths (Cmd+Alt+P / Ctrl+Alt+P)
- Use Deduplicate Paths or Sort Paths commands for post-processing
📋 Available Commands
Paths-LE provides 9 commands accessible via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Extract Paths (
Cmd/Ctrl+Alt+P) - Extract all file paths from current document
Post-Processing
- Deduplicate Paths - Remove duplicate path entries while preserving order
- Sort Paths - Sort extracted paths with multiple modes:
- Alphabetical (A → Z)
- Alphabetical (Z → A)
- By Length (Short → Long)
- By Length (Long → Short)
Settings & Help
- Open Settings - Quick access to extension settings
- Help & Troubleshooting - Comprehensive in-editor documentation
- Export/Import/Reset Settings - Manage extension configuration
- Create Test Fixture - Generate a complete test environment for canonical path resolution
⚙️ Configuration
Paths-LE has minimal configuration to keep things simple. Most settings are available in VS Code's settings UI under "Paths-LE".
Key settings include:
- Output format preferences (side-by-side, clipboard copy)
- Safety warnings and thresholds for large files
- Notification levels (silent, important, all)
- Status bar visibility
- Local telemetry logging for debugging
For the complete list of available settings, open VS Code Settings and search for "paths-le".
📁 Supported File Types
Paths-LE supports 9 file types for path extraction:
| File Type |
Extensions |
What Gets Extracted |
| JavaScript |
.js, .mjs, .cjs |
import/require/export with local paths |
| TypeScript |
.ts, .tsx, .mts, .cts |
import/require/export with local paths |
| JSON |
.json |
Path-like strings (absolute, relative, URLs) |
| HTML |
.html |
src, href, data, action, poster, etc. |
| CSS |
.css, .scss, .less |
url() and @import paths |
| TOML |
.toml |
All string values that look like paths |
| CSV |
.csv |
Path values in any column |
| Environment |
.env, .env.local |
Path values in environment variables |
| Log/Text |
.log, .txt |
Pre-extracted paths for analysis |
Smart Features
- JavaScript/TypeScript: Excludes npm package names—only extracts local file paths
- HTML: Automatically excludes
data: and javascript: URLs
- CSS: Automatically excludes
data: URLs
- All types: Handles Windows (
C:\) and Unix (/) paths, plus URLs
🌍 Language Support
13 languages: English, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Portuguese (Brazil), Russian, Ukrainian, Vietnamese, Chinese (Simplified)
🧩 System Requirements
VS Code 1.70.0+ • Platform Windows, macOS, Linux
Memory 200MB recommended for large files
🔒 Privacy
100% local processing. No data leaves your machine. Optional logging: paths-le.telemetryEnabled
Paths-LE is built for speed and handles files from 100KB to 30MB+. See detailed benchmarks.
| Format |
File Size |
Throughput |
Duration |
Memory |
Tested On |
| HTML |
4K lines |
2,021,212 |
~0.33 |
< 1MB |
Apple Silicon |
| CSV |
0.5MB |
541305 |
~41.52 |
< 1MB |
Apple Silicon |
| CSV |
3MB |
865986 |
~155.73 |
~27MB |
Apple Silicon |
| CSV |
10MB |
933250 |
~481.72 |
~55MB |
Apple Silicon |
| CSV |
30MB |
0 |
~1307.2 |
< 1MB |
Apple Silicon |
| TOML |
3K lines |
105,104 |
~5.29 |
< 1MB |
Apple Silicon |
| JSON |
0.12MB |
898921 |
~2.78 |
< 1MB |
Apple Silicon |
| JSON |
1.21MB |
1253130 |
~19.97 |
< 1MB |
Apple Silicon |
| JSON |
6.07MB |
2211718 |
~56.58 |
< 1MB |
Apple Silicon |
| JSON |
24.3MB |
0 |
~253.36 |
< 1MB |
Apple Silicon |
Real-World Performance: Tested with actual data up to 30MB (practical limit: 1MB warning, 10MB error threshold)
Performance Monitoring: Built-in real-time tracking with configurable thresholds
Full Metrics: docs/PERFORMANCE.md • Test Environment: macOS, Bun 1.2.22, Node 22.x
🔧 Troubleshooting
Not detecting paths?
Ensure file is saved with supported extension (.js, .ts, .json, .html, .css, .toml, .csv, .env)
Large files slow?
Files over 10MB may take longer. Consider splitting into smaller chunks
Need help?
Check Issues or enable logging: paths-le.telemetryEnabled: true
❓ FAQ
What paths are extracted?
Absolute (/usr/local), relative (./src), Windows (C:\Users), Unix (/home) paths
JS/TS imports?
Auto-excludes npm packages (react, lodash) - only extracts local file paths
Cross-platform?
Yes! Handles both Windows and Unix path formats automatically
Max file size?
Up to 30MB. Practical limit: 10MB for optimal performance
📊 Testing
289 unit tests • 93.55% function coverage, 84.32% line coverage
Powered by Vitest • Run with bun run test:coverage
Core Principle
No broken or failed tests are allowed in commits. All tests must pass before code can be committed or merged.
For detailed testing guidelines, see Testing Guidelines.
Test Suite Breakdown
| Module |
Tests |
Coverage |
Focus Area |
| Extraction Core |
9 |
88% |
Main extraction logic |
| Collection Logic |
19 |
95% |
Path collection & deduplication |
| JavaScript Format |
13 |
93% |
Import/require/export patterns |
| JSON Format |
13 |
97% |
Recursive path detection |
| HTML Format |
22 |
90% |
Attribute extraction & srcset |
| CSS Format |
16 |
93% |
url() and @import extraction |
| CSV Format |
8 |
90% |
CSV parsing with quotes |
| DOTENV Format |
11 |
78% |
Environment file parsing |
| TOML Format |
9 |
94% |
TOML config parsing |
| Path Validation |
64 |
100% |
Security & cross-platform paths |
| Error Handling |
62 |
93.55% |
Comprehensive error coverage |
| Analysis |
16 |
100% |
Path statistics & grouping |
| Validation Utils |
16 |
66% |
Input sanitization |
| Settings Schema |
36 |
100% |
Configuration validation |
Real-world extraction speeds tested on macOS (Apple Silicon):
- HTML: 1.96M paths/sec (675 lines, 0.03MB file, 667 paths extracted)
- JSON: 2.23M paths/sec (196K lines, 6.07MB file, 125K paths extracted)
- CSV: 1.01M paths/sec (89K lines, 10MB file, 449K paths extracted)
- TOML: 105K paths/sec (1.1K lines, 0.02MB file, 556 paths extracted)
- JavaScript: 914K paths/sec (268 lines, 0.01MB file, 201 paths extracted)
Running Tests Locally
bun run test # Run all 289 tests
bun run test:coverage # Generate detailed coverage report
bun run test:watch # Watch mode for development
Coverage reports are generated in coverage/ directory (open coverage/index.html for detailed view).
Testing Canonical Path Resolution
For Extension Users (easiest method):
- Open Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Run
Paths-LE: Create Test Fixture
- Select a folder where you want to create the test environment
- Follow the prompts to open the generated test workspace
For Developers (from repository):
# 1. Setup test environment
cd test-fixtures/monorepo-test
./setup-symlinks.sh
# 2. Open test workspace
code workspace.code-workspace
Testing the Feature:
Enable canonical resolution in VS Code settings:
Paths-le › Resolution: Resolve Symlinks ✅
Paths-le › Resolution: Resolve Workspace Relative ✅
Open test file: packages/frontend/src/symlink-test.js
Run extraction: Paths-LE: Extract Paths (Cmd+Alt+P)
Expected results:
- Before:
./utils-link.js (symlink path)
- After:
/full/path/to/packages/shared/src/utils.js (resolved canonical path)
The test fixture includes a complete monorepo with symlinks, cross-package imports, and comprehensive documentation for testing all canonical path resolution features.
🔒 Security Considerations
Canonical Path Resolution
⚠️ IMPORTANT SECURITY NOTICE: Canonical path resolution is disabled by default for security reasons.
Why it's disabled:
- May expose sensitive file system paths in extracted output
- Could reveal internal directory structures
- Might leak information about development environment setup
When to enable:
- ✅ Trusted development environments
- ✅ Internal monorepo workflows
- ✅ When you control the output destination
- ❌ Public repositories or shared workspaces
- ❌ When output might be shared externally
Security Settings:
{
"paths-le.resolution.resolveSymlinks": false, // Default: disabled
"paths-le.resolution.resolveWorkspaceRelative": false // Default: disabled
}
First-time Warning:
When you first enable canonical resolution, Paths-LE will show a security warning dialog with options to:
- Continue with canonical resolution
- Disable and continue with standard resolution
- Learn more about security implications
Copyright © 2025
@OffensiveEdge. All rights reserved.