Companion UI

Rgit Web

Browse, blame, and review in the browser. Same forge as the CLI. Optional.

Rgit Web: ada/website with a file tree, README, clone URL, and a fast-forward merge request.

Code

Tree, blob, README

owner/name at HEAD. Directories, files, rendered markdown. Git stays SSH on 2222.

History

Commits, blame, diffs

Log a ref, open a commit, blame a file, compare two tips.

Review

Merge requests

Open, comment, approve, fast-forward merge. Same refs as SSH.

Read

Public without an account

Anonymous browse for public repos. Create, review, and merge still need a signed-in user.

Auth

Passwords, not keys

Browser sign-in is a password and a cookie. Clone identity stays SSH keys.

Rgit Web is a GitHub-style browser for Rabun Git. It is not the forge. rgit serve still listens for git on SSH port 2222. The website is a separate Bun process that calls the same rgit binary with --json.

Skip it if the terminal is enough. rgit view covers a local README and file tree. Point cgit, gitweb, or your own app at the JSON CLI if you want something else.

What you see

Signed-out visitors get the public repository list. Signed-in users see the repos their role allows, and can create owner/name. A repository page is /:owner/:name: clone URL, visibility, then Code, Commits, and Requests.

PathWhat it shows
/Repository list; create when signed in
/:owner/:nameTree at HEAD, README when present
/:owner/:name/tree/:ref/…Directory
/:owner/:name/blob/:ref/…File (markdown rendered; otherwise a pre block)
/:owner/:name/blame/:ref/…Per-line blame
/:owner/:name/commitsLog
/:owner/:name/commit/:shaOne commit and its diff
/:owner/:name/requestsMerge request list and open
/:owner/:name/requests/:idShow, diff, review, merge

How it talks to rgit

No Postgres, no SQLite, no cache of git objects in the web repo. Durable state stays under $RABUN_GIT_ROOT: users.yaml, tokens.yaml, visibility.yaml, bare repos, refs/rabun/requests/*.

  1. Caddy terminates TLS and reverse-proxies 127.0.0.1:3010.
  2. Bun.serve matches /api/… or serves the SPA.
  3. A session cookie becomes --token. No cookie becomes --anonymous.
  4. rgit --json runs the matching subcommand. Non-zero exit is HTTP 4xx/5xx.

Browse payloads come from rgit’s git-extension layer (repo tree, blob, blame, log, refs, diff). Merge is still fast-forward only. The website does not run git itself.

Sign-in is not SSH

Clone and push stay public-key SSH. The browser cannot present that key, so web auth is a different door:

  • Operator sets a web password (rgit user add … --password or rgit user passwd).
  • rgit auth login issues a bearer token (rgit_…). Only a SHA-256 hash is stored.
  • Rgit Web puts that token in an HttpOnly rgit_session cookie (14 days). JavaScript never sees it.
  • Logout calls rgit auth logout and clears the cookie.

People who only clone never need a password. People who review in the browser do.

On the host

Two systemd units, one data root. rabun-git.service is User=rabun-git on port 2222. rgit-web.service is User=rgit-web in group rabun-git, loopback 3010, ReadWritePaths on the forge root. Forge ACL still applies: Unix group access is not Operator.

Pack and push is the same air-gapped flow as the CLI. The droplet never talks to GitHub. Details: rgit-web.

Presentation

The CLI is the forge.

Rgit Web has no database. It shells out to rgit --json. Users, trees, and merge requests stay on the forge.

Backend

rgit --json

Each page is a clap subcommand. Debug with the same commands the website runs.

ACL

Never Operator

Always --token or --anonymous. A missing flag would list every private repo.

Look

DevLab tokens

Cream, pine, and gold. Burton Bun and React 19.

Replace

Bring your own

cgit, gitweb, a custom SPA, or nothing. The JSON CLI is the contract.

Optional

Three ways to look at a tree.

rgit serve does not speak HTTP for git. Clone, push, and merge requests work without a website.

  1. CLI only

    Users, keys, requests, and runs from the terminal.
  2. rgit view

    Loopback preview of a working copy. Not a public git UI.
  3. Rgit Web

    Caddy to Bun to rgit --json. GitHub-style chrome when you want it.

Install the CLI first.

Add the website when you want it. Source and deploy notes live in the rgit-web repo.