A lightning-fast directory structure generator with LLM context support, code analysis, and dependency tracking.
# Install globally
npm install -g dirgo
# Or run directly
npx dirgo
# Basic tree with emojis
dirgo
# Without emojis (new!)
dirgo -n
# Include file stats
dirgo -s
# Save to file
dirgo -o file -f project.txt
Perfect for providing context to ChatGPT or other LLMs:
# Generate LLM-optimized context
dirgo --llm-context
# Without emojis (new!)
dirgo -n --llm-context
# With stats and clipboard copy
dirgo --llm-context -s -c
Output includes:
- Project type detection (Node.js, Python, Go)
- Directory structure
- Comprehensive dependency analysis
- Direct and indirect Go dependencies
- Python package requirements
- Node.js dependencies
- Go module analysis with direct/indirect dependencies
- Python dependencies from requirements.txt and pyproject.toml
- Node.js package.json analysis
- File statistics and size information
- Copy to clipboard support
- Custom ignore patterns
- Interactive mode
dirgo # Basic tree with emojis
dirgo -n # Without emojis
dirgo -s # Include statistics
dirgo -d ./path # Specific directory
dirgo -c # Copy to clipboard
dirgo --llm-context # Full project context
dirgo --llm-context -s # With file statistics
dirgo --llm-context -n -c # No emojis, copy to clipboard
dirgo -o file # Save to file
dirgo -o both # Console & file
dirgo -f custom-name.txt # Custom filename
dirgo -n # No emojis (shorthand)
dirgo --no-emoji # No emojis (long form)
dirgo --include-all # Include node_modules
dirgo --ignore "dist,build" # Custom ignore patterns
Run with -i
for an interactive menu:
dirgo -i
Provides options for:
β Quick structure generation
β LLM context generation
β Output customization
β File statistics
β Copy to clipboard
dirgo --llm-context -c
# Perfect for:
- Sharing project context with ChatGPT
- Getting AI assistance
- Project documentation
dirgo -s -o file -f docs.md
# Great for:
- Project overviews
- Documentation
- Team onboarding
dirgo -s
# Shows:
- File counts
- Directory sizes
- Project structure
dirgo --llm-context
# Shows:
- Go dependencies (direct/indirect)
- Python package requirements
- Node.js dependencies
- Quick project visualization
- Easy documentation generation
- Multiple output formats
- Language-aware dependency analysis
- Optimized context generation
- Smart project analysis
- Comprehensive dependency tracking
- Code relationship mapping
- Consistent project documentation
- Easy project sharing
- Quick project insights
- Time-saving automation
npm install -g dirgo
npx dirgo
β Recommended version for full functionality
- Fixed clipboard output formatting (no more ANSI color codes)
- Added
-n
shorthand for--no-emoji
- Enhanced Go dependency analysis (direct/indirect dependencies)
- Fixed emoji display in LLM context
- Memory optimization
- Fixed project structure display
- Added default clipboard copying
- Didn't have npm package due to my skill issue
- Clipboard copied ANSI color codes
- Memory leaks in directory traversal
- Emoji display issues in LLM context
- Fixed recursive structure generation
- Added better error handling
β Not recommended due to:
- Node module resolution issues
- Hidden files being generated
- Memory issues with large directories
- CLI execution problems
- Dependency tracking bugs
β Initial test release with:
- Basic directory structure generation
- Simple dependency analysis
- Known issues with module imports
- Installation and execution problems
For the best experience, install version 1.0.3:
# Install specific version globally
npm install -g dirgo@1.0.3
# Or run with npx
npx dirgo@1.0.3
Contributions welcome! Feel free to:
- Open issues
- Submit PRs
- Suggest features
- Improve documentation
MIT - feel free to use in your projects!