1 files changed,
33 insertions(+),
0 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-02-05 22:16:36 +0200
Change ID:
pwupxvqumkzmynqlnvkzmpxvwvrqxkkk
Parent:
f59c329
A
AGENTS.md
@@ -0,0 +1,33 @@
+# mugit + +This is a Go-based Git repository web interface. Use these guidelines when working on this codebase. + + +## Project Structure + +``` +internal/ +├── cli/ # CLI command handling +├── config/ # Configuration management (YAML) +├── git/ # Git operations +│ └── gitservice/ # git upload-pack and git receive-pack implementation +├── handlers/ # Web interface and Git HTTP protocol handlers +├── humanize/ # Time formatting utilities +├── mirror/ # Repository mirroring worker +├── ssh/ # SSH Git server +└── web/ # All things web +``` + +## Key Dependencies + +- `github.com/urfave/cli/v3` - CLI framework +- `github.com/go-git/go-git/v5` - Pure Go Git library +- `github.com/gliderlabs/ssh` - SSH server +- `github.com/yuin/goldmark` - Markdown rendering +- `github.com/cyphar/filepath-securejoin` - Secure path joining +- `olexsmir.xyz/x/is` - Test assertions + +## Security + +- Always use `securejoin.SecureJoin()` when constructing filesystem paths from user input +- Check `repo.IsPrivate()` before serving public repository content