npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

dirgo

v1.0.7

Published

Directory structure generator with LLM context support

Downloads

37

Readme

🌳 dirgo - Smart Directory Trees for LLMs & Devs

A lightning-fast directory structure generator with LLM context support, code analysis, and dependency tracking.

🚀 Quick Start

# Install globally
npm install -g dirgo

# Or run directly
npx dirgo

✨ Features

📁 Quick Structure Generation

# Basic tree with emojis
dirgo

# Without emojis (new!)
dirgo -n

# Include file stats
dirgo -s

# Save to file
dirgo -o file -f project.txt

🤖 LLM Context Generation

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

🎯 Smart Features

  • 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

🛠️ Command Options

Basic Commands

dirgo              # Basic tree with emojis
dirgo -n           # Without emojis
dirgo -s           # Include statistics
dirgo -d ./path    # Specific directory
dirgo -c           # Copy to clipboard

LLM Context

dirgo --llm-context          # Full project context
dirgo --llm-context -s       # With file statistics
dirgo --llm-context -n -c    # No emojis, copy to clipboard

Output Options

dirgo -o file                # Save to file
dirgo -o both                # Console & file
dirgo -f custom-name.txt     # Custom filename

Customization

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

🎨 Interactive Mode

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

💡 Use Cases

1. LLM Context

dirgo --llm-context -c
# Perfect for:
- Sharing project context with ChatGPT
- Getting AI assistance
- Project documentation

2. Project Documentation

dirgo -s -o file -f docs.md
# Great for:
- Project overviews
- Documentation
- Team onboarding

3. Quick Analysis

dirgo -s
# Shows:
- File counts
- Directory sizes
- Project structure

4. Dependency Analysis

dirgo --llm-context
# Shows:
- Go dependencies (direct/indirect)
- Python package requirements
- Node.js dependencies

🌟 Why dirgo?

For Developers

  • Quick project visualization
  • Easy documentation generation
  • Multiple output formats
  • Language-aware dependency analysis

For LLM Users

  • Optimized context generation
  • Smart project analysis
  • Comprehensive dependency tracking
  • Code relationship mapping

For Teams

  • Consistent project documentation
  • Easy project sharing
  • Quick project insights
  • Time-saving automation

📦 Installation

Global Installation

npm install -g dirgo

One-time Use

npx dirgo

📝 Version History

v1.0.7 (Current Stable)

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

v1.0.4

⚠️ Had following issues:

  • Didn't have npm package due to my skill issue

v1.0.2

⚠️ Had following issues:

  • Clipboard copied ANSI color codes
  • Memory leaks in directory traversal
  • Emoji display issues in LLM context
  • Fixed recursive structure generation
  • Added better error handling

v1.0.1

❌ Not recommended due to:

  • Node module resolution issues
  • Hidden files being generated
  • Memory issues with large directories
  • CLI execution problems
  • Dependency tracking bugs

v1.0.0 (Initial Release)

❌ Initial test release with:

  • Basic directory structure generation
  • Simple dependency analysis
  • Known issues with module imports
  • Installation and execution problems

💡 Installation Guide

For the best experience, install version 1.0.3:

# Install specific version globally
npm install -g [email protected]

# Or run with npx
npx [email protected]

🤝 Contributing

Contributions welcome! Feel free to:

  • Open issues
  • Submit PRs
  • Suggest features
  • Improve documentation

📄 License

MIT - feel free to use in your projects!

🔗 Links