brewlog/src/presentation/cli
Jon Seager b668d368e7
feat(ai): add AI-powered extraction for roaster and roast forms
Users can upload a photo of a coffee bag or type a text prompt to
auto-fill roaster/roast form fields via OpenRouter's chat completions
API. The feature is opt-in: hidden when BREWLOG_OPENROUTER_API_KEY is
not set.

- Add src/infrastructure/ai.rs with OpenRouter client, prompt
  templates, JSON extraction from model responses, and unit tests
- Add extract-roaster and extract-roast API endpoints behind auth
- Add extraction UI (photo button + text input) to both form templates
- Add openrouter_api_key and openrouter_model to CLI args and AppState
- Enable reqwest gzip feature for compressed API responses
- Default model set to openrouter/free (auto-selects available models)
- Prompts instruct model to use web search for missing details
2026-02-03 18:00:19 +00:00
..
backup.rs feat(backup): add CLI backup and restore commands 2026-02-03 12:50:41 +00:00
bags.rs refactor(cli): restructure commands from flat to nested subcommands 2026-02-02 17:02:46 +00:00
brews.rs feat(brews): add filter paper to routes, views, CLI, and templates 2026-02-03 10:14:22 +00:00
cafes.rs feat(cafes): add CLI commands, web views, and templates 2026-02-03 14:53:00 +00:00
cups.rs feat(cups): add CLI commands for cup management 2026-02-03 16:36:27 +00:00
gear.rs refactor(cli): restructure commands from flat to nested subcommands 2026-02-02 17:02:46 +00:00
macros.rs chore(refactor): define macro for get/delete cli commands 2026-02-02 13:00:48 +00:00
mod.rs feat(ai): add AI-powered extraction for roaster and roast forms 2026-02-03 18:00:19 +00:00
roasters.rs refactor(cli): restructure commands from flat to nested subcommands 2026-02-02 17:02:46 +00:00
roasts.rs feat(roast): add update command for consistency with other entities 2026-02-02 17:09:32 +00:00
tokens.rs refactor(cli): restructure commands from flat to nested subcommands 2026-02-02 17:02:46 +00:00