GMITOOL(1)

πŸ“¦ version 0.11, in alpine 3.24

πŸ’… gmitool(1) β€” the Net::Gemini era πŸ’…

okay so bestie, listen. gmitool is your lil command-line bestie for all things Net::Gemini, and it is literally part of the Net::Gemini module. It's giving "swiss army knife but make it gemini" energy.


✨ SYNOPSIS ✨

  gmitool file [-f foo.gmi] bar.png baz/ ..
  gmitool get [-46] [-A] [-E encoding-layer] [-C cert-file -K key-file] \
              [-H sni-host] [-S] [-V peer|none] \
              [-f] [-l] [-q] [-t seconds] \
              gemini://example.org
  gmitool link [-b base-url] < text-gemini-content

three whole moods, three whole subcommands. pick your fighter 🫢


🌸 DESCRIPTION 🌸

gmitool brings you a whole little bundle of gemini-protocol-related utilities, no cap. It ships as part of the Net::Gemini module. The subcommands are:

πŸŽ€ file

takes the regular files or directories you hand it and appends them as links into an output file β€” by default that's index.gmi, unless you gave the -f flag another filename to use instead. cute, simple, done.

πŸ¦‹ get

fetches a gemini page and prints it to standard out β€” assuming everything goes well, that is (garbage in, garbage out, as the elders say 😭). here's the option menu:

  • -4 β€” IPv4 only, bestie. default is to use any protocol at all.
  • -6 β€” IPv6 only. periodt.
  • -A β€” accepts verified leaf certificates without going through the usual TOFU path, on the assumption that the certificate can actually be verified. this one's probably a slay for sites using Let's Encrypt, since those certs change constantly and would otherwise make you use the -f flag to force updates β€” and they usually will (but may not πŸ‘€) verify correctly.
  • -C certificate-file β€” your client certificate file. pair it with -K for when gmitool has to use a custom certificate.
  • -E encoding-layer β€” says what the output encoding should be if the remote content has a charset attached to it. the default in that situation is to convert to UTF-8. if you set it to the empty string with -E '', then :raw gets used β€” garbage in, garbage out, you were warned πŸ’€. otherwise the encoding-layer should be something Perl supports, like :encoding(UTF-8).
  • -K key-file β€” client private key file. use it with -C, they're a package deal πŸ’–
  • -H hostname β€” use this hostname as the SNI host instead of the default, which gets taken from the URL you gave.
  • -S β€” shows various diagnostic info (the META field, redirects, etc). nosy in the best way πŸ”
  • -V mode β€” sets a custom certificate verification mode. by default it's Trust On First Use (TOFU), which only checks the first leaf certificate against the known_hosts table. verification modes include peer, which verifies the peer certificates (the full chain), and none, which does no verification at all. also peep -A above. the SSL_CERT_FILE and SSL_CERT_DIR environment variables let you customize the trusted certificate authority certificates.
  • -f β€” force update of TOFU certificates. use -q to hide the warnings. heads up: updates to the cache will not happen if -A is used and the certificate can be verified.
  • -l β€” only show the links of the content, and only if the response is text/gemini.
  • -q β€” don't show a warning when force updating a changed certificate. shhh 🀫
  • -t seconds β€” custom connect timeout. default is 30 seconds.

extracts links from text/gemini input, and qualifies any relative links if you passed the -b base-url option. it only shows relative links if you gave the -r option. iykyk ✨


πŸ’œ ENVIRONMENT πŸ’œ

  • GMITOOL_HOSTS β€” custom known hosts file.
  • SSL_CERT_DIR β€” custom directory for SSL certificate authority certificates. the default is the operating system (OS) default, which could be /etc/ssl or something similar. customize this and the next one to say that only certain certificate authorities should be trusted, as opposed to everything that ships with the OS by default.
  env SSL_CERT_DIR=/some/where SSL_CERT_FILE=/dev/null gmitool ...
  • SSL_CERT_FILE β€” custom file for SSL certificate authorities.

🌈 FILES 🌈

~/.cache/gmitool/known_hosts is where the TOFU records live by default. JSON format, UTF-8 encoding. iconic storage choices honestly πŸ‘‘


⭐ EXIT STATUS ⭐

the gmitool utility exits 0 on success, and >0 if an error occurs. no mystery, no drama πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

Net::Gemini, ftp(1), openssl(1), nc(1)


πŸ‘‘ AUTHOR πŸ‘‘

Jeremy Mates


and that's the whole page, bestie 🫢 this beauty was written by perl v5.42.2 and dated 2026-02-15 β€” go forth and gemini responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from