Skip to content

feat(create): non-interactive goal creation via CLI flags - #342

Merged
narthur merged 3 commits into
mainfrom
create-noninteractive
Jul 13, 2026
Merged

feat(create): non-interactive goal creation via CLI flags#342
narthur merged 3 commits into
mainfrom
create-noninteractive

Conversation

@narthur

@narthur narthur commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Adds a flag-based form of buzz create alongside the existing interactive prompts, closing three related issues.

What

--type accepts a menu number, canonical name, or human label (e.g. --type=1, --type="Do Less", --type=drinker) — the same resolution the interactive prompt does. --help and bad flags report without requiring auth, matching buzz add.

Config loading now goes through the shared loadClient() helper, consistent with the other credentialed commands.

Test

go build, go test ./..., go vet ./... all green. New tests cover flag parsing, --type resolution, title-defaults-to-slug, the deadline partial-failure path, the no-deadline skip, and --help / bad-flag branches.

Closes #331
Closes #332
Closes #335

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added non-interactive options for creating goals with command-line flags.
    • Added support for setting deadlines during goal creation.
    • Improved goal type handling across menu selections and text labels.
    • Added detailed usage information for buzz create.
  • Bug Fixes

    • Improved error reporting for invalid flags and deadline update failures.
    • Titles now default to the provided slug when omitted.

narthur and others added 2 commits July 12, 2026 18:59
Add flag-based `buzz create` (--slug/--units/--title/--type/--goaldate/
--goalval/--rate/--deadline) alongside the interactive flow. Title now
defaults to the slug when omitted, and --deadline sets the goal deadline
after creation.

Closes #331, #332, #335.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- --type now resolves menu numbers/labels to canonical goal_type (bug scan)
- handleCreateCommand uses shared loadClient() helper (structural)
- cover deadline partial-failure, no-deadline skip, --type resolution,
  and bad-flag parse paths (test coverage)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

coderabbitai[bot]

This comment was marked as resolved.

CodeRabbit feedback: `buzz create ... typo` silently ignored the stray
arg; now errors on fs.NArg() != 0. Also cover --deadline=0 (explicit
midnight) so setDeadline intent isn't inferred from a nonzero value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@narthur
narthur merged commit 42d9ed0 into main Jul 13, 2026
6 checks passed
@narthur
narthur deleted the create-noninteractive branch July 13, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant