command-line tool for picking things randomly
Rust 66.3%
Makefile 33.7%
43 1 0

Clone this repository

https://tangled.org/alterae.online/choose https://tangled.org/did:plc:jbssbvfsi6xj3r2gqljo7sdm/choose
git@tangled.org:alterae.online/choose git@tangled.org:did:plc:jbssbvfsi6xj3r2gqljo7sdm/choose

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Choose#

A command-line tool for picking things randomly.

Usage#

Make a random selection from a list of choices

Usage: choose [OPTIONS] [CHOICES]...

Arguments:
  [CHOICES]...  The possible choices to pick from

Options:
  -n, --number <NUMBER>  How many choices to pick [default: 1]
  -l, --lines            Whether to treat `choices` as a list of files, and select random lines from those files. If no files are provided, read from stdin
  -h, --help             Print help
  -V, --version          Print version

For more information, see choose(1).

Installing#

choose may be installed remotely via cargo or from a local copy using Make.

Prerequisites#

  • Rust and Cargo
  • GNU Make (optional)
  • scdoc (for generating man pages)

Installation via Make#

Inside a local copy of the repository, run the following command: This will install both the binary and the manual page.

make TARGET=release
# make install

Installation via Cargo#

Note: This method will install to ~/.cargo/bin, and will not build or install man pages. However, it does not require cloning the repository locally.

cargo install --git https://git.sr.ht/~alterae/choose

Contributing#

The source code is available at https://git.sr.ht/~alterae/choose. Patches may be submitted to ~alterae/choose-devel@lists.sr.ht. For help sending patches, see https://git-send-email.io/.

As of 2026, the source code is also available at https://tangled.org/alterae.online/choose/. Patches may be submitted via this repository without the need for an email-based workflow.

Bug reports may be submitted at https://todo.sr.ht/~alterae/choose, or at https://tangled.org/alterae.online/choose/issues.

License#

This program is released under the terms of the MIT license (see LICENSE).