A command-line interface for exploring breweries via the Open Brewery DB API.
Project description
brewcli
A command-line interface (CLI) for exploring breweries via the Open Brewery DB API.
brewcli is a Python-based CLI tool designed to interact with the Open Brewery DB API. With brewcli, you can fetch random breweries, search breweries by city, state, or type, and more—all from the command line.
Features
- Fetch a list of random breweries.
- Search breweries by city, country, name, postal code, state, type, or distance from a coordinate.
- Retrieve detailed information about a specific brewery by its ID.
- Output data in a user-friendly format.
Installation
Install brewcli using pip:
pip install brewcli
Usage example
Here are some examples of how to use brewcli:
Lists of breweries are rendered as a color table, and single-brewery lookups as a detail panel. Website URLs are shown as clickable links in terminals that support them.
Get a number of random breweries (the count is required):
brewcli random 3
Name Type Location Phone Website
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MadTree Brewing regional Cincinnati, Ohio 5138368733 madtreebrewing.com
Rhinegeist Brewery micro Cincinnati, Ohio — rhinegeist.com
Fifty West Brewing brewpub Cincinnati, Ohio 5138916996 fiftywestbrew.com
Look up a specific brewery by its ID:
brewcli by-id b54b16e1-ac3b-4bff-a11f-f7ae9ddc27e0
╭─ MadTree Brewing (regional) ─╮
│ 5164 Kennedy Ave │
│ Cincinnati, Ohio 45213 │
│ United States │
│ │
│ ☎ 5138368733 │
│ 🌐 madtreebrewing.com │
╰───────────────────────────────╯
Search breweries by city:
brewcli search --by-city "Cincinnati"
Search breweries by state and type:
brewcli search --by-state "California" --by-type "micro"
Available search filters: --by-city, --by-country, --by-dist (coordinates as
'lat,lon'), --by-name, --by-postal, --by-state, and --by-type (one of:
micro, nano, regional, brewpub, planning, contract, proprietor, closed).
Run brewcli --help or brewcli <command> --help for full usage details.
Development setup
This project uses uv for dependency management and is
pinned to Python 3.12 (see .python-version).
Clone the repository:
git clone https://github.com/tynardone/brewcli.git
cd brewcli
Create the virtual environment and install all dependencies (runtime + dev) from the lockfile:
uv sync
Run the CLI:
uv run brewcli --help
Run tests:
uv run pytest
Release History
- 0.2.0
- Rich terminal output: brewery lists render as a color table and single lookups as a detail panel, with clickable website links.
- 0.1.0
- Initial release:
random,by-id, andsearchcommands.
- Initial release:
Meta
Tyler Nardone – tynardone@gmail.com - LinkedIn
Distributed under the MIT license. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brewcli-0.2.0.tar.gz.
File metadata
- Download URL: brewcli-0.2.0.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05fc368907d7255791be4671b7254fe7c127890263049710d8bcf00143aa7d7f
|
|
| MD5 |
f2c601cdcfe956a32050e67f2a2c317f
|
|
| BLAKE2b-256 |
476a086671b8d1c27f568254d53e545d229e09d36b7a09cef8adefe714f21890
|
File details
Details for the file brewcli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: brewcli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf5434f2ad70e9c2eabb6aac6fa8b3dbe4d0f6987d974f9b0ec8bc89d596ab75
|
|
| MD5 |
dcf379bd413ddfe0738dfdefcba8c12e
|
|
| BLAKE2b-256 |
9c432147db8eeb51ef7b20b1e254463e665ad52f8b51891a60d8bc1ad419b424
|