feat(keep): add create and delete commands#413
Open
jgwesterlund wants to merge 2 commits intosteipete:mainfrom
Open
feat(keep): add create and delete commands#413jgwesterlund wants to merge 2 commits intosteipete:mainfrom
jgwesterlund wants to merge 2 commits intosteipete:mainfrom
Conversation
Adds two new subcommands to `gog keep`: - `keep create --title <t> --text <body>` – create a text note - `keep create --title <t> --item <x> --item <y>` – create a checklist note - `keep delete <noteId>` – delete a note (requires --force or interactive confirmation) Both commands support --dry-run, --json/--plain output, and the full --service-account / --impersonate flow used by the rest of the Keep command group. Eight unit tests cover the happy paths, JSON output, input validation, and the notes/ prefix normalization for delete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The keep.readonly scope only allows reads. Now that we have create and delete commands, the service must request the full keep scope so that domain-wide delegation grants write access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two missing subcommands that the Google Keep API supports but
gog keepdidn't expose:keep create --title T --text body— create a plain-text notekeep create --title T --item x --item y— create a checklist note (repeatable--itemflag)keep delete <noteId>— delete a note with interactive confirmation (or--forceto skip)All commands follow the existing patterns in the codebase:
--dry-runsupport (create logs intent; delete goes throughconfirmDestructive)--json/--plainoutput modesnotes/prefix normalization for delete (accepts bare ID or full resource name)--service-account/--impersonateflowTest plan
keep_test.gocovering happy paths, JSON output, input validation, andnotes/prefix normalizationgo test ./internal/cmd/ -run TestKeep -v)go build ./...cleangog keep --helpshows new subcommands--dry-runproduces correct JSON for both commands🤖 Generated with Claude Code