Manage Google Tasks from the command line - view, create, update, delete tasks and task lists. Use when the user asks to interact with Google Tasks, manage to-do items, create task lists, mark tasks complete, or check their Google Tasks.
Manage Google Tasks from the command line - view, create, update, delete tasks and task lists. Use when the user asks to interact with Google Tasks, manage to-do items, create task lists, mark tasks complete, or check their Google Tasks.
homepage
https://github.com/BRO3886/gtasks
license
MIT
compatibility
Requires gtasks CLI tool to be installed and authenticated
metadata
{"author":"BRO3886","version":"1.0"}
required-env
[{"name":"GTASKS_CLIENT_ID","description":"Google OAuth2 client ID — can also be set in config file under [credentials]"},{"name":"GTASKS_CLIENT_SECRET","description":"Google OAuth2 client secret — can also be set in config file under [credentials]"}]
allowed-tools
Bash(gtasks:*)
Google Tasks CLI Skill
This skill enables you to manage Google Tasks directly from the command line using the gtasks CLI tool.
It can also be installed into supported AI agent skill directories with the built-in gtasks skills commands.
Prerequisites
Before using any commands, ensure the following requirements are met:
1. GTasks Installation
Check if gtasks is installed on the system:
# Cross-platform check (works on macOS, Linux, Windows Git Bash)
gtasks --version 2>/dev/null || gtasks.exe --version 2>/dev/null || echo"gtasks not found"# Or use which/where commands# macOS/Linux:which gtasks
# Windows (Command Prompt):where gtasks
# Windows (PowerShell):
Get-Command gtasks
If gtasks is not installed:
macOS/Linux (recommended):
curl -fsSL https://gtasks.sidv.dev/install | bash
Installs to ~/.local/bin by default. Set INSTALL_DIR to override:
Move to a directory in your PATH (e.g. ~/.local/bin or /usr/local/bin)
chmod +x gtasks
Windows: Download the binary from GitHub Releases and add to PATH.
Verify installation: gtasks --version
IMPORTANT for Agents: Always check if gtasks is installed before attempting to use it. If the command is not found, inform the user and provide installation instructions.
2. Environment Variables
Set up Google OAuth2 credentials as environment variables:
Once environment variables are set, authenticate with Google:
gtasks login
This will open a browser for OAuth2 authentication. The token is stored in the system keyring (macOS Keychain, Linux Secret Service, Windows Credential Manager). On headless systems where no keyring is available, it falls back to a token file in the config directory. If you no longer need access, run gtasks logout to remove the stored token.
4. Optional: Install This Skill for Supported Agents
If gtasks is already installed, you can install this skill into supported agent directories with:
gtasks skills install
Supported agent targets:
claude -> ~/.claude/skills/gtasks-cli/
codex -> ~/.agents/skills/gtasks-cli/
openclaw -> ~/.openclaw/skills/gtasks-cli/
Useful commands:
gtasks skills status
gtasks skills install --agent codex
gtasks skills install --agent all
gtasks skills uninstall --agent codex
For automated setups, prefer --agent <name> or --agent all to avoid interactive prompts.
Core Concepts
Task Lists: Containers that hold tasks (like "Work", "Personal", "Shopping")
Tasks: Individual to-do items within a task list
Task Properties: Title (required), notes/description (optional), due date (optional), status (pending/completed)
Command Structure
All commands follow this pattern:
gtasks [command] [subcommand] [flags] [arguments]
Authentication
Login
gtasks login
Opens browser for Google OAuth2 authentication. Required before using any other commands.
Logout
gtasks logout
Removes stored credentials from the system keyring (and token file if present).
Skill Management
These commands manage installation of the gtasks-cli skill itself for supported AI agents.
Check Skill Status
gtasks skills status
Shows whether the skill is installed for Claude, Codex, and OpenClaw, along with the installed version when available.
Interactive prompt to select and delete a task list.
Update Task List Title
gtasks tasklists update -t "New Title"
Interactive prompt to select a task list and update its title.
Flags:
-t, --title: New title for the task list (required)
Task Management
All task commands can optionally specify a task list using the -l flag. If omitted, gtasks uses GTASKS_DEFAULT_TASKLIST env var or tasks.default_task_list from the config file. If only one list exists, it is selected automatically. Otherwise you'll be prompted interactively.
gtasks tasks view --sort=due # Sort by due date
gtasks tasks view --sort=title # Sort by title
gtasks tasks view --sort=position # Sort by position (default)
Tasks in Work:
No Title Description Status Due
1 Finish report Q4 analysis pending 25 December 2024
2 Team meeting Weekly sync pending -
3 Code review PR #123 completed 20 December 2024
Always check authentication first: If commands fail with authentication errors, run gtasks login
Use task list flag for automation: When scripting or when the user specifies a list name, use -l flag to avoid interactive prompts
Leverage flexible date parsing: The --due flag accepts natural language dates like "tomorrow", "next week", etc.
Use appropriate output format:
Table format for human-readable output
JSON for parsing/integration with other tools
CSV for spreadsheet import
Task numbers are ephemeral: Task numbers change when tasks are added, completed, or deleted. Always view the list first to get current numbers.
Handle missing lists gracefully: If a user specifies a non-existent list name, the command will error. Always verify list names first with gtasks tasklists view.
Error Handling
Common errors and solutions:
"Failed to get service" or Authentication errors:
First, ensure environment variables are set: echo $GTASKS_CLIENT_ID
If variables are not set, export them (see Prerequisites section)
Then run gtasks login to authenticate
"incorrect task-list name": The specified list name doesn't exist. Use gtasks tasklists view to see available lists
"Incorrect task number": The task number is invalid. Use gtasks tasks view to see current task numbers
"Date format incorrect": The date string couldn't be parsed. Use formats like "2024-12-25", "tomorrow", or "Dec 25"
# Try to run gtasks version check
gtasks --version 2>/dev/null || gtasks.exe --version 2>/dev/null
If this fails, inform the user that gtasks is not installed and provide installation instructions from the Prerequisites section.
Verify environment variables are set:
# Check if variables exist (macOS/Linux)
[ -n "$GTASKS_CLIENT_ID" ] && echo"GTASKS_CLIENT_ID is set" || echo"GTASKS_CLIENT_ID is not set"
[ -n "$GTASKS_CLIENT_SECRET" ] && echo"GTASKS_CLIENT_SECRET is set" || echo"GTASKS_CLIENT_SECRET is not set"# Windows PowerShellif ($env:GTASKS_CLIENT_ID) { "GTASKS_CLIENT_ID is set" } else { "GTASKS_CLIENT_ID is not set" }
if ($env:GTASKS_CLIENT_SECRET) { "GTASKS_CLIENT_SECRET is set" } else { "GTASKS_CLIENT_SECRET is not set" }