# Install xkcd with Homebrew

Fetch latest, random or any particular xkcd comic right in your terminal. Version 2.0.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:xkcd
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install xkcd
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:xkcd
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/xkcd>
- **Version:** 2.0.0
- **Source summary:** Fetch latest, random or any particular xkcd comic right in your terminal
- **Homepage:** <https://git.hanabi.in/xkcd-go>
- **Repository:** <https://git.hanabi.in/repos/xkcd-go.git>
- **Upstream docs:** <https://git.hanabi.in/xkcd-go>
- **License:** AGPL-3.0-only
- **Source archive:** <https://git.hanabi.in/repos/xkcd-go.git>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- xkcd (cli)
- xkcd (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.0.0
- Local data: ok
- Upstream repository: https://git.hanabi.in/xkcd-go
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

xkcd-go is a small Go command-line client for reading xkcd from the terminal. It can show the latest comic, a random comic, a numbered comic, save images, and open explanations for comics.

### Project history

The project is hosted on Agastya Chandrakant's stagit instance and describes itself as a Go tool to read the latest, random, or a specific xkcd comic, with download support. Its public log shows an initial commit on 2022-02-26 by Agastya Chandrakant.

A follow-up commit on 2022-02-27 substantially reshaped the tool: the log says it added an explainxkcd command, used xkcd.com pages instead of only image URLs for interactive comics, saved larger images when available, and made bare numeric arguments behave like `xkcd get <number>`.

The README frames the project as intentionally small. It documents separate `dev`, `prod`, and `master` branches, notes that `master` exists for stagit-generated web output, and says future additions should follow the Unix philosophy.

### Adoption history

xkcd-go is niche rather than broadly infrastructural, but it fits a long-running terminal culture around fetching webcomic and API content from shell sessions. Its source package is visible enough to be distributed as the `xkcd` command, giving users a one-word terminal entry point for a webcomic whose audience overlaps heavily with programmers and Unix users.

The upstream xkcd site provides stable latest, random, previous/next, archive, and numbered-comic URLs; xkcd-go packages that web convention into commands. explainxkcd support reflects the parallel community documentation ecosystem around the comic.

### How it is used

Typical commands are `xkcd` or `xkcd latest` for the newest comic, `xkcd random`, `xkcd get 303`, `xkcd 807`, `xkcd save`, `xkcd save 1312`, `xkcd explain`, and `xkcd explain 1000`.

The tool is practical for terminal users who want quick comic lookup, scripting-friendly retrieval, or a lightweight way to jump from a comic number to its explanation without opening the xkcd archive manually.

### Why package nerds care

xkcd-go is package-nerd fan service: a tiny CLI around programmer folklore. It matters less as infrastructure than as a neat example of packaging web culture into a terminal command.

It is also a reminder that package indexes carry small personal utilities alongside major libraries. For discovery sites, that is useful texture: not every package solves a platform problem; some encode a community habit.

### Timeline

- 2005: xkcd began publishing as Randall Munroe's webcomic about romance, sarcasm, math, and language.
- 2022-02-26: xkcd-go initial commit added the first public implementation.
- 2022-02-27: Major refactor added explainxkcd support, better interactive-comic handling, larger-image saving, and numeric shorthand.
- 2020s: xkcd-go is packaged as the `xkcd` terminal command for fetching comics from the shell.

### Related projects

- xkcd.com is the source comic site. explainxkcd is the explanation wiki targeted by the `xkcd explain` command. Other neighboring tools include xkcd API clients such as go-xkcd and terminal comic viewers such as xkcdpunk or Gleeter.

### Sources

- <https://git.hanabi.in/xkcd-go>
- <https://git.hanabi.in/xkcd-go/commit/29a18b921839bb2c98ee0caf4b1cc5f2e4cf1707.html>
- <https://git.hanabi.in/xkcd-go/commit/5e68ef5b2e7e6806dd57586e9b7ed4f97f64dba0.html>
- <https://git.hanabi.in/xkcd-go/file/README.html>
- <https://www.explainxkcd.com/>
- <https://xkcd.com/>
- <https://xkcd.com/json.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xkcd
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [stormy](https://www.automicvault.com/pkg/brew/stormy/) - Shares av.db curated category or tags: cli, go, productivity, terminal.
- [cookcli](https://www.automicvault.com/pkg/brew/cookcli/) - Shares av.db curated category or tags: cli, productivity.
- [countdown](https://www.automicvault.com/pkg/brew/countdown/) - Shares av.db curated category or tags: cli, go, productivity, terminal.
- [lf](https://www.automicvault.com/pkg/brew/lf/) - Shares av.db curated category or tags: cli, go, productivity, terminal.
- [superfile](https://www.automicvault.com/pkg/brew/superfile/) - Shares av.db curated category or tags: cli, go, productivity, terminal.
- [abook](https://www.automicvault.com/pkg/brew/abook/) - Shares av.db curated category or tags: cli, productivity, terminal.
- [aerc](https://www.automicvault.com/pkg/brew/aerc/) - Shares av.db curated category or tags: cli, productivity, terminal.
- [alot](https://www.automicvault.com/pkg/brew/alot/) - Shares av.db curated category or tags: cli, productivity, terminal.
- [quran](https://www.automicvault.com/pkg/brew/quran/) - Local package facts share a topical domain. Shared terms: cli, productivity, right, terminal.
- [wordle](https://www.automicvault.com/pkg/brew/wordle/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, go, terminal.

## Combined YAML source

View the package source record on GitHub. [combined/xkcd.yml](https://github.com/automic-vault/db/blob/main/combined/xkcd.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
