---
name: mottainai-mo
description: "Use the `mo` CLI to interact with Mottainai — a home storage tracking app. Use when the user talks about Mottainai, wants to manage home inventory, add items to a storage or cart, track household goods, groceries, medicines, or other home items, manage a shopping list, work with Kanban boards, handle contacts or groups, or asks about what's in stock or expiring soon. Triggers on: mottainai, mo cli, storage, add item, shopping list, shopping cart, board, kanban, inventory, groceries, household, what's in stock, what's expiring, restock, contact groups."
---

# Mottainai CLI (`mo`)

`mo` is the CLI for Mottainai home storage tracking. All commands require
authentication (`mo auth login`). IDs are UUIDs returned by `list` commands.

## Auth

```bash
mo auth login          # Log in via browser OAuth
mo auth status         # Check current login
mo auth logout         # Remove stored credentials
mo auth update --locale en  # Update profile (en|de|ja)
```

## Storages

A *storage* is a named container (pantry, fridge, medicine cabinet, etc.).

```bash
mo container list --type storage                              # List storage containers
mo container create --type storage --name "Pantry"            # Create a storage container
mo container update STORAGE_ID --name "…"                     # Rename
mo container delete STORAGE_ID
```

## Items

Items live inside a storage. `quantity=0` means archived.

```bash
mo item list STORAGE_ID                  # List items (--json for raw JSON)
mo item create STORAGE_ID \
  --name "Milk" --quantity 2 --unit "l" \
  --unit-amount 1000 \
  --category "Dairy" --location "Fridge" \
  --expiration-date "2025-03-01"
mo item update ITEM_ID --quantity 1 --name "…"
mo item update ITEM_ID --unit "ml" --unit-amount 500
mo item update ITEM_ID --quantity 0      # Archive (out of stock)
mo item delete ITEM_ID
mo item vote ITEM_ID                     # Vote/thumbs up an item
```

## Shopping List

```bash
mo shopping list STORAGE_ID             # List shopping items
mo shopping add STORAGE_ID --name "Bread" --quantity 1
mo shopping add STORAGE_ID --name "Milk" --quantity 2 --unit ml --unit-amount 500
mo shopping check SHOPPING_ITEM_ID      # Mark as purchased (updates storage qty)
mo shopping uncheck SHOPPING_ITEM_ID
mo shopping update SHOPPING_ITEM_ID --quantity 3 --unit kg --unit-amount 1
mo shopping delete SHOPPING_ITEM_ID
mo shopping clear STORAGE_ID            # Clear entire list
```

## AI Operations

```bash
mo ai ask STORAGE_ID --question "What's expiring this week?"
mo ai parse STORAGE_ID --text "2 apples, 1 bag of rice, 3 yogurts"
mo ai parse STORAGE_ID --image photo.jpg   # Parse from image
mo ai edit STORAGE_ID                      # Edit items via natural language
mo ai classify --name "Oat milk"           # Classify a food item
mo ai suggest-categories STORAGE_ID
mo ai suggest-locations STORAGE_ID
```

## Boards (Kanban)

```bash
mo board list
mo board create --name "Household Tasks"
mo board get BOARD_ID
mo board update BOARD_ID --name "…"
mo board delete BOARD_ID

mo board column create BOARD_ID --name "To Do" --position 0
mo board column update BOARD_ID COLUMN_ID --name "Done"
mo board column delete BOARD_ID COLUMN_ID

mo board card create BOARD_ID \
  --column-id COLUMN_ID --title "Buy detergent" \
  --due-date "2025-04-01" --description "Any brand"
mo board card update BOARD_ID CARD_ID --title "…" --due-date "…"
mo board card move BOARD_ID CARD_ID --column-id COLUMN_ID
mo board card delete BOARD_ID CARD_ID

mo board label create BOARD_ID --name "Urgent" --color "#ef4444"
mo board member create BOARD_ID --user-id USER_ID --role member
```

## Contacts & Groups

```bash
mo contact list
mo contact add --email user@example.com    # Send contact request
mo contact accept CONTACT_ID
mo contact decline CONTACT_ID
mo contact delete CONTACT_ID
mo contact connect-token                   # Get your shareable connect token
mo contact incoming-count

mo contact-group list
mo contact-group create --name "Family"
mo contact-group member list GROUP_ID
mo contact-group member add GROUP_ID --user-id USER_ID --role member
mo contact-group member delete GROUP_ID USER_ID
```

## Categories & Locations

```bash
mo label category list STORAGE_ID
mo label category create STORAGE_ID --en "Dairy"
mo label category update LABEL_ID --en "…"
mo label category delete LABEL_ID

mo label location list STORAGE_ID
mo label location create STORAGE_ID --en "Fridge"
mo label location update LABEL_ID --en "…"
mo label location delete LABEL_ID
```

## Misc

```bash
mo token list                        # API tokens
mo token create --name "MCP" --expiry 90d
mo token delete TOKEN_ID
mo upload IMAGE_FILE                 # Upload an image, returns URL
mo image search "milk carton"        # Search online images
mo activity list STORAGE_ID          # View recent activity
mo update                            # Update CLI binary
mo version                           # Print CLI version
```

## Tips

- Always run `mo container list --type storage` first to get storage IDs.
- Use `--json` flag on `list` commands to get machine-readable output.
- `mo ai parse` is the fastest way to add multiple items at once.
- Archived items have `quantity=0`; restock with `mo item update --quantity N`.
- Shopping `check` automatically updates the item quantity in storage.
