minimalist line-mode gemini client written in go

codesoap via inbox

2 days ago
4 days ago


a minimalist line-mode gemini client written in go.

WARNING: the project is still in its early stages so do expect bugs and incomplete features, if you encounter them, or would like to suggest an improvement, feel free to submit to the ticket tracker. on srht or the one on github.


more screenshots


  • searching from the command line
  • inputs from the command line
  • relative url at prompt
  • pager (requires less(1))
  • configuration file
    • custom search URL
    • custom pager opts
    • and more!
  • spartan:// protocol support


I plan to set up automated uploads of pre-built binaries to each release at some point in the future. at the moment you can clone the repo and go build:

git clone https://git.sr.ht/~hedy/gelim
cd gelim
# git checkout v0.0.0  # pin specific version or commit
go build

and move the gelim binary somewhere in your $PATH (like /usr/local/bin)

I could also write a Makefile, and have the build put $VERSION number in there or something too, let me know if you'd like that since I'm not wanting to do that yet.


use scdoc to compile gelim.1.scd and put it in your man path

I'm also planning to have a mirror of that manual hosted on man.sr.ht

Note that the manpage may not be the most recently updated. But new features and things like that will definetely be put in there once it's tested stable.


gelim gemini.circumlunar.space

This will bring you to less(1). You can use less to browse the page normally.

Note: if you see something like "-P is not an option", don't panic, this is because your system does not support one of gelim's default less options, you should skip over to the 'config' section below, and configure your lessOpts to remove the mouse option, and any other your version of less doesn't have.

When you want to visit a link, you have to quit less first. Press q

The page will be fetched and you'll be in less again.

Now let's try something more interesting.

While you're at the prompt type:


Say you don't have an account on RTC yet and would like to sign up.

Go to the bottom of the page, where the link to signing up is provided. Type G

Then, you have to quit the pager. Press q

Look for the link number that links to the sign up page, and enter it directy at the prompt. As of writing, the link number is 38, but keep in mind this number may change when you are trying this out.


And now you've decided to have a look at rawtext.club's values at the front page on more time. Unfortunately, the sign up page does not provide a link to go back to home. No worries, you can directly use the path (prefixed with . or /) at the prompt.

Let's try it out. Quit the pager (**q**), and type / and press enter

Voila, you're at the front page again!

Thanks for trying out this quickstart tutorial, there is still much to explore. Type in **help** from the prompt and check out the commands, have fun!


For people on a Unix system it will look for configuration in ~/.config/gelim/config.toml.

Though you do not need a configuration file to have gelim working.

# example config

prompt = "-->"            # default: "%U" (the full url of
                          # the current page), more info
                          # below

startURL = "example.com"  # default: ""

# will be put in LESS environment variable
lessOpts = "-FSXR~"       # default: "-FSXR~ -P pager (q to quit)"

searchURL = "geminispace.info/search"  # this is the default

#prompt options

you can use a number of options for your prompt (like PS1 in bash):

  • %U: full url of current page including scheme (gemini://example.com/foo/bar)
  • %u: full url of current page without scheme (example.com/foo/bar)
  • %P: absolute path of the current url (/foo/bar)
  • %p: base path of the current url (bar)

Use %% for a literal percent character, and percent-prefixed option that is not supported will be ignored and presented literally.

The query part of the URL will be stripped for all options, for security reasons. (If the input was to be sensitive -- 11 status code -- the full query percent-encoded would be printed as the prompt, which could mean revealing passwords, etc. Hence the query including the ? is stripped.)

Here are some examples:

config    resulting prompt
-------   -----------------
"%U>"     "gemini://example.com/foo/bar> "
"%P %%"   "/foo/bar % "
"%z>"     "%z> "
"%%%% $"  "%% $ "

#a note about the pager

gelim requires less(1) for paged output. If you don't have that installed, or is on windows, it will print the page directly and you'll have to scroll the page yourself. This is a bug and will be fixed in the near future.

#mouse support

Add --mouse (if your version of less supports it) to lessOpts option in your config file.



screenshot of help command output


screenshot of tour command

edit url

screenshot of editing url


screenshot of spartan colors


screenshot of links


screenshot of search command

spartan input

screenshot of spartan input functionality


#bugs, features, feedback, contribution

questions, general feedback:

bugs, feature requests

pull request, patches

  • send patches to my public inbox
  • If you prefer pull requests instead, this is where PRs should go. You could also send PRs to my public inbox but I'll have to search up how to merge them (lol)