The gemini git browser is a very basic UI to browse git repositories on the gemini protocol
It can be seen in action at gemini://git.ritesh.ch
Or on https://proxy.vulpes.one/gemini/git.ritesh.ch/ if you're on an HTTP browser.
If the tree contains a README.md file, like github and other popular web UIs for git, it will automatically convert and render the README.md to the gemini page.
A local demo can be run by cloning the repository and building a local docker container that will host a sample repository within the container.
git clone git@github.com:masalachai/gemini-git-browser.git && cd gemini-git-browser
sh deploy/deploy.sh development
docker run -p 1965:1965 -it gemini_git_browser:latest
Once the container is running, the capsule can be seen with a gemini browser at gemini://localhost/
To use it with your repos, please note the following.
-
Currently, it only works with namespaced repos, i.e. the repo directories must be placed under a parent directory that acts as its namespace. For example
masalachai/gemini-git-browserwheremasalachaiis the namespace andgemini-git-browserthe repo. -
A
REPO_DIRenvironment variable needs to be set to the path of these namespace dirs. For example, if your repository is at/repositories/masalachai/gemini-git-browser,REPO_DIRshould be set as follows
REPO_DIR=/repositories
- A
gemini-git-browser.tomlfile also needs to be created and placed at$XDG_CONFIG_HOME/gemini-git-browser.XDG_CONFIG_HOMEis usually set to$HOME/.configon linux. Within thegemini-git-browser.tomlthere must be a list of namespace dirs and repo dirs which are allowed to be served, and a title, which may be left blank if unneeded.
# $HOME/.config/gemini-git-browser/gemini-git-browser.toml
allowed = ["masalachai", "masalachai/gemini-git-browser"]
title = ""
Once the REPO_DIR variable and gemini-git-browser.toml file is set, executing the binary should serve the repos at the gemini port.
The UI is also packaged as a docker image for easy deployment. To run it:
- create the
gemini-git-browser.tomlfile - create a TLS certificate and private key (gemini uses TLS by default)
- mount the
gemini-git-browser.toml, the certificate, private key, and your repository directory into the container with the following command:
docker run -p 1965:1965 \
-v /etc/letsencrypt/live/yourdomain.com/fullchain.pem:/app/cert/cert.pem \
-v /etc/letsencrypt/live/yourdomain.com/privkey.pem:/app/cert/key.pem \
-v /my-repositories:/repositories
-v $HOME/.config/gemini-git-browser/gemini-git-browser.toml:/root/.config/gemini-git-browser/gemini-git-browser.toml
-it ayravat/gemini-git-browser:latest
The paths used in this example are the default let's encrypt certificate and key paths and the default location of the gemini-git-browser.toml file. Please adjust the command accordingly if your certificate or toml file paths are different.
Once the container is running you can access the UI at gemini://localhost/
The source is released under the GNU GPL v3, a copy of which is included in the repository



