Effortless Pantry-Tracking in Obsidian with Bases

Posted on Jun 2, 2025
💡 Prerequisites: Obsidian 1.9+, Core plugin *Bases* enabled, a vault (any sync method).

While some users rely on Dataview for advanced querying, Bases gives you spreadsheet-style editing and live formulas with far less setup—perfect for a lightweight pantry tracker.


1  Set up a single Pantry folder

Forget meal plans and recipe files. Everything lives in /Pantry/:

Vault/
└── Pantry/
    ├── Chicken Breast.md
    ├── Olive Oil.md
    └── Pantry.base
🔎 Tip
A lean structure means fewer moving parts—and zero maintenance headaches.

2 Create an ingredient note

---
item: Chicken Breast
on_hand: 750        # grams you have now
reorder_point: 250  # when to restock
---
🔎 Tip
Duplicate this file, rename it **Olive Oil.md**, change just the three numbers. Repeat for every food you track.

3 Build Pantry.base

3.1  Click-through (GUI)

    1. ⌘ P (Mac) or Ctrl P (Win/Linux) → start typing “Bases: Create new base” and hit Enter.
  1. Open the file → press ✏︎ Edit base.

  2. Source → Folder → Pantry.

  3. Add three Property columns: Item, On hand (g), Reorder at (g).

  4. Click + Add column → Formula, name it Need to buy (g), and paste:

max(0, reorder_point - on_hand)
  1. Save—the live table appears.
🔎 Tip
Already have ingredient notes? The table back-fills instantly: no refresh needed.

Copy-paste (YAML)

---
bases:
  source: "folder(Pantry)"
  columns:
    - label: Item
      value: item
    - label: On hand (g)
      value: on_hand
    - label: Reorder at (g)
      value: reorder_point
    - label: Need to buy (g)
      formula: max(0, reorder_point - on_hand)
---
⚠️ Warning
If *Need to buy shows “—”*, reopen the editor and set its column type to **Formula** - Bases sometimes reset after a paste.

4 Daily workflow - two steps

  1. Cook → open each used note → overwrite on_hand.

  2. Glance at Pantry.base.

    Any row where Need to buy (g) > 0 is your live shopping list.

5 Embed the grocery list on your dashboard

Add one line inside your dashboard note:

![[Pantry/Pantry.base]]
Grocery list embedded in dashboard

The grocery table refreshes instantly anywhere it’s embedded

🚨 Alert
Renaming **Pantry.base** will break the embed update links if you ever change the file name.

6 Fine-tuning (optional)

  • Adjust reorder_point as you learn real-world consumption.

  • Add last_updated if you want age tracking.

  • Duplicate Pantry.base as Grocery Only.base and add

    filter: “Need to buy (g) > 0” for a cleaner view.

🔎 Tip
That’s the whole system-one folder, one table, no scripts. Enjoy never running out of broccoli again!

Conclusions

Bases vs Dataview: Dataview excels at deep, SQL-like queries and can mash data from any corner of your vault. Bases, in contrast, feels more like a live spreadsheet: you change a number, a formula recalculates instantly, and the result can be embedded anywhere. For a simple “How many grams of broccoli do I have?” workflow, that immediacy wins.

That said, the setup you’ve just seen is deliberately minimal. You could layer on:

  • Early-warning columns (days_left, at_risk)  
  • Buttons for one-click stock decrements  
  • Scripts that auto-log purchases

…but none of that is required to keep your grocery list accurate.

⚠️ Warning
Bases is still in beta. Expect new column types, improved filters, and UI tweaks over the next few months.