⏱️ A command-line time tracking application with automated process detection and comprehensive reporting.
- ⚡ Simple CLI - Track time with intuitive commands
- 📊 Rich Reports - Generate detailed summaries and timelines
- 🎨 Beautiful Output - Colored terminal output with tables and panels
- 💾 CSV Storage - Human-readable data format with automatic backups
- 🔒 Atomic Operations - File locking ensures data integrity
- 🏷️ Tags & Categories - Organize tasks with projects, categories, and tags
- 📅 Flexible Filtering - Filter by date, project, category
- 📈 Analytics - Track productivity with active/idle time ratios
- 🤖 Process Detection - Automatic task tracking based on active applications
- ⏸️ Idle Detection - Automatically detect and track idle time
- 🔔 Desktop Notifications - Stay informed with system notifications
- ⚙️ Smart Automation - Rule-based task matching and auto-switching
- 🔧 Configuration System - YAML-based configuration with validation
- 📤 Export/Import - Multiple formats (JSON, Excel, iCal, Markdown)
- 🔄 Background Daemon - Cross-platform background service (systemd, launchd, Windows Service)
git clone https://github.com/yourusername/time-audit.git
cd time-audit
pip install -e .- Python 3.9 or higher
- Dependencies (installed automatically):
- click >= 8.0.0
- pandas >= 2.0.0
- rich >= 13.0.0
- psutil >= 5.9.0
- python-dateutil >= 2.8.0
- pyyaml >= 6.0.0
# Start tracking a task
time-audit start "Writing documentation" -p time-audit -c development
# Check current status
time-audit status
# Stop tracking
time-audit stop
# View recent entries
time-audit log
# Generate a weekly summary
time-audit report summary --period weekStart tracking:
time-audit start "Task name" [OPTIONS]
Options:
-p, --project TEXT Project identifier
-c, --category TEXT Category identifier
-t, --tags TEXT Comma-separated tags
-n, --notes TEXT Additional notes
Examples:
time-audit start "Writing tests" -p my-project -c development
time-audit start "Team meeting" -c meetings -t standup,planningStop tracking:
time-audit stop [OPTIONS]
Options:
-n, --notes TEXT Add notes to the completed entry
Examples:
time-audit stop
time-audit stop -n "Completed all unit tests"Switch tasks:
time-audit switch "New task" [OPTIONS]
# Automatically stops current task and starts new one
time-audit switch "Code review" -p my-projectCheck status:
time-audit status [-v]
# Show current tracking status
time-audit status
# Show detailed information
time-audit status -vList recent entries:
time-audit log [OPTIONS]
Options:
-n, --count INTEGER Number of entries to show (default: 10)
-d, --date TEXT Filter by date (YYYY-MM-DD, 'today', 'yesterday')
-p, --project TEXT Filter by project
-c, --category TEXT Filter by category
--json Output as JSON
Examples:
time-audit log
time-audit log -n 20
time-audit log -d today
time-audit log -p my-project
time-audit log --json > export.jsonAdd a past entry:
time-audit add "Task name" --start TIME --end TIME [OPTIONS]
Time formats:
- HH:MM (assumes today)
- YYYY-MM-DD HH:MM (full datetime)
Examples:
time-audit add "Morning meeting" --start "09:00" --end "09:30"
time-audit add "Client call" --start "2025-11-16 14:00" --end "2025-11-16 15:30"
time-audit add "Lunch break" --start "12:00" --end "13:00" -c breakSummary report:
time-audit report summary [OPTIONS]
Options:
--period TEXT Time period (today, yesterday, week, month)
--from DATE Start date (YYYY-MM-DD)
--to DATE End date (YYYY-MM-DD)
-p, --project TEXT Filter by project
-c, --category TEXT Filter by category
Examples:
time-audit report summary --period week
time-audit report summary --period month
time-audit report summary --from 2025-11-01 --to 2025-11-30
time-audit report summary -p my-projectSummary includes:
- Total time, active time, idle time
- Active ratio percentage
- Time breakdown by project (with visual bars)
- Time breakdown by category (with visual bars)
- Top 10 tasks by duration
Timeline report:
time-audit report timeline [OPTIONS]
# Shows chronological view of tasks for a day
time-audit report timeline --period today
time-audit report timeline --period yesterday
time-audit report timeline --from 2025-11-16Cancel current session:
time-audit cancel
# Discards the current tracking session without savingTime Audit stores data in CSV format in ~/.time-audit/data/:
entries.csv- Time tracking entriesprojects.csv- Project definitionscategories.csv- Category definitions
~/.time-audit/
├── data/
│ ├── entries.csv
│ ├── projects.csv
│ └── categories.csv
├── state/
│ └── current.json
├── backups/
│ └── (automatic backups)
└── logs/
└── app.log
time-audit --data-dir /path/to/data start "Task name"time-audit [OPTIONS] COMMAND
Options:
--version Show version
--data-dir PATH Custom data directory
--no-color Disable colored output
--help Show help message# Morning
time-audit start "Check emails" -c communication
time-audit stop
# Start main work
time-audit start "Feature development" -p webapp -c development -t backend,api
# Break for meeting
time-audit switch "Team standup" -c meetings -t daily
# Back to work
time-audit switch "Feature development" -p webapp -c development
# End of day - view summary
time-audit stop
time-audit report summary --period today# View this week's summary
time-audit report summary --period week
# View timeline for a specific day
time-audit report timeline --from 2025-11-16
# Export data for analysis
time-audit log -n 1000 --json > weekly-data.json# Start tracking a project task
time-audit start "Implement login" -p webapp -c development -t auth,backend
# View all time spent on project
time-audit log -p webapp
# Get project report
time-audit report summary -p webapp --period month╭─── Currently Tracking ────────────────────────────╮
│ Feature development │
│ │
│ Started: 2025-11-16 09:30:00 │
│ Duration: 1h 23m │
│ Project: webapp │
│ Category: development │
│ Tags: backend, api │
╰────────────────────────────────────────────────────╯
Time Audit - This Week
Total Time: 32h 15m
Active Time: 30h 45m
Idle Time: 1h 30m
Entries: 47
Unique Tasks: 23
Active Ratio: 95.4%
Time by Project
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ Project ┃ Duration ┃ % Total ┃ Bar ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ webapp │ 24h 30m │ 76.0% │ ███████████████░░░ │
│ time-audit │ 5h 45m │ 17.8% │ ███░░░░░░░░░░░░░░░ │
│ meetings │ 2h 0m │ 6.2% │ █░░░░░░░░░░░░░░░░░ │
└──────────────────┴──────────┴─────────┴────────────────────┘
time-audit/
├── src/
│ └── time_audit/
│ ├── core/ # Core functionality
│ │ ├── models.py # Data models
│ │ ├── storage.py # CSV storage
│ │ └── tracker.py # Time tracking
│ ├── cli/ # Command-line interface
│ │ └── main.py # CLI commands
│ └── analysis/ # Reports and analytics
│ └── reports.py # Report generation
├── tests/ # Unit tests
├── pyproject.toml # Project metadata
└── requirements.txt # Dependencies
# Install development dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run tests with coverage
pytest --cov=time_audit --cov-report=term-missing
# Run specific test modules
pytest tests/test_models.py
pytest tests/test_cli.py
# Run with verbose output
pytest -vTest Coverage:
- 77 tests across 4 test modules
- 86% overall code coverage
- Models: 99%
- Tracker: 95%
- Storage: 89%
- Reports: 85%
- CLI: 77%
CI/CD:
- Automated testing on every push/PR
- Multi-OS: Linux, macOS, Windows
- Multi-Python: 3.9, 3.10, 3.11, 3.12
- Code quality checks (black, ruff, mypy)
- Coverage reporting via Codecov
See DESIGN.md for the complete architectural design and future plans.
- ✅ Core time tracking (start, stop, switch)
- ✅ CSV storage with atomic operations
- ✅ Basic CLI commands
- ✅ Summary and timeline reports
- ✅ Filtering and manual entries
- ✅ Comprehensive test suite (77 tests, 86% coverage)
- ✅ CI/CD pipeline (GitHub Actions)
See PHASE2_PLAN.md for detailed implementation plan.
- ✅ Process detection (automatic task tracking)
- ✅ Idle time detection
- ✅ Desktop notifications
- ✅ Configuration system (YAML-based)
- ✅ Rule-based automation engine
- ✅ Export/import (JSON, Excel, iCal, Markdown)
- ✅ Background daemon (Linux systemd, macOS launchd, Windows Service)
- ✅ IPC communication (Unix sockets, Windows named pipes)
- ✅ Daemon state management
- ✅ Platform-specific service installation
- 🔲 REST API
- 🔲 Goal tracking
- 🔲 Invoice generation
- 🔲 Batch operations
- 🔲 Templates
- 🔲 Web dashboard
- 🔲 Interactive TUI mode
- 🔲 Pomodoro timer
- 🔲 Git integration
- 🔲 Advanced analytics
- 🔲 Machine learning insights
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
See CHANGELOG.md for version history.
Time Audit Contributors
Built with: