scripts/
static/
templates/
.gitignore
30 B
.gitsigners
112 B
AGENTS.md
7.5 KiB
LICENSE
89 B
README.md
1.9 KiB
deploy
723 B
discuss.go
16.7 KiB
git.go
3.5 KiB
git_cli.go
16.0 KiB
git_http.go
1.9 KiB
go.mod
572 B
go.sum
1.9 KiB
handler.go
11.3 KiB
handler_test.go
69.0 KiB
main.go
5.2 KiB
template.go
8.9 KiB
watch
272 B
README.md
# Radiant Forge
A self-hosted git repository browser, similar to CGit. Single Go binary,
static HTML, no JavaScript.
## Build
go build .
## Usage
./forge [flags]
Flags:
-scan-path <path> Directory containing bare git repos (default ".")
-listen <addr> Listen address (default ":8080")
-title <string> Site title (default "radiant code repositories")
-base-url <string> Base URL prefix, e.g. "/git" (default "")
-non-bare Also scan for non-bare repos (dirs containing .git)
-username <string> HTTP basic auth username (requires -password)
-password <string> HTTP basic auth password (requires -username)
The server scans `scan-path` for bare repositories (directories containing
`HEAD`, `objects/`, and `refs/`). Repo names are derived from directory
names with the `.git` suffix stripped.
Repositories are **private by default**. A repo is only served if a `public`
file exists in its Git directory.
## Example
Set up some bare repos and start the server:
git init --bare /srv/git/example.git
touch /srv/git/example.git/public
./forge -scan-path /srv/git -listen :8080
Then open http://localhost:8080 in a browser.
## URL scheme
/ Repository index
/:repo/ Summary (file tree + README)
/:repo/refs All branches and tags
/:repo/log/:ref Commit log (paginated, default: HEAD)
/:repo/tree/:ref/path... Tree/file browser
/:repo/commit/:hash Commit detail with diff
/:repo/raw/:ref/path... Raw file download
## Repository metadata
The server reads optional metadata files from each bare repo:
- `description` -- shown on the index and summary pages
- `owner` -- shown on the index page
- `public` -- must exist for the repo to be served (can be empty)
## License
Copyright (c) 2025-2026 Radiant Computer (https://radiant.computer)
All rights reserved.