Skip to content

Mabylife/hyprtask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hyprtask

A simple CLI tool for Google Tasks, built with Rust for fast and efficient task management from your terminal.

License: MIT

✨ Features

  • πŸš€ Zero Configuration - Download and use, no API credentials needed
  • ⚑ High Performance - Written in Rust, single executable binary
  • πŸ“ Simple & Intuitive - Clean command-line interface
  • πŸ”„ Auto Sync - Real-time sync with Google Tasks

πŸ“¦ Installation

Install using Cargo

cargo install hyprtask

Build from Source

Requires Rust 1.70 or newer:

git clone https://github.com/yourusername/hyprtask.git
cd hyprtask
cargo build --release

The compiled binary will be at target/release/hyprtask

πŸš€ Quick Start

1. Login with Google Account

hyprtask login

Your browser will open automatically for Google account authentication.

2. Manage Tasks

# List tasks
hyprtask li

# Add a task
hyprtask add "Buy milk"

# Complete a task
hyprtask done 1

That's it!

πŸ“– Usage

Authentication

hyprtask login              # Login with Google account
hyprtask logout             # Logout

List Tasks

hyprtask li                 # List incomplete tasks
hyprtask li -d              # List completed tasks
hyprtask li -a              # List all tasks

Add Tasks

hyprtask add "Task title"

Complete Tasks

hyprtask done 1             # Complete task #1
hyprtask done 1 3 5         # Complete tasks #1, #3, #5
hyprtask done --all         # Complete all incomplete tasks

Get Help

hyprtask --help             # Show all commands
hyprtask <command> --help   # Show help for specific command

πŸ“Έ Examples

List Tasks

$ hyprtask li
1. [ ] Buy milk
2. [ ] Finish report
3. [ ] Clean room

Add Task

$ hyprtask add "Drink water"
"Drink water" has been added to your tasks, number 4.

Complete Task

$ hyprtask done 1
Complete "Buy milk" task? (Y/n): y
"Buy milk" has been marked as completed.

πŸ” Privacy & Security

  • βœ… Uses official Google OAuth 2.0 authentication
  • βœ… Token stored locally at: ~/.config/hyprtask/token.json
  • βœ… Only requests Google Tasks access permission
  • βœ… No data collection or transmission of personal information

πŸ› οΈ Developer Information

Tech Stack

  • Language: Rust 2021 Edition
  • CLI Framework: clap 4.5
  • Async Runtime: tokio 1.40
  • HTTP Client: reqwest 0.12
  • OAuth 2.0: oauth2 4.4
  • API: Google Tasks API v1

Project Structure

hyprtask/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.rs          # Main entry point
β”‚   β”œβ”€β”€ api/             # Google Tasks API integration
β”‚   β”œβ”€β”€ auth/            # OAuth 2.0 authentication logic
β”‚   β”œβ”€β”€ cli/             # Command-line interface definitions
β”‚   β”œβ”€β”€ models/          # Data models
β”‚   └── utils/           # Utility functions
β”œβ”€β”€ Cargo.toml           # Project configuration
└── test_comprehensive.sh # Test script

Local Development

# Build development version
cargo build

# Run tests
./test_comprehensive.sh

# Build release version
cargo build --release

Testing

Run comprehensive integration tests:

./test_comprehensive.sh

Tests cover:

  • Basic functionality of all commands
  • Edge case handling
  • Error handling
  • OAuth authentication flow
  • Task synchronization

Contributing

Contributions are welcome! Please:

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

❓ FAQ

Can't open browser for login?

If automatic browser opening fails, manually copy the URL displayed in the terminal to your browser.

Getting "Not logged in" error?

Run hyprtask login to re-authenticate.

What if token expires?

The program automatically refreshes the token, no manual action needed.

Can I use multiple Google accounts?

Currently supports one account at a time. To switch accounts, logout first then login again.

πŸ“„ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments


If this project helps you, please give it a ⭐ Star!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published