Wiki is a command line tool to fetch summaries from any Mediawiki wiki. By default, it searches the English language version of Wikipedia.
wiki, you’ll need a working golang install.
You can install
go get, which will download and compile the go code.
go get github.com/walle/wiki/cmd/wiki
Once we have it installed, we can take a look at the
help page for the tool. There’s lots of options available, allowing you to change language, show short summaries only and ignore HTTPS verification.
wiki --helpwiki is a tool used to fetch excerpts from wikipediaUsage: wiki [options...] queryOptions:-h=false: Print help information and exit.-l="en": The language to use-n=false: If the output should not be colorized-no-check-certificate=false: Skip verification of certificates-s=false: If simple output should be used-short=false: If short output should be used-u="https://%s.wikipedia.org/w/api.php": The api url-version=false: Print version information and exit.
Personally, I like to use it with the
short flag to get a brief description of what I’m looking for:
$ wiki -short unixUnix (all-caps UNIX for the trademark) is a family of multitasking, multiuser computeroperating systems that derive from the original AT&T Unix, developed in the 1970s atthe Bell Labs research centre by Ken Thompson, Dennis Ritchie, and others.
wiki is a very specific tool, but it’s one that will come in very useful when I want to look something up but don’t want to fall into the trap of reading Wikipedia for hours.