gitdir

static git web-generator

clone: git clone https://git.smichalk.dev/repos/gitdir.git

files log refs master

README

gitdir - a minimal git repository viewer
========================================

dependencies: ruby 3.3+, git

usage:
    ruby gitdir.rb

    environment variables:
        BIND      bind address  (default: 0.0.0.0)
        PORT      port          (default: 9393)
        BASE_URL  external url  (default: http://localhost:9393)
        SITE_NAME site title    (default: git)

adding repos:
    git clone --bare /path/to/project repos/project.git

    repos must end in .git to be detected.

    edit repos/project.git/description to set the description
    shown on the index page.

routes:
    /                            repo listing
    /:repo                       summary (readme, recent commits)
    /:repo/tree/:ref             file listing
    /:repo/tree/:ref/:path       subdirectory listing
    /:repo/blob/:ref/:path       view file
    /:repo/raw/:ref/:path        raw download
    /:repo/log/:ref              commit history
    /:repo/commit/:hash          commit detail with diff
    /:repo/refs                  branches and tags

no external gems. stdlib only.

recent commits

init SM · 2026-04-27