Google Tasks CLI
gtasks: A CLI Tool for Google Tasks

Docs
Refer to the docs website to read about available commands.
AI Agent Skills
GTasks includes Agent Skills support for AI agents like Claude Code. The skills provide comprehensive instructions for AI agents to effectively use gtasks.
📁 Location: skills/gtasks-cli/
Features:
- Complete command reference with examples
- Cross-platform support (macOS, Linux, Windows)
- Helper scripts for daily reports, backups, and imports
- Quick reference guide and advanced usage patterns
For AI Users: Load the skill with Claude Code or compatible AI agents to get intelligent assistance with Google Tasks management.
Learn more: See skills/README.md for details.
Instructions to install
- Download the binary for your system (check releases)
- Move to a particular folder, for eg Documents
- Append the absolute path (use
pwd) of the folder to PATH
- Execute
gtasks from anywhere
Instructions to install using go install
Not working yet. Will be fixed soon.
go install github.com/BRO3886/gtasks@latest
Instructions to Run and Build from Source:
Prerequisites
- Go 1.24+
- Google Cloud Console OAuth2 credentials (see Configuration section)
Setup
- Clone the repository:
git clone https://github.com/BRO3886/gtasks
cd gtasks
- Create a
.env file with your OAuth2 credentials:
# .env
GTASKS_CLIENT_ID=your-client-id.apps.googleusercontent.com
GTASKS_CLIENT_SECRET=your-client-secret
Build Commands
# Development build (uses .env file)
make dev
# Build for specific platforms
make linux # Linux (amd64 + arm64)
make windows # Windows (amd64)
make mac # macOS (amd64 + arm64)
# Build for all platforms
make all
# Create release packages
make release
Configuration
To use GTasks, you need to set up Google OAuth2 credentials:
-
Go to Google Cloud Console
-
Create a new project or select existing one
-
Enable the Google Tasks API
-
Create OAuth2 credentials:
- Application type: "Web application"
- Add authorized redirect URIs:
http://localhost:8080/callback
http://localhost:8081/callback
http://localhost:8082/callback
http://localhost:9090/callback
http://localhost:9091/callback
-
Set environment variables:
export GTASKS_CLIENT_ID="your-client-id.apps.googleusercontent.com"
export GTASKS_CLIENT_SECRET="your-client-secret"
Or create a .env file (for building from source).
Token Storage
GTasks stores authentication tokens in ~/.gtasks/token.json. This directory is created automatically on first login.
Usage:
gtasks [command]
Available Commands:
help Help about any command
login Logging into Google Tasks
tasklists View and create tasklists for currently signed-in account
tasks View, create, list and delete tasks in a tasklist
Flags:
-h, --help help for gtasks
-t, --toggle Help message for toggle
Use "gtasks [command] --help" for more information about a command.
Commands
Help
- To see details about a command
gtasks <COMMAND> help
Auth
gtasks login
gtasks logout
Tasklists
gtasks tasklists view
gtasks tasklists add -t 'title'
gtasks tasklists add --title 'title'
gtasks tasklists rm
Tasks
- To pre-select tasklist, provide it's title as follows:
gtasks tasks -l <title> subcommand [--subcommand-flags]
Examples:
gtasks tasks [--tasklist|-l] "DSC VIT" view [--include-completed | -i]
Note: If the -l flag is not provided you will be able to choose a tasklist from the prompt
gtasks tasks view
gtasks tasks view -i
gtasks tasks view --include-completed
gtasks tasks view ... --sort [due,title,position, default=position]
gtasks tasks view --max 10 # Show only first 10 tasks
gtasks tasks add
# Create 5 daily tasks starting from Feb 10
gtasks tasks add -t "Standup" -d "2025-02-10" --repeat daily --repeat-count 5
# Create weekly tasks until March 10
gtasks tasks add -t "Weekly sync" -d "2025-02-10" --repeat weekly --repeat-until "2025-03-10"
Repeat patterns: daily, weekly, monthly, yearly
gtasks tasks done
- Undo a completed task (mark as incomplete)
gtasks tasks undo
- Clear completed tasks (hide from API)
gtasks tasks clear
gtasks tasks clear --force # Skip confirmation
- View detailed task information (including links/URLs)
gtasks tasks info [task-number]
# Interactive mode - shows current values and prompts for changes
gtasks tasks update [task-number]
# Flag mode - update specific fields
gtasks tasks update 1 --title "New title"
gtasks tasks update 1 --note "Updated note" --due "tomorrow"
gtasks tasks rm
Made with :coffee: &
Cobra