Skip to content

feat(sheets): add write-note and find-replace commands#341

Merged
steipete merged 2 commits intoopenclaw:mainfrom
Shehryar:feat/sheets-write-note-find-replace
Mar 9, 2026
Merged

feat(sheets): add write-note and find-replace commands#341
steipete merged 2 commits intoopenclaw:mainfrom
Shehryar:feat/sheets-write-note-find-replace

Conversation

@Shehryar
Copy link
Copy Markdown

Summary

  • sheets write-note: Write or clear a cell note via UpdateCells BatchUpdate. Uses ForceSendFields to ensure empty notes serialize correctly for clearing.
  • sheets find-replace: Find and replace text across a spreadsheet using the native FindReplaceRequest. Supports --sheet (scope to single sheet), --match-case, --match-entire, --regex, and --formulas flags.

Usage

# Write a note
gog sheets write-note <spreadsheetId> Sheet1!A1 "reminder text"

# Clear a note
gog sheets write-note <spreadsheetId> Sheet1!A1 --clear

# Find and replace across all sheets
gog sheets find-replace <spreadsheetId> "old text" "new text"

# Scoped to a single sheet, case-sensitive
gog sheets find-replace <spreadsheetId> "foo" "bar" --sheet Sheet1 --match-case

Test plan

  • make build passes
  • TestSheetsWriteNoteCmd — write note, clear note (verifies ForceSendFields serialization)
  • TestSheetsFindReplaceCmd — basic replace, sheet scoping, match-case, regex

🤖 Generated with Claude Code

@steipete steipete force-pushed the feat/sheets-write-note-find-replace branch from ff846b6 to 58278ef Compare March 9, 2026 03:07
@steipete steipete merged commit 521b4d4 into openclaw:main Mar 9, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Mar 9, 2026

Landed via reviewed rebase onto main.

  • Gate: go test ./internal/cmd -run 'TestSheets(FindReplace|UpdateNote)' -count=1, make lint, make test, make ci\n- Land commit: 58278ef\n- Merge commit: 521b4d4\n\nNarrowed scope to the current-main fit: landed sheets find-replace, kept the note-clearing fix in existing sheets update-note, and skipped the stale write-note surface.\n\nThanks @Shehryar!

klodr pushed a commit to klodr/gogcli that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants