You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(docs): add read command and align edit with ox-cli
- Add `docs read` with character-based --offset/--limit pagination
- Rewrite `docs edit` to use --old/--new with uniqueness enforcement,
--replace-all, --dry-run, escape sequences, and --no-match-case
- Align error messages and output format with ox-cli
- Fix upstream test references to renamed struct fields
Copy file name to clipboardExpand all lines: internal/cmd/docs.go
+147-2Lines changed: 147 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -29,15 +29,16 @@ type DocsCmd struct {
29
29
InfoDocsInfoCmd`cmd:"" name:"info" aliases:"get,show" help:"Get Google Doc metadata"`
30
30
CreateDocsCreateCmd`cmd:"" name:"create" aliases:"add,new" help:"Create a Google Doc"`
31
31
CopyDocsCopyCmd`cmd:"" name:"copy" aliases:"cp,duplicate" help:"Copy a Google Doc"`
32
-
CatDocsCatCmd`cmd:"" name:"cat" aliases:"text,read" help:"Print a Google Doc as plain text"`
32
+
CatDocsCatCmd`cmd:"" name:"cat" aliases:"text" help:"Print a Google Doc as plain text"`
33
+
ReadDocsReadCmd`cmd:"" name:"read" help:"Read document content with character offset/limit for pagination. Use --offset and --limit to page through large documents."`
33
34
CommentsDocsCommentsCmd`cmd:"" name:"comments" help:"Manage comments on files"`
34
35
ListTabsDocsListTabsCmd`cmd:"" name:"list-tabs" help:"List all tabs in a Google Doc"`
35
36
WriteDocsWriteCmd`cmd:"" name:"write" help:"Write content to a Google Doc"`
36
37
InsertDocsInsertCmd`cmd:"" name:"insert" help:"Insert text at a specific position"`
37
38
DeleteDocsDeleteCmd`cmd:"" name:"delete" help:"Delete text range from document"`
38
39
FindReplaceDocsFindReplaceCmd`cmd:"" name:"find-replace" help:"Find and replace text in document"`
39
40
UpdateDocsUpdateCmd`cmd:"" name:"update" help:"Insert text at a specific index in a Google Doc"`
40
-
EditDocsEditCmd`cmd:"" name:"edit" help:"Find and replace text in a Google Doc"`
41
+
EditDocsEditCmd`cmd:"" name:"edit" help:"Replace, insert, or delete text in a Google Doc. Use --new '' to delete. Use \\n in --new to insert paragraphs. Requires unique match unless --replace-all. Use --dry-run to preview."`
0 commit comments