{"_id":"@doranhwang/gtask","_rev":"3-2b0a88b06cb4d34630faccd2b3e6520e","name":"@doranhwang/gtask","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@doranhwang/gtask","version":"0.1.0","keywords":["google-tasks","cli","multi-account","productivity","tasks","todo"],"author":{"url":"https://github.com/doranhwang","name":"Doran Hwang"},"license":"MIT","_id":"@doranhwang/gtask@0.1.0","maintainers":[{"name":"doranhwang","email":"doran.hwang@levelica.com"}],"homepage":"https://github.com/doranhwang/gtask#readme","bugs":{"url":"https://github.com/doranhwang/gtask/issues"},"bin":{"gtask":"dist/index.js"},"dist":{"shasum":"933ea39baba9f05af5b2399ff5c0abde20f2590d","tarball":"https://registry.npmjs.org/@doranhwang/gtask/-/gtask-0.1.0.tgz","fileCount":29,"integrity":"sha512-LBSHe4jaaujZHOmFGzi2jTEfMtVjD006lkftu5dYWbzjlcmoUtP5MetLc0IK9PbmWhQEwBvrAV4v9i635jRZoQ==","signatures":[{"sig":"MEQCIDFmk/ciVZ2iwoBGTMAVjPPStmnEITK1t76G7K0jGWoiAiBUL8WhAwQayIC4oppaTVfN8pSLoqrBalvAIVqnCla9aw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53278},"type":"module","engines":{"node":">=18"},"gitHead":"20890ac5bdfb631970fa975ba811d8f6977db9e4","scripts":{"dev":"tsx src/index.ts","build":"tsc","prepare":"tsc"},"_npmUser":{"name":"doranhwang","email":"doran.hwang@levelica.com"},"repository":{"url":"git+https://github.com/doranhwang/gtask.git","type":"git"},"_npmVersion":"11.6.2","description":"Google Tasks CLI with multi-account support and a unified merged view","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^10.1.0","chalk":"^5.3.0","commander":"^12.1.0","googleapis":"^144.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.6.2","@types/node":"^22.7.0"},"_npmOperationalInternal":{"tmp":"tmp/gtask_0.1.0_1779495510717_0.49403499322325106","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@doranhwang/gtask","version":"0.1.1","keywords":["google-tasks","cli","multi-account","productivity","tasks","todo"],"author":{"url":"https://github.com/doranhwang","name":"Doran Hwang"},"license":"MIT","_id":"@doranhwang/gtask@0.1.1","maintainers":[{"name":"doranhwang","email":"doran.hwang@levelica.com"}],"homepage":"https://github.com/doranhwang/gtask#readme","bugs":{"url":"https://github.com/doranhwang/gtask/issues"},"bin":{"gtask":"dist/index.js"},"dist":{"shasum":"62f57fb7b6b7bc3a1a669667c5bad381113c1c3e","tarball":"https://registry.npmjs.org/@doranhwang/gtask/-/gtask-0.1.1.tgz","fileCount":29,"integrity":"sha512-thx4Wt/dflD9/C/lkUUQie7iQdj09M7eVOL6BUPUL60oi/DLmGMxHLcVm7whKJI6Aez8z6a4rUbiERSet8OVmg==","signatures":[{"sig":"MEUCIQDmY0UFQrT+LR5dC5NeBxB6mUimMuia5gxuyWTRvmCgKAIgOxoMj/f0nOwKJmQ6k+F4AcTLoYBCEnvRMjixZB2m0S8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59414},"type":"module","engines":{"node":">=18"},"gitHead":"512650116a7b84c935c057ca7b5b5c23b4dd1f27","scripts":{"dev":"tsx src/index.ts","build":"tsc","prepublishOnly":"tsc"},"_npmUser":{"name":"doranhwang","email":"doran.hwang@levelica.com"},"repository":{"url":"git+https://github.com/doranhwang/gtask.git","type":"git"},"_npmVersion":"11.6.2","description":"Google Tasks CLI with multi-account support and a unified merged view","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^10.1.0","chalk":"^5.3.0","commander":"^12.1.0","googleapis":"^144.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.6.2","@types/node":"^22.7.0"},"_npmOperationalInternal":{"tmp":"tmp/gtask_0.1.1_1779497298248_0.9083939097975708","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@doranhwang/gtask","version":"0.2.0","description":"Google Tasks CLI with multi-account support and a unified merged view","type":"module","bin":{"gtask":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsx src/index.ts","prepublishOnly":"tsc"},"keywords":["google-tasks","cli","multi-account","productivity","tasks","todo"],"author":{"name":"Doran Hwang","url":"https://github.com/doranhwang"},"license":"MIT","homepage":"https://github.com/doranhwang/gtask#readme","repository":{"type":"git","url":"git+https://github.com/doranhwang/gtask.git"},"bugs":{"url":"https://github.com/doranhwang/gtask/issues"},"engines":{"node":">=18"},"dependencies":{"chalk":"^5.3.0","commander":"^12.1.0","googleapis":"^144.0.0","open":"^10.1.0"},"devDependencies":{"@types/node":"^22.7.0","tsx":"^4.19.0","typescript":"^5.6.2"},"gitHead":"42e1c3d082684b12640a44b5fbfc72693e45948a","_id":"@doranhwang/gtask@0.2.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-XULXA8P1yIrHHbNYKiaOAr3g05FXGxouWGTvnIoataw56sz7wAfJWhU0k6me5K5TdgwrvK7xkRWutkRAa4CtnA==","shasum":"397a38b103d86fcd7f73a25db318c0cf2a4014c8","tarball":"https://registry.npmjs.org/@doranhwang/gtask/-/gtask-0.2.0.tgz","fileCount":29,"unpackedSize":65215,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEg3Xw8Le3YQWXk9xWJo3ZUZRmeorDxOVeFjXfG1ke/RAiAoMqk07zxyZPWX6Xy+yVg1lDy1TYqTXzl0AWkFjiDckw=="}]},"_npmUser":{"name":"doranhwang","email":"doran.hwang@levelica.com"},"directories":{},"maintainers":[{"name":"doranhwang","email":"doran.hwang@levelica.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gtask_0.2.0_1779506646220_0.6184579418484184"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-23T00:18:30.627Z","modified":"2026-05-23T03:24:06.484Z","0.1.0":"2026-05-23T00:18:30.865Z","0.1.1":"2026-05-23T00:48:18.387Z","0.2.0":"2026-05-23T03:24:06.368Z"},"bugs":{"url":"https://github.com/doranhwang/gtask/issues"},"author":{"name":"Doran Hwang","url":"https://github.com/doranhwang"},"license":"MIT","homepage":"https://github.com/doranhwang/gtask#readme","keywords":["google-tasks","cli","multi-account","productivity","tasks","todo"],"repository":{"type":"git","url":"git+https://github.com/doranhwang/gtask.git"},"description":"Google Tasks CLI with multi-account support and a unified merged view","maintainers":[{"name":"doranhwang","email":"doran.hwang@levelica.com"}],"readme":"# gtask\n\n> Google Tasks CLI with multi-account support and a unified merged view.\n\n`gtask` lets you manage tasks across multiple Google accounts (e.g., personal + work) from a single command line. Tasks from all accounts are merged into one view with origin labels, and you can act on any task by its displayed numeric index.\n\n## Features\n\n- **Multi-account** — register any number of Google accounts under short aliases.\n- **Merged view** — `gtask list` shows tasks from every account at once, labeled by origin (`[P]`, `[W]`, etc.).\n- **Numeric refs** — `gtask done 3` completes the third task in the last list output.\n- **Per-account filtering** — `gtask list -a work` to focus on one account.\n- **Safe credentials** — OAuth tokens stored locally with strict file permissions (`chmod 600`).\n\n## Prerequisites\n\n- **Node.js 18+**\n- A **Google Cloud project** with an OAuth client (see [Setup](#setup) below).\n\n## Installation\n\n```bash\nnpm install -g @doranhwang/gtask\n```\n\nOr from source:\n\n```bash\ngit clone https://github.com/doranhwang/gtask.git\ncd gtask\nnpm install\nnpm run build\nnpm link\n```\n\n## Setup\n\n### 1. Create a Google Cloud project\n\nGo to [Google Cloud Console](https://console.cloud.google.com), create a new project (any name, e.g., `gtask-cli`).\n\n### 2. Enable Google Tasks API\n\nIn your project: **APIs & Services → Library → Google Tasks API → Enable**.\n\n### 3. Configure OAuth consent screen\n\n**APIs & Services → OAuth consent screen**:\n\n- User Type: **External**\n- App name, support email, developer contact: your own\n- Scopes: skip (requested at runtime)\n- Test users: **add every Google account you want to register** (e.g., personal Gmail + work email)\n\nThen click **Publish App** to move out of Testing mode. (Refresh tokens are valid for 7 days in Testing mode, indefinitely in Production. Personal-use apps generally do not require verification.)\n\n### 4. Create OAuth Client credentials\n\n**APIs & Services → Credentials → Create Credentials → OAuth client ID**:\n\n- Application type: **Desktop app**\n- Name: anything (e.g., `gtask`)\n\nDownload the JSON file.\n\n### 5. Place credentials\n\n```bash\nmkdir -p ~/.config/gtask\nmv ~/Downloads/client_secret_*.json ~/.config/gtask/credentials.json\nchmod 600 ~/.config/gtask/credentials.json\n```\n\n### 6. Authenticate accounts\n\n```bash\ngtask auth add personal -e you@gmail.com -l P\ngtask auth add work     -e you@company.com -l W\n```\n\nA browser opens for each. After consent, refresh tokens are saved under `~/.config/gtask/tokens/`.\n\n## Usage\n\n```bash\n# Merged view across all accounts (default task list only)\ngtask list\n\n# Include all task lists per account\ngtask list --all-lists\n\n# Filter to one account\ngtask list -a work\n\n# Include completed tasks\ngtask list --completed\n\n# Add a task to the default account\ngtask add \"Buy coffee\"\n\n# Add to a specific account with a due date\ngtask add \"Sprint review prep\" -a work -d 2026-05-30 -n \"Slides + demo\"\n\n# Add to a specific task list by name (no need to look up list IDs)\ngtask add \"Buy milk\" -a personal -l \"Shopping list\"\n\n# Show all task lists with full IDs\ngtask lists --full\n\n# Create a new task list\ngtask lists create \"Writing list\" -a personal\n\n# Delete a task list (by name or ID)\ngtask lists rm \"Writing list\" -a personal\n\n# Mark task #3 (from last list output) as done\ngtask done 3\n\n# Delete task #5\ngtask rm 5\n\n# Update title and clear due date\ngtask update 2 -t \"New title\" -d \"\"\n\n# Show all task lists across accounts\ngtask lists\n\n# Manage accounts\ngtask auth list\ngtask auth default work\ngtask auth rm personal\n```\n\nThe numeric index resolves against the most recent `gtask list` output (cached in `~/.config/gtask/last-list.json`). You can also pass a full ref `alias:listId:taskId` to any command that takes `<ref>`.\n\n## Configuration\n\nFiles in `~/.config/gtask/`:\n\n| File | Purpose | Permissions |\n|---|---|---|\n| `credentials.json` | OAuth client (from Google Cloud Console) | `600` |\n| `config.json` | Account aliases, labels, default | `600` |\n| `tokens/<alias>.json` | Per-account OAuth refresh tokens | `600` |\n| `last-list.json` | Numeric index cache for `done`/`rm`/`update` | `600` |\n\nThe directory itself is `chmod 700`.\n\n## Commands\n\n| Command | Description |\n|---|---|\n| `gtask auth add <alias>` | Authenticate and register an account |\n| `gtask auth list` | List registered accounts |\n| `gtask auth rm <alias>` | Remove an account |\n| `gtask auth default <alias>` | Set default account |\n| `gtask lists` | Show all task lists |\n| `gtask lists create <name>` | Create a task list |\n| `gtask lists rm <name>` | Delete a task list (by name or ID) |\n| `gtask list` (alias: `ls`) | Show tasks (merged across accounts) |\n| `gtask add <title>` | Add a task |\n| `gtask done <ref>` | Mark task completed |\n| `gtask rm <ref>` | Delete task |\n| `gtask update <ref>` | Update task |\n\nRun `gtask <command> --help` for full options.\n\n## Troubleshooting\n\n**\"This app isn't verified\" during OAuth** — expected for self-built personal-use apps. Click **Advanced → Go to gtask (unsafe)** to proceed.\n\n**Workspace account blocked** — corporate Google Workspace admins can block External OAuth apps. If your work account can't authenticate, that account is unavailable; others still work.\n\n**Token expired after 7 days** — your OAuth consent screen is in Testing mode. Publish the app in the OAuth consent screen settings.\n\n**Wrong task index** — numeric refs are based on the last `gtask list` output. Run `gtask list` again to refresh the cache before using `done`/`rm`/`update`.\n\n## License\n\nMIT © Doran Hwang\n","readmeFilename":"README.md"}