All guides

The command line

Members who were given the Barberry command line, and anyone who wants to ask an assistant about their wines

Last updated 19 October 2026

What this is

barberry is the Barberry Garden command line. It reads what the site shows you: the catalog of wines, your own tasting notes and the ones Barberry published, and the countries, regions, appellations and grapes the catalog uses. It prints them as a table at a terminal, or as JSON for a script or an assistant.

For now it only reads. Adding bottles, rating wines and the rest stay on the site and in the app.

Who can use it

The command line is given to members one by one, for now: ask an admin to turn it on for your account. Until then, signing in stops with a message that your account can't use it.

Install it

On a Mac or on Linux, with Homebrew:

brew install barberry-io/tap/barberry

brew upgrade barberry keeps it current, and each release on the tap's releases page says what changed in it. If your build is too old for the server, it tells you so and asks you to upgrade, instead of failing in odd ways.

Sign in

barberry login

It shows a short code and a link. Open the link on barberry.io while signed in, check the code, and approve. The command line then keeps a token of its own:

  • on a Mac, in your login keychain, where an upgrade reads it without asking for your password again;
  • on Linux, in your system keychain, or, on a computer without one (a server, a container), in ~/.config/barberry/tokens.json, a file only you can read.

barberry login says where it went. barberry me shows who you are signed in as, and barberry logout signs the computer out. Every computer you sign in from is listed under Signed-in terminals on your account page, where you can sign any of them out.

For a script, barberry token prints the token, and a token in BARBERRY_API_TOKEN is used instead of the keychain.

Find wines

barberry wines list takes words of a wine's name, producer or vintage, and filters that all have to match:

barberry wines list barolo --vintage 2010..2016
barberry wines list --country Italy --grape Nebbiolo --score 4.5..
barberry wines list --tasted --sort my-score
barberry wines list --region Burgundy --not-tasted --colour red
  • --country, --region, --grape: by name or id. A region includes the regions and appellations inside it, and a grape is found by the other names it goes by too.
  • --colour, --type wine or --type sake, --sparkling, --still.
  • --vintage, --score (Barberry's score) and --my-score (yours) take a value or a range: 4.5.., ..2019, 2015..2019.
  • --tasted and --not-tasted: the wines you rated, or the ones you haven't.
  • --sort: score, my-score, vintage, name or newest.
  • --limit and --all for how many to print.

barberry wines show ID shows one wine as its page has it, what Barberry wrote about it, and every note of it you may read.

Read notes

barberry notes list --mine
barberry notes list --barberry --score 4.7..
barberry notes list --since 2026-01-01 --sort score

You read your own notes, drafts and private ones included, and the notes Barberry published. Barberry's notes scored 4.7 or less are for members: without a membership you see their scores, not their words, as on the site. A note of yours from a blind pour names the pour until the wine is revealed.

Where a wine was tasted, at which event and with whom shows on the notes of tastings you were at: your own, a note that names you in its company, and a note from an event you took part in. In the JSON forms these are place, event and company.

Places and grapes

barberry countries list
barberry regions list --country Italy
barberry appellations list --region Piedmont
barberry grapes list

Formats

Every list prints as a table at a terminal and as JSON lines in a pipe. --format picks one: table, json, jsonl or tsv (for a spreadsheet). In the JSON forms each wine and note is exactly what the API answers.

Ask an assistant

barberry export --out barberry-export

It writes three files into the folder: wines.jsonl (every wine you can see, what Barberry wrote of it, and your own score), notes.jsonl (your notes and Barberry's) and a README.md that says what the fields are. Hand the folder to an assistant and ask it which wines you love most, what they have in common, or what to try next.

The folder holds your private notes: keep it to yourself.

What it tells Barberry

After each command, the command line tells Barberry which command ran, the format it printed in, and whether it worked (barberry token tells nothing, so scripts calling it stay quick), and, when something failed that the server can't see (a lost connection, the keychain, files it couldn't write, an answer it couldn't read, a crash), what kind of failure it was, so it can be fixed. Never what you asked for: no search words, filters, wine names or file paths.

Which command ran counts only while "Share usage statistics" is on in your account, as on the site and in the app. DO_NOT_TRACK=1 stops both from that computer.

The command line - Barberry Garden