π¦ ClawHub
Secure Google Docs access for OpenClaw By PortEden
by @porteden
Google Docs Management - permission-based create, read, and edit doc content; manage sharing, permissions, rename and delete.
TERMINAL
clawhub install porteden-docsπ About This Skill
name: porteden-docs description: Secure Google Docs Management - permission-based create, read, and edit doc content; manage sharing, permissions, rename and delete. homepage: https://porteden.com metadata: {"openclaw":{"emoji":"π","requires":{"bins":["porteden"],"env":["PE_API_KEY"]},"primaryEnv":"PE_API_KEY","install":[{"id":"brew","kind":"brew","formula":"porteden/tap/porteden","bins":["porteden"],"label":"Install porteden (brew)"},{"id":"go","kind":"go","module":"github.com/porteden/cli/cmd/porteden@latest","bins":["porteden"],"label":"Install porteden (go)"}]}}
porteden docs
Use porteden docs for Google Docs content operations and file management. Use -jc flags for AI-optimized output.
If porteden is not installed: brew install porteden/tap/porteden (or go install github.com/porteden/cli/cmd/porteden@latest).
Setup (once)
porteden auth login β opens browser, credentials stored in system keyringporteden auth login --token β stored in system keyringporteden auth statusPE_API_KEY is set in the environment, the CLI uses it automatically (no login needed).driveAccessEnabled: true and a connected Google account with Drive scopes.Docs commands (porteden docs)
Content
porteden docs create --name "Meeting Notes"porteden docs create --name "Brief" --folder google:0B7_FOLDERporteden docs read google:DOCIDporteden docs read google:DOCID --format structured -jporteden docs edit google:DOCID --append "New paragraph."porteden docs edit google:DOCID --insert "Header text" --at 1porteden docs edit google:DOCID --find "old text" --replace "new text"porteden docs edit google:DOCID --find "foo" --replace "bar" --find "baz" --replace "qux"porteden docs edit google:DOCID --ops-file ./ops.jsonFile management
porteden docs download google:DOCID -jcporteden docs share google:DOCID --type user --role writer --email user@example.comporteden docs share google:DOCID --type anyone --role readerporteden docs permissions google:DOCID -jcporteden docs rename google:DOCID --name "New Title"porteden docs delete google:DOCID -yOps file format
--ops-file accepts a JSON array of operations:
[
{"type": "appendText", "text": "New paragraph at end."},
{"type": "insertText", "text": "Header", "index": 1},
{"type": "replaceText", "find": "old phrase", "replace": "new phrase", "matchCase": true}
]
Notes
PE_PROFILE=work to avoid repeating --profile.-jc is shorthand for --json --compact: strips noise, limits fields, reduces tokens for AI agents.google:1BxiMVs0XRA5...). Pass them as-is.porteden docs read returns plain text by default; use --format structured for full API JSON with headings and formatting.--find and --replace are repeatable and must be used in matched pairs. --ops-file is mutually exclusive with inline edit flags.porteden docs download returns URLs only β no binary content is streamed.accessInfo in responses describes active token restrictions.delete moves to trash (reversible). Files can be restored from Google Drive trash.PE_API_KEY, PE_PROFILE, PE_FORMAT, PE_COLOR, PE_VERBOSE.π Tips & Best Practices
PE_PROFILE=work to avoid repeating --profile.-jc is shorthand for --json --compact: strips noise, limits fields, reduces tokens for AI agents.google:1BxiMVs0XRA5...). Pass them as-is.porteden docs read returns plain text by default; use --format structured for full API JSON with headings and formatting.--find and --replace are repeatable and must be used in matched pairs. --ops-file is mutually exclusive with inline edit flags.porteden docs download returns URLs only β no binary content is streamed.accessInfo in responses describes active token restrictions.delete moves to trash (reversible). Files can be restored from Google Drive trash.PE_API_KEY, PE_PROFILE, PE_FORMAT, PE_COLOR, PE_VERBOSE.