Skip to content

hsdfat/go-project-dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

go-project-dump πŸš€

A powerful CLI tool that analyzes project technologies, filters out non-essential files, and compiles source code and directory structure into a single readable file. Perfect for code reviews, documentation, sharing projects, or AI analysis.

✨ Features

  • πŸ” Smart Technology Detection: Automatically identifies 15+ technologies including JavaScript, TypeScript, Python, Go, Java, React, Docker, and more
  • πŸ—‚οΈ Multi-Project Support: Analyze single projects or multiple folders simultaneously
  • πŸ“ Intelligent Filtering: Excludes build artifacts, node_modules, binary files, and other non-essential content
  • πŸ“Š Comprehensive Analysis: Generates detailed reports with technology confidence scores
  • 🌳 Directory Visualization: Creates beautiful tree structures of your project layout
  • πŸ“ Markdown Output: Produces clean, readable markdown with syntax highlighting
  • ⚑ Fast & Efficient: Written in Go for optimal performance

πŸš€ Quick Start

Installation

Install directly using Go:

go install github.com/hsdfat/go-project-dump@latest

Or clone and build:

git clone https://github.com/hsdfat/go-project-dump.git
cd go-project-dump
go build go-project-dump main.go

Basic Usage

# Analyze a single project
go-project-dump /path/to/your/project

# Save output to file
go-project-dump /path/to/your/project analysis.md

# Analyze multiple projects
go-project-dump /project1 /project2 /project3 combined-analysis.md

# Analyze microservices architecture
go-project-dump /app/frontend /app/backend /app/api microservices-dump.md

πŸ“– Usage Examples

Single Project Analysis

go-project-dump ~/my-react-app react-analysis.md

Multiple Project Analysis

# Analyze frontend and backend together
go-project-dump ~/myapp/client ~/myapp/server fullstack-analysis.md

# Compare multiple similar projects
go-project-dump ~/project-v1 ~/project-v2 ~/project-v3 version-comparison.md

Microservices Architecture

go-project-dump \
  ~/microservices/user-service \
  ~/microservices/payment-service \
  ~/microservices/notification-service \
  microservices-overview.md

πŸ”§ Supported Technologies

go-project-dump can detect and analyze:

Programming Languages

  • JavaScript (Node.js, browser-based)
  • TypeScript (TS/TSX files, tsconfig.json)
  • Python (requirements.txt, setup.py, pipenv)
  • Go (go.mod, .go files)
  • Java (Maven, Gradle projects)
  • C/C++ (CMake, Makefiles)
  • Rust (Cargo.toml)
  • PHP (Composer projects)
  • Ruby (Gemfile projects)

Frontend Technologies

  • React (JSX/TSX detection)
  • HTML/CSS (including SCSS, Sass, Less)

Infrastructure & DevOps

  • Docker (Dockerfile, docker-compose)
  • Kubernetes (YAML manifests)

Configuration & Data

  • JSON, YAML, XML
  • Markdown
  • Shell scripts

πŸ“Š Output Format

go-project-dump generates a comprehensive markdown report containing:

1. Project Summary

  • Combined statistics (file counts, sizes, languages)
  • Individual project breakdowns (for multi-project analysis)
  • Primary language detection

2. Technology Analysis

  • Detected technologies with confidence scores
  • Related files for each technology
  • Technology descriptions and context

3. Directory Structure

  • Visual tree representation
  • Clean, readable format
  • Multi-project organization

4. Source Code

  • Complete source code with syntax highlighting
  • Organized by project and directory
  • Language detection for proper highlighting

🎯 Use Cases

Code Reviews

go-project-dump /path/to/feature-branch feature-review.md

Documentation

go-project-dump /project project-documentation.md

AI Analysis

# Perfect for feeding to AI tools for code analysis
go-project-dump /complex-project ai-analysis-input.md

Project Comparison

go-project-dump /old-version /new-version migration-analysis.md

Team Onboarding

go-project-dump /team-project onboarding-guide.md

βš™οΈ Command Line Options

Usage: go-project-dump <project-paths...> [output-file]

Arguments:
  project-paths    One or more paths to project directories (space-separated)

Options:
  output-file   Optional output file (default: stdout)

Examples:
  go-project-dump /path/to/project
  go-project-dump /path/to/project1 /path/to/project2
  go-project-dump /path/to/project output.md
  go-project-dump /frontend /backend combined.md

🚫 Filtering Logic

go-project-dump intelligently excludes:

Directories

  • node_modules, vendor, __pycache__
  • .git, .svn, .hg
  • build, dist, target, bin, obj
  • .idea, .vscode
  • logs, tmp, temp

File Types

  • Binary files: .exe, .dll, .so, .jar
  • Media files: .jpg, .png, .mp4, .mp3
  • Archives: .zip, .tar, .gz
  • Compiled files: .class, .o, .pyc

File Size

  • Files larger than 1MB are automatically excluded
  • Binary file detection prevents including non-text content

πŸ› οΈ Development

Building from Source

git clone https://github.com/hsdfat/go-project-dump.git
cd go-project-dump
go mod tidy
go build go-project-dump main.go

Running Tests

go test ./...

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ Example Output

Here's what a typical go-project-dump analysis looks like:

# go-project-dump Multi-Project Analysis

**Generated on:** 2025-07-19 14:30:25
**Analyzed Projects:**
- /home/user/frontend
- /home/user/backend

## Combined Project Summary

- **Number of Projects:** 2
- **Primary Language:** TypeScript
- **Total Files:** 847
- **Processed Files:** 156
- **Combined Size:** 2.4 MB

### Individual Project Details

#### frontend
- **Path:** /home/user/frontend
- **Primary Language:** TypeScript
- **Files:** 423 total, 89 processed
- **Size:** 1.2 MB
- **Top Technologies:** TypeScript (95.2%), React (87.3%), CSS (45.1%)

#### backend
- **Path:** /home/user/backend  
- **Primary Language:** Go
- **Files:** 424 total, 67 processed
- **Size:** 1.2 MB
- **Top Technologies:** Go (92.1%), Docker (78.4%), YAML (34.2%)

## Detected Technologies (Combined)

### TypeScript (95.2% confidence)
*TypeScript - JavaScript with static typing*

**Related files:**
- frontend/src/components/App.tsx
- frontend/src/utils/api.ts
- frontend/tsconfig.json
- ... and 45 more files

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with Go
  • Inspired by the need for better code analysis tools
  • Thanks to all contributors who help improve this tool

Made with ❀️ by developers, for developers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages