Interact with a local Grocy household ERP server using the grocy-cli tool. Use this skill whenever the user mentions Grocy, grocery inventory, food stock tracking, pantry management, barcode scanning/lookup, best-before dates, or wants to add/consume/transfer items in their home inventory system. Also trigger when the user mentions importing shopping receipts, checking what's expiring, or managing storage locations (fridge, freezer, pantry). Even if the user doesn't say "Grocy" explicitly, use this skill if they're clearly talking about home food/household inventory management with a self-hosted system.
You have access to a CLI tool for managing a self-hosted Grocy server. Use it to help the user manage their household inventory — products, stock levels, storage locations, barcodes, and shopping locations.
The CLI binary is at ~/code/grocy-cli/grocy-cli. It reads configuration from
environment variables or a .env file in the current working directory.
The .env file lives at ~/code/.env, so always run commands from ~/code/:
cd ~/code && ./grocy-cli/grocy-cli <command>
The .env file contains:
GROCY_URL — Base URL of the Grocy API (e.g. http://192.168.1.107:9283/api)GROCY_API_KEY — API key for authenticationIf the .env file doesn't exist, ask the user for their Grocy URL and API key.
--json when you need to process the output programmatically
(parsing IDs, checking results, scripting). Use the plain table output when
displaying results directly to the user.~/code/. The full
invocation is cd ~/code && ./grocy-cli/grocy-cli <command>.Storage locations where products are kept (Fridge, Freezer, Pantry, etc.).
grocy-cli locations list # Table of all locations
grocy-cli locations create --name "Pantry" --description "Dry goods"
grocy-cli locations create --name "Freezer" --freezer # Mark as freezer
grocy-cli locations get <id>
grocy-cli locations delete <id>
Product definitions. A product must exist before stock can be tracked.
grocy-cli products list
grocy-cli products create --name "Milk" --location-id 2 --shopping-location-id 2
grocy-cli products get <id> # Full details inc. barcodes, stock
grocy-cli products edit <id> --name "New Name" --location-id 6
grocy-cli products delete <id>
Create flags:
--name (required) — Product name--location-id (required) — Default storage location ID--qu-id-purchase — Purchase quantity unit ID (default: 2 = Piece)--qu-id-stock — Stock quantity unit ID (default: 2 = Piece)--shopping-location-id — Default store--description — Product descriptionTrack what's in stock, add purchases, consume items, transfer between locations.
grocy-cli stock list # Everything currently in stock
grocy-cli stock add <product-id> --amount 2 --best-before 2026-03-06 --price 1.50
grocy-cli stock consume <product-id> --amount 1
grocy-cli stock consume <product-id> --amount 1 --spoiled
grocy-cli stock transfer <product-id> --amount 1 --from 2 --to 3
grocy-cli stock volatile # Due soon, overdue, expired, missing
Stock add flags:
--amount — Quantity (default: 1)--best-before — Due date in YYYY-MM-DD format--price — Unit price--location-id — Override the product's default location--shopping-location-id — Store where purchasedManage product barcodes and look up products on OpenFoodFacts.
grocy-cli barcodes list
grocy-cli barcodes list --product-id 3 # Filter by product
grocy-cli barcodes lookup <barcode> # Look up by barcode via Grocy
grocy-cli barcodes lookup <barcode> --add # Look up AND create product in Grocy
grocy-cli barcodes add --product-id 5 --barcode "5000112637922"
grocy-cli barcodes delete <id>
The lookup --add command is powerful: it queries Grocy's OpenFoodFacts plugin,
finds the product by EAN/UPC barcode, and automatically creates it in Grocy with
the correct name and barcode. It returns the new product ID so you can
immediately add stock.
grocy-cli quantity-units list # or: grocy-cli qu list
grocy-cli quantity-units create --name "Bottle" --name-plural "Bottles"
Stores where products are purchased.
grocy-cli shopping-locations list # or: grocy-cli shops list
grocy-cli shopping-locations create --name "Tesco"
barcodes lookup <ean> --add if you have a barcode — this creates the product automaticallyproducts createstock add <product-id> --amount N --best-before YYYY-MM-DD --price X.XX--shopping-location-id on stock add to record which store it came fromgrocy-cli stock volatile # Shows due soon, overdue, expired
grocy-cli stock list # Check next_due_date column
grocy-cli barcodes lookup 5000112637922 # Just look it up
grocy-cli barcodes lookup 5000112637922 --add # Look up and create
If lookup returns a product, you can then use stock add with the returned
product ID to add it to stock. If --add was used, the product is already
created — just note the ID from the output and add stock.
Run grocy-cli locations list to get current IDs. Typical setup:
| Location | Use for |
|---|---|
| Fridge | Fresh produce, dairy, meat, leftovers |
| Freezer | Frozen items (marked with is_freezer) |
| Pantry | Dry goods, tinned food, sauces, rice, pasta |
| Supplies | Non-edible items (cleaning products, bags, etc.) |
The barcodes lookup command calls OpenFoodFacts via Grocy. Respect these
limits to avoid an IP ban:
grocy-cli barcodes lookup).env file isn't being found. Run from ~/code/ or export the variables.--json output piped through jq for scripting:
grocy-cli --json products list | jq '.[] | select(.name | test("milk"; "i"))'--json to check for duplicates
before creating.Edit PDFs with natural-language instructions using the nano-pdf CLI.
Control Sonos speakers (discover/status/play/volume/group).
Terminal Spotify playback/search via spogo (preferred) or spotify_player.
Capture frames or clips from RTSP/ONVIF cameras.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Category:tools