A utt plugin that shows projects sorted by time spent.
This plugin provides a quick overview of how your time is distributed across different projects. It groups all activities by project and displays them sorted by total duration, giving you instant visibility into where your time is going.
Key features:
- π Project Breakdown β See all projects sorted by time spent (highest to lowest)
- π Percentage View β Optionally show percentage of total time for each project
- β±οΈ Current Activity β Shows your current activity and includes it in totals
- π Flexible Date Ranges β Report by day, week, month, or custom date ranges
- π Project-Based View - Activities grouped by project, sorted by duration
- π’ Optional Percentages - Add
--show-percto see time distribution percentages - π
Date Range Support - Use
--from,--to,--week, or--monthflags - π Native
uttIntegration - Usesutt's plugin API for seamless integration
First, install utt (Ultimate Time Tracker):
pip install uttVerify the installation:
utt --versionInstall the plugin:
pip install utt-project-summaryThat's it! The plugin is automatically discovered by utt. No additional configuration needed.
Confirm the project-summary command is available:
utt project-summary --helpRequirements:
- Python 3.10+
utt>= 1.0
After installation, a new project-summary command is available in utt:
utt project-summaryProject Summary
---------------
backend : 4h30
frontend: 2h15
meetings: 1h45
docs : 0h30
Total : 9h00
utt project-summary --show-percProject Summary
---------------
backend : 4h30 ( 50.0%)
frontend: 2h15 ( 25.0%)
meetings: 1h45 ( 19.4%)
docs : 0h30 ( 5.6%)
Total : 9h00 (100.0%)
| Option | Default | Description |
|---|---|---|
--show-perc |
false | Show percentage of total time for each project |
--from |
none | Inclusive start date for the report |
--to |
none | Inclusive end date for the report |
--week |
none | Report for a specific week (this, prev, or week number) |
--month |
none | Report for a specific month (this, prev, 2024-10, Oct) |
--project |
none | Filter to show only a specific project |
--current-activity |
-- Current Activity -- |
Set the current activity name |
--no-current-activity |
false | Do not display the current activity |
Default usage (today's activities):
utt project-summaryShow with percentages:
utt project-summary --show-percThis week's summary:
utt project-summary --week thisLast month's summary:
utt project-summary --month prevCustom date range:
utt project-summary --from 2024-01-01 --to 2024-01-31This plugin uses utt's native plugin API to:
- Access your time entries directly (no subprocess calls)
- Filter activities based on date range arguments
- Group activities by project name
- Sort projects by total duration (descending)
- Optionally calculate percentages of total time
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
To run the test suite, first install the development dependencies:
pip install -e ".[dev]"Then run the tests with pytest:
pytestFor coverage reporting:
pytest --cov=utt_project_summary --cov-report=term-missingRun ruff (linter, formatter, and import sorting):
# Check for linting errors
ruff check .
# Auto-fix linting errors (including import sorting)
ruff check --fix .
# Format code
ruff format .Run ty (type checker):
ty check src/ruff check --fix . && ruff format . && ty check src/ && pytestInstall pre-commit hooks to automatically run checks before each commit:
pre-commit installRun hooks manually on all files:
pre-commit run --all-filesContributions are welcome! Here's how to get started:
-
Clone the repository:
git clone https://github.com/loganthomas/utt-project-summary.git cd utt-project-summary -
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install in editable mode with dev dependencies:
pip install -e ".[dev]" -
Install pre-commit hooks:
pre-commit install
- Create a new branch for your feature or fix
- Make your changes following the code style guidelines
- Ensure all tests pass:
pytest - Ensure code passes linting:
ruff check . && ruff format --check . - Submit a pull request with a clear description of your changes
- Follow PEP 8 conventions
- Use type hints for all function signatures
- Write docstrings in NumPy style
- Keep functions focused and single-purpose
- Prefer explicit over implicit
utt(Ultimate Time Tracker) - The time tracking tool this plugin extendsuttPlugin Documentation - How to createuttpluginsutt-balance- Anotheruttplugin for checking work-life balance