Sales

CLI sales commands

Record roasted-coffee sales from the terminal.

Sales commands record roasted-coffee sales against roast profiles. They complement the /profit page in the web app.

The flag-based record flow uses roast IDs, not inventory IDs. Use --form when you want an interactive roast picker instead of passing an ID directly.

Record a sale

  • Required flags for flag-based record: --roast-id, --oz, --price. --buyer and --sell-date are optional.
  • Use purvey roast list to find roast IDs. The CLI write flow records against roast_data.roast_id, not green_coffee_inv.id or coffee_catalog.id.
  • --price is the total sale price, not per-ounce. Use --form for an interactive picker when you do not already know the roast ID.
Record and list sales
purvey sales record --roast-id 123 --oz 12 --price 22.00 --buyer "Jane Smith" --pretty
purvey sales record --form
purvey sales list --pretty
purvey sales list --roast-id 123 --pretty
purvey sales list --buyer "Jane" --date-start 2026-01-01
purvey sales list --csv > sales.csv

List sales

  • --roast-id <id>: filter by roast profile ID.
  • --date-start / --date-end <YYYY-MM-DD>: filter by date range.
  • --buyer <name>: filter by buyer name (partial match).
  • --limit <n>: maximum results returned (default: 20).
  • --offset <n>: skip rows for pagination when exporting or reconciling larger histories.

Update and delete

  • purvey sales update <id>: update oz, price, buyer, or sell-date on an existing sale.
  • purvey sales delete <id>: delete a sale record.
  • Both commands expect a sale_id from purvey sales list, not a roast_id.

Related links