https://github.com/nouuu/gopeek
GoPeek is a lightweight command-line tool that generates comprehensive documentation of project structures. It recursively scans directories to create a navigable Markdown document containing both the project tree and file contents, making it ideal for project exploration, documentation and AI context providing.
https://github.com/nouuu/gopeek
Last synced: about 1 month ago
JSON representation
GoPeek is a lightweight command-line tool that generates comprehensive documentation of project structures. It recursively scans directories to create a navigable Markdown document containing both the project tree and file contents, making it ideal for project exploration, documentation and AI context providing.
- Host: GitHub
- URL: https://github.com/nouuu/gopeek
- Owner: Nouuu
- License: mit
- Created: 2024-12-20T14:13:21.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-27T11:34:16.000Z (6 months ago)
- Last Synced: 2025-02-09T04:08:42.173Z (4 months ago)
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: security-report.json
Awesome Lists containing this project
README
# GoPeek
[](https://goreportcard.com/report/github.com/nouuu/gopeek)
[](https://pkg.go.dev/github.com/nouuu/gopeek)
[](https://golang.org/doc/devel/release.html)
[](https://opensource.org/licenses/MIT)[](https://github.com/nouuu/gopeek/actions?query=workflow%3Abuild)
[](https://github.com/nouuu/gopeek/actions?query=workflow%3Atests)
[](https://github.com/nouuu/gopeek/actions?query=workflow%3Alint)
[](https://github.com/nouuu/gopeek/actions?query=workflow%3Asecurity)[](https://github.com/nouuu/gopeek/releases)
[](https://github.com/nouuu/gopeek/issues)
[](https://github.com/nouuu/gopeek/pulls)
[](https://github.com/nouuu/gopeek/graphs/contributors)
[](https://github.com/nouuu/gopeek)
[](https://github.com/nouuu/gopeek/commits/main)GoPeek is a lightweight command-line tool that generates comprehensive documentation of project structures. It recursively scans directories to create a navigable Markdown document containing both the project tree and file contents, making it ideal for project exploration, documentation and AI context providing.
## Features- π³ Recursive directory scanning with an intuitive tree structure
- π Automatic Markdown generation with file contents
- π Smart binary file detection
- β‘ Efficient large file handling with size limits
- π― Configurable ignore patterns (supports .gitignore)
- π Generated anchors for easy navigation## Installation
```bash
go install github.com/nouuu/gopeek/cmd/gopeek@latest
```Or build from source:
```bash
git clone https://github.com/nouuu/gopeek.git
cd gopeek
make build
```You can also install it from source :
```bash
git clone https://github.com/nouuu/gopeek.git
cd gopeek
make install
```## Usage
Basic usage:
```bash
gopeek [path] [flags]
```Available flags:
```bash
Flags:
-o, --output string Output file path (default "project_knowledge.md")
-i, --ignore stringSlice Patterns to ignore
-v, --version Show version
--verbose Enable verbose output
```Example:
```bash
# Scan current directory
gopeek .# Scan specific directory with custom output
gopeek /path/to/project -o documentation.md# Scan with custom ignore patterns
gopeek . -i "*.log" -i "build/*"
```## Output Format
GoPeek generates a structured Markdown document with two main sections:
1. Project Structure: A tree view of your project with clickable links
2. File Contents: The content of each file with syntax highlightingExample output:
```markdown
# Project Structure
- π project
- π [main.go](#main-go)
- π internal
- π [types.go](#internal-types-go)# Files Content
# π main.go
```go
package main
// ... file content
```## Development
### Prerequisites
- Go 1.22 or higher
- Make (for build automation)### Building
```bash
make build
```### Testing
```bash
make test
```### Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Roadmap πΊοΈ
### Core Features β¨
- [x] Basic directory scanning
- [x] Markdown output generation
- [x] Binary file detection
- [x] .gitignore support
- [x] CLI interface with cobra
- [x] File size limits
- [x] Github Actions CI/CD### Next Steps π
- [ ] Advanced Error Handling π‘οΈ
- [ ] Custom error types
- [ ] Error context and wrapping
- [ ] Operation summaries
- [ ] Extended Output Options π
- [ ] HTML with navigation
- [ ] JSON output
- [ ] Template customization
- [ ] Performance Features β‘
- [ ] Parallel file scanning
- [ ] Memory usage optimization
- [ ] Progress indicators## Acknowledgments
- Inspired by the need for better project documentation tools
- Built with [Cobra](https://github.com/spf13/cobra)