all repos

mugit @ 9c82bda

🐮 git server that your cow will love

mugit/AGENTS.md (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
add AGENTS.md, 4 months ago
1
# mugit
2
3
This is a Go-based Git repository web interface. Use these guidelines when working on this codebase.
4
5
6
## Project Structure
7
8
```
9
internal/
10
├── cli/             # CLI command handling
11
├── config/          # Configuration management (YAML)
12
├── git/             # Git operations
13
│   └── gitservice/  # git upload-pack and git receive-pack implementation
14
├── handlers/        # Web interface and Git HTTP protocol handlers
15
├── humanize/        # Time formatting utilities
16
├── mirror/          # Repository mirroring worker
17
├── ssh/             # SSH Git server
18
└── web/             # All things web
19
```
20
21
## Key Dependencies
22
23
- `github.com/urfave/cli/v3` - CLI framework
24
- `github.com/go-git/go-git/v5` - Pure Go Git library
25
- `github.com/gliderlabs/ssh` - SSH server
26
- `github.com/yuin/goldmark` - Markdown rendering
27
- `github.com/cyphar/filepath-securejoin` - Secure path joining
28
- `olexsmir.xyz/x/is` - Test assertions
29
30
## Security
31
32
- Always use `securejoin.SecureJoin()` when constructing filesystem paths from user input
33
- Check `repo.IsPrivate()` before serving public repository content