xkcd-cli

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 5 Imported by: 0

README

A simple CLI application to download and display xkcd comics.

Used urfave/cli for the cli magic.

{% alert(fact=true) %} I originally planned to use cobra for this project. However, on the day I started development, a dependency of cobra was down (the developer was hosting it on a private server), preventing me from downloading it. So, I started with urfave/cli instead. {% end %}

Usage

Display Command

Display the latest comic using your system's default image viewer:

xkcd-cli display latest

Display a specific comic by number:

xkcd-cli display 42

Display a random comic:

xkcd-cli display random

Get Command

Download the latest comic to the current directory:

xkcd-cli get latest

Download a specific comic:

xkcd-cli get 42

Download a random comic:

xkcd-cli get random

Installation

Prebuilt Binaries

Download the binary for your system in Releases Page

Install via Go

go install github.com/AliGaygisiz/xkcd-cli@latest

Build from Source

git clone https://github.com/AliGaygisiz/xkcd-cli.git
cd xkcd-cli
go build .

To install the binary to your $GOPATH/bin:

go install .

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL