# Hyprtask
A simple CLI tool for Google Tasks, built with Rust for fast and efficient task management from your terminal.
[](LICENSE)
## ✨ 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](https://github.com/yourusername/hyprtask/releases) to download the latest version
### Build from Source
Requires Rust 1.70 or newer:
```bash
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
```bash
hyprtask login
```
Your browser will open automatically for Google account authentication.
### 2. Manage Tasks
```bash
# List tasks
hyprtask li
# Add a task
hyprtask add "Buy milk"
# Complete a task
hyprtask done 1
```
That's it!
## 📖 Usage
### Authentication
```bash
hyprtask login # Login with Google account
hyprtask logout # Logout
```
### List Tasks
```bash
hyprtask li # List incomplete tasks
hyprtask li -d # List completed tasks
hyprtask li -a # List all tasks
```
### Add Tasks
```bash
hyprtask add "Task title"
```
### Complete Tasks
```bash
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
```bash
hyprtask --help # Show all commands
hyprtask <command> --help # Show help for specific command
```
## 📸 Examples
### List Tasks
```bash
$ hyprtask li
1. [ ] Buy milk
2. [ ] Finish report
3. [ ] Clean room
```
### Add Task
```bash
$ hyprtask add "Drink water"
"Drink water" has been added to your tasks, number 4.
```
### Complete Task
```bash
$ 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
```bash
# Build development version
cargo build
# Run tests
./test_comprehensive.sh
# Build release version
cargo build --release
```
### Testing
Run comprehensive integration tests:
```bash
./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](LICENSE) file for details
## 🙏 Acknowledgments
- [Google Tasks API](https://developers.google.com/tasks)
- Rust community and all dependency maintainers
---
**If this project helps you, please give it a ⭐ Star!**