ivo.zilkenat
  • Joined on 2025-10-29

schnorrer-cli (1.3.1)

Published 2026-03-24 08:54:05 +00:00 by ivo.zilkenat

Installation

pip install --index-url  --extra-index-url https://pypi.org/ schnorrer-cli

About this package

CLI for Schnorrer expense-splitting app

schnorrer-cli

CLI for the Schnorrer expense-splitting app.

Installation

uv tool install schnorrer-cli \
  --extra-index-url https://gitea.i.ivo-zilkenat.de/api/packages/ivo.zilkenat/pypi/simple/

Setup

  1. Generate an API key in the web app: Settings → API Keys → Generate API Key (copy immediately — shown once)
  2. Get the Site URL of your deployment (e.g. https://site.schnorrer.ivo-zilkenat.de for prod, or the site URL printed by rdu dev start for local dev)
  3. Authenticate:
schnorrer auth login --url <site-url> --key <api-key>
schnorrer auth status   # verify

Environment variables SCHNORRER_URL and SCHNORRER_TOKEN override the config file.

Config stored at ~/.config/schnorrer/config.toml (0600 permissions).

Commands

All commands support --json for machine-readable output.

Groups

schnorrer groups list                              # list your groups (sorted by recent activity)
schnorrer groups members --group "Trip to Berlin"  # list members (accepts name or ID)
schnorrer groups invite --group "Trip to Berlin"   # generate invite link

Note: Group creation should be done through the web UI, not via CLI. The web UI handles member setup, invite flows, and 1-on-1 detection automatically.

Expenses

# List expenses (with optional filters)
schnorrer expenses list --group "Trip" \
  [--member <name>] \
  [--category food] \
  [--from yesterday] [--to today] \
  [--description <text>] \
  [--min-amount 1000] [--max-amount 5000]

# Add an expense
schnorrer expenses add \
  --group "Trip" \
  --amount 8000 \
  --currency EUR \
  --description "Dinner at Nobu" \
  --category food \
  --payer "Alice" \
  --split equal \
  --participants all \
  --date 2026-03-14 \
  --notes "Group dinner, receipt shows 80.00 EUR" \
  --receipt /path/to/receipt.jpg

# View expense detail (shows split breakdown, receipt URL)
schnorrer expenses detail --group "Trip" --expense <expenseId>

# Edit (only provide fields to change)
schnorrer expenses edit --group "Trip" --expense <expenseId> \
  [--amount 9000] [--description "..."] [--category transport] \
  [--date yesterday] [--notes "..."] [--receipt /path/to/new.pdf]

# Delete
schnorrer expenses delete --group "Trip" --expense <expenseId>

Key details:

  • Amounts are in minor units (cents): 80.00 EUR = 8000
  • Name resolution--group, --payer, and --participants all accept human-readable names (exact, substring, or fuzzy match). Convex IDs and emails also work.
  • --group accepts a group name or substring: --group "Frank" finds "Frankreich, Fromàge"
  • --payer / --participants accept member display names: --payer "Alice", --participants "Alice,Bob"
  • --participants all selects every group member
  • --date accepts ISO dates (2026-03-14), relative (today, yesterday, tomorrow), offsets (+3 days, -2 days), weekdays (last friday), or epoch ms. Defaults to now.
  • --receipt uploads an image (jpg/png/gif/webp) or PDF to Convex storage
  • Categories: food, transport, accommodation, entertainment, shopping, utilities, other — typos get a "Did you mean?" suggestion
  • Split modes: equal, exact, shares, percentage, adjustment — non-equal modes require --values (comma-separated, one per participant)

Balances

schnorrer balances --group "Trip"   # simplified debts: who owes whom

Settlements

schnorrer settlements list --group "Trip"
schnorrer settlements add --group "Trip" \
  --payer "Alice" --recipient "Bob" \
  --amount 2500 --currency EUR --date today
schnorrer settlements delete --group "Trip" --settlement <id>

Admin

schnorrer admin seed-rates   # seed exchange rates (daily cron handles this normally)

Auto-Update

After expenses add, the CLI checks the Gitea PyPI registry for newer versions (24h cache). If outdated, a warning is printed to stderr. Update with:

uv tool install --upgrade schnorrer-cli \
  --extra-index-url https://gitea.i.ivo-zilkenat.de/api/packages/ivo.zilkenat/pypi/simple/

Claude Agent Skill

The CLI auto-installs a skill file to ~/.claude/skills/schnorrer/SKILL.md on first run. This gives Claude agents full context on how to use the CLI, including best practices for receipt handling, split modes, and expense workflows.

Requirements

Requires Python: >=3.11
Details
PyPI
2026-03-24 08:54:05 +00:00
4
47 KiB
Assets (2)
Versions (5) View all
1.3.1 2026-03-24
1.3.0 2026-03-23
1.2.0 2026-03-23
1.1.0 2026-03-19
1.0.0 2026-03-19