Add a buzz create command that interactively prompts the user to create a new Beeminder goal from the CLI, rather than only via the TUI modal (n) or the raw API.
Desired behavior
buzz create prompts for: slug, title, type (default hustler), units, and 2 of 3 of goaldate/goalval/rate.
- Reuse the existing
validateCreateGoalInput() validation that backs the TUI modal.
- Check authentication, validate input, call the existing goal-creation client method, and print the result.
- Update help text and the "Available commands" error message.
Example:
$ buzz create
Create a new Beeminder goal
===========================
Goal slug: reading
Goal title: Daily Reading
Goal type (default: hustler):
Goal units: pages
Goal date: null
Goal value: 365
Rate: 1
Creating goal...
Successfully created goal: reading
Context
A previous implementation was attempted in PR #197, but it was built against the old monolithic main.go and went stale after that file was split into per-command files and the Beeminder fetchers became context-aware *HTTPClient methods. PR #197 was closed in favor of a fresh implementation against current main. See that PR for the original approach and the goal-creation flow it followed (mirroring buzz add / buzz charge).
Add a
buzz createcommand that interactively prompts the user to create a new Beeminder goal from the CLI, rather than only via the TUI modal (n) or the raw API.Desired behavior
buzz createprompts for: slug, title, type (defaulthustler), units, and 2 of 3 of goaldate/goalval/rate.validateCreateGoalInput()validation that backs the TUI modal.Example:
Context
A previous implementation was attempted in PR #197, but it was built against the old monolithic
main.goand went stale after that file was split into per-command files and the Beeminder fetchers became context-aware*HTTPClientmethods. PR #197 was closed in favor of a fresh implementation against currentmain. See that PR for the original approach and the goal-creation flow it followed (mirroringbuzz add/buzz charge).