PHETCH(1)

๐Ÿ“ฆ
version 1.2.0 ยท 2 versions
, in nixos 26.05

๐Ÿ’… phetch โ€” quick lil gopher client โœจ

okay so bestie, welcome to PHETCH(1), from the General Commands Manual section, and honestly? this is gonna be a whole vibe. buckle up ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

phetch โ€” your quick lil gopher client ๐Ÿ’– literally the cutest way to wander the gophersphere.


โœจ SYNOPSIS โœจ

phetch [OPTIONS] [URL]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

phetch is a terminal client built to help you quickly navigate the gophersphere, no cap. it's got non-nonsense keyboard navigation (yes, "non-nonsense" โ€” that's the actual word, i'm not fixing it, it's iconic), support for most Gopher features, easy-to-use TLS and Tor support, plus bookmarking and history features. it's giving main character terminal app tbh ๐Ÿ‘‘

usually you start phetch with a Gopher URL, like:

phetch gopher://some-gopher-url.com

but if you don't give it a URL? it'll launch and open its default "start page" instead. and that start page can be configured to literally any URL you want. (check the CONFIG section, i gotchu ๐Ÿซถ)


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -l, --local โ€” connect to the local Gopher server at URL 127.0.0.1:7070. local vibes only ๐Ÿ 
  • -p URL, --print URL โ€” print a rendered Gopher server response of URL and then exit. like, pretty-printed, then bye โœŒ๏ธ
  • -r URL, --raw URL โ€” print the raw Gopher server response of URL and exit. no filter, no makeup, raw dogging the bytes ๐Ÿ’€
  • -s, --tls โ€” attempt to fetch all pages securely over TLS. secure the bag ๐Ÿ”’
  • -S, --no-tls โ€” do not use TLS for connections. super useful for cancelling out an option that got set in the config file, for instance. take that, config ๐Ÿ™ˆ
  • -o, --tor โ€” make all connections using a local Tor proxy. Tor is The Onion Router. set the TOR_PROXY env variable if you wanna use an address other than the Tor default of 127.0.0.1:9050. ๐Ÿง…
  • -O, --no-tor โ€” disable Tor. onion off, bestie ๐Ÿง…โŒ
  • -w COLUMN, --wrap COLUMN โ€” wrap long lines in Gopher "text" views at COLUMN. default: 0 (off). no wrap, no stress โœจ
  • -m PATH, --media PATH โ€” use the program at PATH to open media files (movies and sounds). default: mpv ๐ŸŽฌ
  • -M, --no-media โ€” don't try to open media files. download them like regular binary Gopher items instead. just grab it and go ๐Ÿ“ฅ
  • -a, --autoplay โ€” autoplay media files instead of prompting. instant gratification, periodt โšก
  • -A, --no-autoplay โ€” don't autoplay media files. prompt instead. consent-based media consumption โœ‹
  • -c FILE, --config FILE โ€” use FILE instead of ~/.config/phetch/phetch.conf. custom config, custom life ๐Ÿ—‚๏ธ
  • -C, --no-config โ€” do not use any config file. feral mode ๐Ÿพ
  • -t FILE, --theme FILE โ€” use FILE for the color theme. make it pretty ๐ŸŽจ
  • --print-theme โ€” print the current theme. show me the palette ๐Ÿ‘€
  • -e ENCODING, --encoding ENCODING โ€” render text views in CP437 or UTF8 (default) encoding. choose your charset, bestie ๐Ÿ”ค
  • -h, --help โ€” print a help summary and exit. the classic ๐Ÿซถ
  • -v, --version โ€” print version information and exit. who am i? ๐Ÿ“Œ

๐Ÿ“ NOTES ๐Ÿ“

when you give it a URL, phetch shows the requested Gopher page and enters interactive mode. that's the whole flow ๐Ÿ’ซ

without a URL, phetch shows a builtin dashboard with easy access to online help, bookmarks and history โ€” and then enters interactive mode. a lil home base ๐Ÿก

โœจ also important: command line options always override options set in phetch.conf. the command line is the final boss ๐Ÿ‘‘

โŒจ๏ธ KEYBOARD SHORTCUTS โŒจ๏ธ

all single letter commands also work with the Ctrl key: e.g., h and Ctrl+h are synonyms. so you got options, iykyk ๐Ÿ’œ

  • h โ€” go to builtin help page.
  • q โ€” quit phetch.
  • left arrow โ€” go back in history.
  • right arrow โ€” go forward in history.
  • up arrow, p, k โ€” select previous link.
  • down arrow, n, j โ€” select next link.
  • PgUp, - โ€” scroll up by many lines.
  • PgDn, SPACE โ€” scroll down by many lines.
  • Number key โ€” open/select link. ๐Ÿ”ข
  • Enter โ€” open current link.
  • Esc, Ctrl+c โ€” cancel.
  • f, / โ€” find link in page. ๐Ÿ”
  • g โ€” go to Gopher URL.
  • R โ€” reload current URL.
  • u โ€” edit URL.
  • y โ€” copy URL. ๐Ÿ“‹
  • b โ€” show bookmarks.
  • s โ€” save bookmark. ๐Ÿ’พ
  • a โ€” show history. (mnemonic: All pages/history)
  • r โ€” view raw source.
  • w โ€” toggle wide mode.
  • e โ€” toggle encoding between UTF8 and CP437.
  • Up and down arrows โ€” use the up and down arrows, the j and k keys, or the n and p keys to select links. phetch will scroll for you, or you can use page up and page down (or - and spacebar) to scroll by many lines at once. it's got you ๐Ÿซถ
  • Number keys โ€” if there are few enough menu items, pressing a number key will open a link. otherwise, the first matching number will be selected. use Enter to open the selected link. ๐Ÿ”ข
  • Incremental search โ€” press f or / to activate search mode, then just start typing. phetch will look for the first case-insensitive match and try to select it. use arrow keys or Ctrl+p/Ctrl+n to cycle through matches. type-and-hunt, iconic ๐Ÿ”Ž

