Minimal but usable interactive Gemini client in < 100 LOC of Lua
Go to file
Solderpunk f8a2bc4193 Handle preformatted content. 2020-03-07 20:29:47 +01:00
.gitignore Initial commit 2019-08-11 15:47:00 -04:00
LICENSE Initial implementation. 2019-08-11 23:17:22 +03:00 Change to match repo name. 2019-08-11 23:18:38 +03:00
gemini-demo.lua Handle preformatted content. 2020-03-07 20:29:47 +01:00


Minimal but usable interactive Gemini client in < 100 LOC of Lua.

Depends upon:


One of the original design criteria for the Gemini protocol was that "a basic but usable (not ultra-spartan) client should fit comfortably within 50 or so lines of code in a modern high-level language. Certainly not more than 100". This client was written to gauge how close to (or far from!) that goal the initial rough specification is.


This crude but functional client:

  • Has a minimal interactive interface for "Gemini maps"
  • Will print plain text in any encoding if it is properly declared in the server's response header
  • Will follow redirects
  • Will report errors
  • Does NOT DO ANY validation of TLS certificates

Non-text files are not yet handled.

It's a snug fit in 100 lines, but it's possible. A 50 LOC client would need to be much simpler.


Run the script and you'll get a prompt. Type a Gemini URL (the scheme is implied, so simply entering e.g. will work) to visit a Gemini location.

If a Gemini menu is visited, you'll see numeric indices for links, ala VF-1 or AV-98. Type a number to visit that link.

There is very crude history: you can type b to go "back".

Type q to quit.