TaskLedger
TaskLedger is a command-line interface (CLI) tool for tracking work and generating reports from a YAML log file. It helps you maintain a structured log of your daily tasks, calculate hours worked, and generate progress reports in both human-readable text and formatted HTML.
Disclaimer: AI-Assisted Development
This project heavily utilizes artificial intelligence for code generation. While AI has been a powerful tool in the development process, it's important to understand the following:
- No Guarantees: The code is provided on an "as-is" basis. There is no guarantee that it is free of bugs, security vulnerabilities, or other issues.
- Use with Caution: You are solely responsible for any outcomes that result from using this code. Always review and test the code thoroughly before implementing it in a production environment.
- AI Is Not Perfect: The AI may have generated code that is suboptimal or contains inaccuracies.
By using the code in this repository, you acknowledge and agree to these terms.
Features
- Log daily work entries, including tasks, status, and blockers.
- Calculate total hours worked for any given day or date range.
- Generate human-readable reports with emoji sections:
- 🦀 Thing I've been working on - Completed tasks grouped by Jira ticket
- :starfleet: Thing I plan on working on next - In-progress tasks without blockers
- :facepalm: Thing that is blocking me - Tasks with blockers that need attention
- JIRA Integration:
- Automatic conversion of JIRA ticket references to clickable links
- Fetch and display JIRA ticket summaries (when
JIRA_PAT is configured)
- Support for both ticket IDs and full JIRA URLs
- HTML Output Options:
- Export reports as formatted HTML files
- Automatically open HTML reports in default browser
- Copy HTML to system clipboard (when clipboard tools are available)
- Display HTML source in terminal
- Support for GitHub PR tracking and upnext descriptions
- Simple and extensible command structure powered by Cobra
- Structured logging with
slog for easy integration with other tools
Installation & Setup
-
Clone the repository:
git clone [https://github.com/your-username/taskledger.git](https://github.com/your-username/taskledger.git)
cd taskledger
-
Initialize Go Module (if not already done):
go mod init [github.com/your-username/taskledger](https://github.com/your-username/taskledger)
go mod tidy
-
Build the binary:
Use the provided Makefile to build the application.
make build
This will create an executable at ./bin/taskledger.
The worklog.yml File
TaskLedger reads from a worklog.yml file in the project root by default. You can create this file and structure it as follows:
# A log of work, organized by date.
# Each date is a top-level key in "YYYY-MM-DD" format.
"2024-07-26":
work_log:
- start_time: "09:05"
end_time: "12:15"
- start_time: "13:00"
end_time: "17:30"
tasks:
- jira_ticket: "PROJ-1234"
description: "Implemented a new OAuth 2.0 authentication flow for user login. This included front-end and back-end changes."
status: "completed" # Can be: not started, in progress, completed
qc_goal: "Q1-2024-Strategic-5" # Optional: for tracking quarterly goals
github_pr: "https://github.com/example/repo/pull/123"
upnext_description: ""
blocker: "" # Leave empty if not blocked
# Alternative: Use descriptions array for multiple updates on same ticket
- jira_ticket: "PROJ-2000"
descriptions:
- "Morning: Reviewed architecture and identified performance issues"
- "Afternoon: Implemented caching layer for database queries"
- "Evening: Verified 40% improvement in response times"
status: "completed"
github_pr: "https://github.com/example/repo/pull/456"
upnext_description: ""
blocker: ""
"2024-07-27":
work_log:
- start_time: "09:00"
end_time: "17:00"
tasks:
- jira_ticket: "PROJ-5678"
description: "Investigating a bug where the quarterly report fails to generate for large datasets. The issue seems to be a memory leak."
status: "in progress"
github_pr: ""
upnext_description: "Continue debugging the memory leak issue"
blocker: "Waiting for access to the production database logs to replicate the issue."
JIRA Integration
TaskLedger can automatically convert JIRA ticket references into clickable links and fetch ticket summaries from the Red Hat JIRA instance.
Slack Integration
TaskLedger's HTML output is specifically optimized for Slack compatibility: