A powerful command-line goal tracking and time management tool built with Rust. Track your goals, manage deadlines, and sync with Google Calendar.
- 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
# Clone the repository
git clone https://github.com/NishantCoder108/trackgoal
cd trackgoal
# Build and install
cargo build --release
cargo install --path .
# Or install directly
cargo install trackgoal# Add a new goal (defaults to +24 hours deadline)
trackgoal add "Complete project documentation"
# Add a goal with specific deadline
trackgoal add "Submit proposal" -d "25-12-2026 17:00"
# Add a goal with category and deadline
trackgoal add "Learn Rust" -c "Learning" -d "30-12-2026 18:00"
# View all goals
trackgoal show
# Mark a goal as completed
trackgoal done 3
# Edit a goal
trackgoal edit 1 "Updated goal title"
# Delete a goal
trackgoal delete 2| 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 |
| 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 |
| 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 |
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)
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
-
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:
export GOOGLE_CLIENT_ID="your-client-id" export GOOGLE_CLIENT_SECRET="your-client-secret"
-
Authenticate:
trackgoal calendar auth
-
Sync Goals:
# Add specific goals to calendar trackgoal calendar add 1 2 3 # Update existing calendar events trackgoal calendar update 1 2
================================================================
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
# Clone repository
git clone <repository-url>
cd trackgoal
# Install dependencies
cargo build
# Run tests
cargo test
# Install locally
cargo install --path .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
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
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
cargo test - Submit a pull request
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
# Show general help
trackgoal --help
# Show command-specific help
trackgoal add --help
trackgoal calendar --help- 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 by Nishant with β€οΈ in Rust for productive goal tracking!