{"_id":"@11x.agency/gworkspace","_rev":"3-2b7d24583e1b9e072b6b88f7a58ac6b3","name":"@11x.agency/gworkspace","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@11x.agency/gworkspace","version":"0.1.0","keywords":["google","workspace","drive","docs","sheets","cli"],"author":{"name":"11x.agency"},"license":"MIT","_id":"@11x.agency/gworkspace@0.1.0","maintainers":[{"name":"robinfaraj","email":"contact@robinfaraj.me"}],"homepage":"https://github.com/robinfaraj/gworkspace-cli#readme","bugs":{"url":"https://github.com/robinfaraj/gworkspace-cli/issues"},"bin":{"gw":"dist/index.js"},"dist":{"shasum":"655a1defb74da721d6a92250094af746fa8390c2","tarball":"https://registry.npmjs.org/@11x.agency/gworkspace/-/gworkspace-0.1.0.tgz","fileCount":4,"integrity":"sha512-RUH0UHqsGBo4675xymJc1R9tQQz/pk0dYiFcPGk1xlEVG5N3Y9bhnNV7flgITVRT/f2Wmf9qtVqMjptc7lQ6JQ==","signatures":[{"sig":"MEUCIAZH3NncJ/ktkWizgbE1ygp2yp/Frngf3AjhoJRYWH6SAiEArLQskC+pIwUZiP7X1QnbT6SqTUY4jGwmfYCKoRzWnlw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33351},"type":"module","engines":{"node":">=18"},"gitHead":"53ada25b730494ff68cb5bb5baf51310dcebc22f","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"robinfaraj","email":"contact@robinfaraj.me"},"repository":{"url":"git+https://github.com/robinfaraj/gworkspace-cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Google Workspace CLI — Drive, Docs, Sheets from the terminal","directories":{},"_nodeVersion":"24.12.0","dependencies":{"open":"^10.1.0","chalk":"^5.4.1","commander":"^13.1.0","googleapis":"^146.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/gworkspace_0.1.0_1772130408369_0.44371110209466647","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@11x.agency/gworkspace","version":"0.1.1","keywords":["google","workspace","drive","docs","sheets","cli"],"author":{"name":"11x.agency"},"license":"MIT","_id":"@11x.agency/gworkspace@0.1.1","maintainers":[{"name":"robinfaraj","email":"contact@robinfaraj.me"}],"homepage":"https://github.com/robinfaraj/gworkspace-cli#readme","bugs":{"url":"https://github.com/robinfaraj/gworkspace-cli/issues"},"bin":{"gw":"dist/index.js"},"dist":{"shasum":"a1d42b99d1140e7f84103fd34c408917e21fd706","tarball":"https://registry.npmjs.org/@11x.agency/gworkspace/-/gworkspace-0.1.1.tgz","fileCount":4,"integrity":"sha512-gAKfJowZ6rw5lSgX8vzIyPSvap8dS2NRlNQopuSe8seaIlRuOxMG/QmgtCkGu09sbYGAMg8ctvpJQyOHDzbxCA==","signatures":[{"sig":"MEQCIBnOoGC7O7A1vLrIXJU1cIMzQLqg+R7Xo6SI5LWBocqcAiAaXan3xMn5IzmgTO2zppw6zcT7i4krliOi8jr3V+98QA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33412},"type":"module","engines":{"node":">=18"},"gitHead":"a7a717d2268987cf8310bf7fdfe97b56e562c755","scripts":{"dev":"tsup --watch","build":"tsup"},"_npmUser":{"name":"robinfaraj","email":"contact@robinfaraj.me"},"repository":{"url":"git+https://github.com/robinfaraj/gworkspace-cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Google Workspace CLI — Drive, Docs, Sheets from the terminal","directories":{},"_nodeVersion":"24.12.0","dependencies":{"open":"^10.1.0","chalk":"^5.4.1","commander":"^13.1.0","googleapis":"^146.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/gworkspace_0.1.1_1772130983575_0.9673479076442535","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-02-26T18:26:48.273Z","modified":"2026-02-26T19:34:23.964Z","0.1.0":"2026-02-26T18:26:48.528Z","0.1.1":"2026-02-26T18:36:23.726Z"},"bugs":{"url":"https://github.com/robinfaraj/gworkspace-cli/issues"},"author":{"name":"11x.agency"},"license":"MIT","homepage":"https://github.com/robinfaraj/gworkspace-cli#readme","keywords":["google","workspace","drive","docs","sheets","cli"],"repository":{"url":"git+https://github.com/robinfaraj/gworkspace-cli.git","type":"git"},"description":"Google Workspace CLI — Drive, Docs, Sheets from the terminal","maintainers":[{"email":"joschua.suenneke@11x.agency","name":"joschua_11x.agency"},{"email":"contact@robinfaraj.me","name":"robinfaraj"}],"readme":"# @11x.agency/gworkspace\n\nGoogle Workspace CLI — Drive, Docs, Sheets from the terminal.\n\nAuth once, use everywhere. JSON output by default, human-readable with `--pretty`. Works with both My Drive and Shared Drives.\n\n## Install\n\n```bash\nnpm i -g @11x.agency/gworkspace\n```\n\nOr run without installing:\n\n```bash\nnpx @11x.agency/gworkspace --help\n```\n\n## Authentication\n\n### Quick start\n\n```bash\ngw auth\n```\n\nThis opens your browser for Google sign-in. Tokens are stored at `~/.11x/gworkspace/token.json`.\n\n### Check status\n\n```bash\ngw auth --status\n```\n\n### Log out\n\n```bash\ngw logout\n```\n\n### Custom OAuth credentials\n\nSet environment variables or add a `.env` file to use your own Google Cloud OAuth app:\n\n```bash\nexport GOOGLE_CLIENT_ID=\"your-client-id\"\nexport GOOGLE_CLIENT_SECRET=\"your-client-secret\"\n```\n\nAlso supports `GW_CLIENT_ID` / `GW_CLIENT_SECRET` as aliases.\n\n## Commands\n\n### Drive\n\n```bash\n# List files in root\ngw drive ls\n\n# List files in a folder by path\ngw drive ls /Projects\n\n# List by folder ID\ngw drive ls --folder <id>\n\n# Filter by type\ngw drive ls --type doc\ngw drive ls --type sheet\ngw drive ls --type folder\n\n# Limit results\ngw drive ls --limit 50\n\n# Create a folder\ngw drive mkdir \"New Folder\"\ngw drive mkdir \"Subfolder\" --folder <parent-id>\n\n# Search\ngw drive search \"quarterly report\"\ngw drive search \"budget\" --type sheet\n\n# Upload\ngw drive upload ./report.pdf\ngw drive upload ./data.csv --folder <folder-id> --name \"Q4 Data\"\n```\n\n### Shared Drives\n\nAll commands work with Shared Drives via the global `--drive` flag:\n\n```bash\n# List available Shared Drives\ngw drive shared\n\n# List files in a Shared Drive\ngw --drive <shared-drive-id> drive ls\ngw --drive <shared-drive-id> drive ls /Projects --pretty\n\n# Create a folder in a Shared Drive\ngw --drive <shared-drive-id> drive mkdir \"New Folder\"\n\n# Search within a Shared Drive\ngw --drive <shared-drive-id> drive search \"report\"\n\n# Upload to a Shared Drive\ngw --drive <shared-drive-id> drive upload ./file.pdf\n\n# Create docs/sheets in a Shared Drive folder\ngw doc create \"Meeting Notes\" --folder <shared-drive-folder-id>\ngw sheet create \"Budget\" --folder <shared-drive-folder-id>\n```\n\n### Docs\n\n```bash\n# Read document as plain text\ngw doc read <id-or-url>\n\n# Read as markdown\ngw doc read <id-or-url> --markdown\n\n# Create a new doc\ngw doc create \"Meeting Notes\"\ngw doc create \"Project Brief\" --folder <folder-id>\n\n# Append text\ngw doc append <id-or-url> \"New paragraph here\"\ngw doc append <id-or-url> --file ./notes.txt\n```\n\n### Sheets\n\n```bash\n# Read entire first sheet\ngw sheet read <id-or-url>\n\n# Read specific range\ngw sheet read <id-or-url> \"Sheet1!A1:C10\"\n\n# Write data (JSON)\ngw sheet write <id-or-url> \"A1:B2\" '[[\"Name\",\"Score\"],[\"Alice\",\"95\"]]'\n\n# Write from CSV\ngw sheet write <id-or-url> \"A1\" --file ./data.csv\n\n# Append rows\ngw sheet append <id-or-url> '[[\"Bob\",\"88\"],[\"Carol\",\"92\"]]'\ngw sheet append <id-or-url> --file ./more-data.csv\n\n# Create spreadsheet\ngw sheet create \"Budget 2026\"\ngw sheet create \"Sales Data\" --folder <folder-id>\n\n# List tabs\ngw sheet list <id-or-url>\n```\n\n## Output Modes\n\nAll commands support three output modes:\n\n```bash\ngw drive ls                # JSON (default) — for piping and scripting\ngw drive ls --pretty       # Human-readable table\ngw drive ls --quiet        # IDs only, one per line\n```\n\n## URLs and IDs\n\nAll commands accept either a Google URL or a raw file ID:\n\n```bash\ngw doc read https://docs.google.com/document/d/1abc.../edit\ngw doc read 1abc...\n```\n\n## Error Handling\n\nErrors go to stderr with exit code 1. Normal output goes to stdout, so piping works cleanly:\n\n```bash\ngw drive ls --quiet | head -5    # First 5 file IDs\ngw sheet read <id> | jq '.[0]'  # First row as JSON\n```\n\n## Development\n\n```bash\ngit clone https://github.com/robinfaraj/gworkspace-cli.git\ncd gworkspace-cli\npnpm install\npnpm build\nnode dist/index.js --help\n```\n\nTo use your own OAuth credentials during development, create a `.env` file:\n\n```\nGOOGLE_CLIENT_ID=your-client-id\nGOOGLE_CLIENT_SECRET=your-client-secret\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/my-feature`)\n3. Make your changes\n4. Build and verify (`pnpm build && node dist/index.js --help`)\n5. Commit and push\n6. Open a Pull Request\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","readmeFilename":"README.md"}