Garner is a command-line interface for the Garner Usage Dictionary.
On macOS or Linux with Homebrew:
brew install jmcguire/garner/garner-dictOr, on any system with Python 3.9 or newer, install the Python package with pipx:
pipx install garner-dictBoth install the command as garner. Try it with:
garner affect
garner --search accomodate
garner --helpPipe a long entry through less for paged output:
garner affect | lessThis is an independent command-line interface and packaging project. It is not an official publication of Bryan A. Garner or of the Garner Usage Dictionary. The code is MIT licensed, but the dictionary content is copyrighted by Bryan A. Garner and is not licensed by this repository. See NOTICE.
The Homebrew package is intentionally published in the maintainer's personal
tap (jmcguire/garner), not in homebrew/core. That makes the source,
maintainer, and content notice explicit, and does not imply that the dictionary
content has been approved for official Homebrew distribution. The PyPI package
and Homebrew formula bundle the same compiled dictionary database. Anyone who
uses or redistributes it remains responsible for respecting the applicable
rights.
Clone this repository, then create a development environment:
python3 -m venv venv
./venv/bin/python -m pip install -r requirements.txtThe Markdown files in definitions/ are the editable source of truth. Garner
builds them into an SQLite database for fast lookup and search. Build the local
database before trying source changes:
./venv/bin/garner --buildThen use the tool normally:
./venv/bin/garner affect
./venv/bin/garner --search accomodateRun the tests with:
./venv/bin/python -m unittest discover -s testsThe tests use a small fixture dictionary in tests/fixtures/definitions, not
the full definitions collection. They build a temporary SQLite database from
those entries and cover core lookup, search, forwarding, and formatting
behavior without making small source-formatting changes needlessly brittle.
The code in this repository is MIT licensed. See LICENSE.
The dictionary content and bundled definitions are copyrighted by Bryan A. Garner. See NOTICE.
Release preparation is scripted:
./venv/bin/python scripts/release 1.1.0See RELEASING.md for the release and distribution checklist.