trackgoal-0.1.0 is not a library.
TrackGoal 🎯
A powerful command-line goal tracking and time management tool built with Rust. Track your goals, manage deadlines, and sync with Google Calendar.
✨ Features
- Goal Management: Add, edit, delete, and track goals with categories and deadlines
- Time Tracking: Automatic time tracking for each goal with live timer display
- Smart Deadlines: Visual indicators for overdue, today's, and upcoming deadlines
- Google Calendar Sync: Two-way sync between local goals and Google Calendar
- Clean Interface: Beautiful colored terminal output with aligned tables
- ID Reuse: Automatically reuses deleted goal IDs to keep numbering compact
🚀 Quick Start
Installation
# Clone the repository
# Build and install
# Or install directly from crates.io (when published)
Basic Usage
# Add a new goal (defaults to +24 hours deadline)
# Add a goal with specific deadline
# Add a goal with category and deadline
# View all goals
# Mark a goal as completed
# Edit a goal
# Delete a goal
📋 Commands Reference
Goal Management
| Command | Description | Example |
|---|---|---|
add |
Add a new goal | trackgoal add "Task name" -c "Category" -d "25-12-2026 17:00" |
show |
Display all goals with status | trackgoal show |
edit |
Edit goal title | trackgoal edit 3 "New title" |
done |
Mark goal as completed | trackgoal done 2 |
delete |
Delete a goal | trackgoal delete 1 |
Time Tracking
| Command | Description | Example |
|---|---|---|
start |
Start timer for a goal | trackgoal start 3 |
stop |
Stop current timer | trackgoal stop |
stat |
Show current timer status | trackgoal stat |
Calendar Integration
| Command | Description | Example |
|---|---|---|
calendar add |
Add goals to Google Calendar | trackgoal calendar add 1 2 3 |
calendar update |
Update existing calendar events | trackgoal calendar update 1 2 |
calendar show |
Show calendar events | trackgoal calendar show |
calendar auth |
Authenticate with Google | trackgoal calendar auth |
📅 Date Formats
TrackGoal supports multiple date formats:
DD-MM-YYYY HH:MM(e.g.,25-12-2026 17:00)YYYY-MM-DD HH:MM(e.g.,2026-12-25 17:00)DD-MM-YYYY(defaults to 23:59)
🎨 Status Indicators
Goals are color-coded for quick status identification:
- 🔴 Overdue: Red background with
!indicator - 🟡 Today: Yellow deadline for tasks due today
- 🟢 Upcoming: Green for future deadlines
- ✅ Completed: Shows completion time
🔧 Google Calendar Setup
-
Get Google Cloud Credentials:
- Go to Google Cloud Console
- Create a new project
- Enable Google Calendar API
- Create OAuth 2.0 credentials
- Set redirect URI to
http://localhost:8080
-
Set Environment Variables:
-
Authenticate:
-
Sync Goals:
# Add specific goals to calendar # Update existing calendar events
📊 Understanding the Output
Goal Table
================================================================
YOUR GOALS (3 total)
# Title Category Deadline Status Timer
--------------------------------------------------------------
1 Project X Work TODAY 17:00 PENDING 02:15:30
2 Learn Rust Learning 25-12 18:00 PENDING 00:45:12
3 Exercise Health - PENDING 01:23:45
--------------------------------------------------------------
Summary: 3 pending | 0 completed | 0 overdue
================================================================
Columns:
#: Goal ID (reuses deleted IDs)Title: Goal name (truncated if too long)Category: Optional categoryDeadline: Due date with color codingStatus: Current status (PENDING/DONE/OVERDUE)Timer: Accumulated time for this goal
🏗️ Development
Building from Source
# Clone repository
# Install dependencies
# Run tests
# Install locally
Project Structure
trackgoal/
├── src/
│ ├── commands/ # Command implementations
│ │ ├── goal.rs # Goal management
│ │ ├── track.rs # Time tracking
│ │ └── calendar.rs # Calendar integration
│ ├── models/ # Data models
│ ├── db.rs # Database operations
│ ├── cli.rs # Command-line interface
│ └── main.rs # Entry point
├── Cargo.toml
└── README.md
Database
TrackGoal uses SQLite for local storage:
- Database location:
~/Library/Application Support/com.trackgoal.trackgoal/data.db(macOS) - Automatic ID reuse for deleted goals
- Migrations handled automatically
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
cargo test - Submit a pull request
🆘 Troubleshooting
Common Issues
Google Calendar Authentication Fails:
- Verify environment variables are set
- Check redirect URI matches Google Cloud Console
- Ensure Calendar API is enabled
Database Errors:
- Clear database:
rm -rf "~/Library/Application Support/com.trackgoal.trackgoal" - Restart application
Build Issues:
- Update Rust:
rustup update - Clean build:
cargo clean && cargo build
Getting Help
# Show general help
# Show command-specific help
🎯 Tips & Tricks
- Use Categories: Organize goals by work, personal, learning, etc.
- Set Realistic Deadlines: Default is +24 hours if not specified
- Regular Reviews: Use
trackgoal showto monitor progress - Calendar Sync: Keep Google Calendar updated for mobile access
- Time Tracking: Start/stop timers to track actual time spent
TrackGoal - Built with ❤️ in Rust for productive goal tracking!