Install
openclaw skills install porteden-docsSecure Google Docs Management - permission-based create, read, and edit doc content; manage sharing, permissions, rename and delete.
openclaw skills install porteden-docsUse 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 <key> — 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.porteden docs)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.jsonporteden 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 -y--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}
]
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.