๐Ÿ”– BOOKMARKS ๐Ÿ”–

there are two ways to save the URL of the current page, bestie:

  • y โ€” copy URL. ๐Ÿ“‹
  • s โ€” save bookmark. ๐Ÿ’พ

bookmarks get saved to the file ~/.config/phetch/bookmarks.gph โ€” but only if the directory ~/.config/phetch/ exists. so make the folder first, ok? ๐Ÿฅบ

  • b โ€” view saved bookmarks. ๐Ÿ‘€
๐Ÿ“Ž the clipboard function uses pbcopy on MacOS, and xsel -sel clip on Linux. that's just how it is ๐Ÿ’…

๐Ÿ•ฐ๏ธ HISTORY ๐Ÿ•ฐ๏ธ

if you create a history.gph file in ~/.config/phetch/, every Gopher URL you open gets stored in there. automatic memory, no thoughts ๐Ÿง โœจ

new URLs are appended to the bottom, but they're loaded in reverse order โ€” so when you press the a key you'll see all the most recently visited pages first. freshest at the top, periodt ๐Ÿ”ฅ

and honestly? feel free to edit your history file directly, or share it with your friends! it's your data, bestie, go wild ๐Ÿ’–


โš™๏ธ CONFIG โš™๏ธ

if you create a phetch.conf file in ~/.config/phetch/, it'll be automatically loaded when phetch starts. the config file supports most command line options, for your convenience, plus a few ways to customize your browsing experience. for example, phetch will always launch in TLS mode if tls yes appears in the config file โ€” no need to pass --tls or -t on startup. set it and forget it ๐Ÿซง

here's an example config with all options:

# Page to load when launched with no URL argument.
start gopher://phetch/1/home

# Always use TLS mode. (--tls)
tls no

# Connect using local TOR proxy. (--tor)
tor no

# Always start in wide mode.
wide no

# Program to use to open media files.
media mpv

# Use emoji indicators for TLS & Tor.
emoji no

# Encoding. Only CP437 and UTF8 are supported.
encoding utf8

# Wrap text at N columns. 0 = off (--wrap)
wrap 0

# How many lines to page up/down by? 0 = full screen
scroll 0

# Path to theme file, if you want to use one
theme ~/.config/phetch/dark.theme

๐ŸŽจ THEMES ๐ŸŽจ

you can change phetch's color scheme by supplying your own theme file with --theme/-t, or by setting theme FILE in your phetch.conf. customize away, bestie ๐Ÿ’…

you can also view the current theme with:

$ phetch --print-theme

theme files look like this:

ui.cursor white bold
ui.number magenta
ui.menu yellow
ui.text white
item.text cyan
item.menu blue
item.error red
item.search white
item.telnet grey
item.external green
item.download white underline
item.media green underline
item.unsupported whitebg red

valid colors for use in phetch themes:

bold
underline

grey
red
green
yellow
blue
magenta
cyan
white
black

darkred
darkgreen
darkyellow
darkblue
darkmagenta
darkcyan
darkwhite

blackbg
redbg
greenbg
yellowbg
bluebg
magentabg
cyanbg
whitebg

that's the whole palette, slay ๐ŸŒˆ


๐ŸŽฌ MEDIA PLAYER SUPPORT ๐ŸŽฌ

phetch includes support for opening video files (; item type) and sound files (s item type) in mpv or an application of your choice, using the -m command line flag. to test it out, visit a compatible Gopher server, or check out the "gopher types" help page by launching phetch and then pressing ctrl-h then 3. tutorial speedrun ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ

by default phetch will prompt you when you try to open a media file, but you can change this behavior by starting it with --autoplay/-a, or by setting autoplayer true in your config file. your call, bestie ๐Ÿ“


๐Ÿ‘‘ ABOUT ๐Ÿ‘‘

phetch is maintained by chris west, and released under the MIT license.

phetch's Gopher hole:

gopher://phkt.io/1/phetch

phetch's webpage:

https://github.com/xvxx/phetch

๐Ÿฆ‹ aaaand that's the whole page! this edition is dated 1980-01-01 and lives under the PHETCH(1) name in the General Commands Manual โ€” vintage date, immaculate vibes. go forth and gopher, bestie ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from