nutri-cli agent workflow
Purpose
Use this skill when working on the nutri-cli project. It covers setup, local usage, database handling, testing, build/release, and coding conventions that agents must follow.
Scope
- •CLI usage and examples
- •Local development workflow
- •Database path and env override
- •Tests, build, and release steps
- •Code and output conventions
Key constraints
- •Keep user-facing CLI output in German.
- •CLI behavior and flags must remain compatible with the original Click version.
- •Runtime: Python >= 3.11
- •CLI stack: Typer (Click-compatible) + Rich
- •DB: SQLite (stdlib)
Quick start
bash
make setup uv run nutri --help uv run nutri today
Common usage patterns
bash
# Log a meal uv run nutri log --meal lunch --desc "Bowl" --cal 650 --protein 45 # Show today uv run nutri today # Status (coach) uv run nutri status # Set / show targets uv run nutri target --cal 2200 --protein 160 uv run nutri target --show # Log / show water uv run nutri water 300 uv run nutri water --today # Query: last 7 days uv run nutri query --last 7d # Info uv run nutri info --format json # Export uv run nutri export --from 2026-01-01 --to 2026-01-31 --format csv -o jan.csv
Database location
- •Default: XDG Data Directory (app-specific)
- •Override: set
NUTRI_DB_PATH=/path/to/nutri.db
Development workflow
- •Read
AGENTS.mdandREADME.mdfor project rules and usage. - •Use
rgto find relevant code and tests. - •Keep CLI output strings in German and preserve existing flags.
- •Add or update tests when changing behavior.
- •Run tests if requested or if behavior changed.
Testing
- •Use the project test command if needed:
bash
make test
Build and packaging
bash
make build ./dist/nutri --help make package
Homebrew release notes
- •Formula path:
TAPS_DIR/homebrew-tap/Formula/nutri.rb - •Release steps:
- •Bump version in
pyproject.toml - •Run
make package - •Upload tar.gz +
.sha256 - •Update formula URL + SHA256
- •Bump version in
Files to know
- •
README.md: user-facing usage and examples - •
AGENTS.md: repo rules for agents - •
src/: CLI implementation - •
tests/: automated tests - •
pyproject.toml: version and dependencies