hyprtask

Crates.iohyprtask
lib.rshyprtask
version0.1.0
created_at2025-11-10 08:47:37.14291+00
updated_at2025-11-10 08:47:37.14291+00
descriptionA simple CLI tool for Google Tasks
homepagehttps://github.com/Mabylife/hyprtask
repositoryhttps://github.com/Mabylife/hyprtask
max_upload_size
id1924983
size111,625
Maby Wang (Mabylife)

documentation

https://github.com/Mabylife/hyprtask#readme

README

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

Download from Releases (Recommended)

Visit Releases to download the latest version

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!

Commit count: 0

cargo fmt