Skip to content

Latest commit

 

History

History
239 lines (164 loc) · 6.2 KB

gelim.1.scd

File metadata and controls

239 lines (164 loc) · 6.2 KB

gelim(1) "" "line-mode smolnet client"

NAME

gelim - a minimalist gemini, spartan, and nex protocol client

SYNOPSIS

gelim [ OPTIONS ] [ URL ]

OPTIONS

--help, -h get cli help/usage

--input, -i string append "?" + string percent-encoded to URL (will be ignored if URL not provided)

--no-interactive, -I don't enter the line-mode interface (useful for just wanting to view URL then exit)

--search, -s string search string with the search engine. this takes priority over URL and --input (which means URL and --input will be ignored if this flag is used)

--config, -c path specify a non-standard config location (see FILES)

INTERFACE

just run gelim and optionally provide a url. it will start the line-mode interface. at the prompt, you can directly enter a url, link index, or otherwise a command.

Commands are parsed by spaces, with support for shell-like quoting and escaping.

Gelim uses a lightweight readline-like library for parsing the command line within the line-mode interface. By default, the prompt shows the current URL and a ">" symbol, this can be configured (see CONFIGURATION).

At the prompt, common line editing keys are supported. Completion for gelim's commands are also supported through TAB and Shift+TAB.

COMMANDS

For details on each command, please consult the built-in help interface.

help, h, ? [command] get help for the interface

quit, exit, q, x exit the program

back, b go to previous url in history

forward, f go to next url in history

history, hist, his [number] print history, or visit an item in history

reload, r reload current page

page, p, view, print, display reload current page

links, link, peek, l [number] get link for link-index number (what the link links to). if no number specified, it prints a list of all the links in the current page

url, current, cur, u print current url

editurl, e, eu, edit edit and visit current url

copyurl, cu copy current url to clipboard using clipboardCopyCmd (see CONFIGURATION).

search, s query... search query with search engine

redirects, redir show redirects

tour, t, loop [ go | ls | ranges or numbers... ] save a list of URLs into a tour list. on each tour invokation, visit the next item in tour.

config [ e[dit] | r[eload] ] edit or reload the currently active configuration.

CONFIGURATION

An optional configuration file can be specified at $XDG_CONFIG_HOME/gelim/config.toml.

Configuration should be written in TOML format. For example:

prompt = "-->"
startURL = "example.com"
searchURL = "gemini://kennedy.gemi.dev/search"
clipboardCopyCmd = "pbcopy"
maxRedirects = 5
useCertificates = [
    "gemini://astrobotany.mozz.us/app",
    "gemini://bbs.geminispace.org",
]

Keys are case-insensitive.

startURL = URL The URL to visit when starting gelim without arguments. Defaults to an empty string, which disables this feature.

searchURL = URL The query will be sent to this URL as URL?query for the search command and the --search CLI flag.

Default is "gemini://kennedy.gemi.dev/search".

clipboardCopyCmd = STRING Contents will be piped as stdin when the copyurl (or other) command is used which copies something into the system clipboard.

Defaults to an empty string, which disables this feature.

maxRedirects = NUMBER Control whether to ask for confirmation when a page redirects the client.

- 0: Always confirm redirects
- >0: Ask to confirm redirects after a set number of redirects
- <0: Never confirm redirects

This is _5_ by default, following the RFC-2068.

maxWidth = NUMBER Each page will be rendered to maximum of max(maxWidth, terminal width) columns wide for gemtext documents, and centered.

Set to _0_ to always use the terminal width.

Set to negative X to use a maxWidth of X but disable centering.

For plain text documents, Nex directories, and gophermaps, the page will be
centered based on the maximum width of the text in the document.

Default is _70_.

useCertificate = LIST The list of full URL prefixes (including scheme) that should use the client certificate. The certificate and key files should be in the same directory as the default config file location. Symlinks are supported.

See *CLIENT CERTIFICATES* for more information.

By default, this is an empty list.

prompt = STRING Newlines are supported. The default prompt is "%U\n>". Here are the available components:

[[ Name :[ Replacement :< Example | %U : Full URL including scheme and query : gemini://example.org/file/path.gmi?query | %u : Full URL without scheme and query : example.org/file/path.gmi | %P : Full path : /file/path.gmi | %p : Basename in path : path.gmi | %H : Full hostname with port : x.example.org:1965 | %h : Hostname without port : x.example.org

Note that gopher type selectors are stripped for both _%P_ and _%p_.

CLIENT CERTIFICATES

To use a client certificate on certain gemini sites for authentication, you should prepare PEM-encoded files for the certificate and the key. Place them in the gelim config directory (see FILES), named cert.pem and key.pem respectively. Symlinks are supported.

On startup, gelim will look for these two files in the config directory and attempt to load these as a client certificate.

To use the client certificate, list the URLs that you want to use it on in the useCertificate config option:

useCertificates = [
    "gemini://example.org",
]

In this example, or URLs that begins with "gemini://example.org" will use your client certificate.

FILES

The config directory $XDG_CONFIG_HOME/gelim/ is used by default. This is usually ~/.config/gelim/. A different directory can be specified using the --config option.

The following files are read by gelim, relative to the config directory.

  • config.toml (see CONFIGURATION)
  • cert.pem
  • key.pem

SEE ALSO

A README.md file should be included in your gelim installation. gelim also includes a built-in help functionality accessible through the help command.

Up-to-date information and source code can also be found at https://github.com/hedyhli/gelim.

AUTHORS

Created and maintained by ~hedy <[email protected]>.