A command-line task management application built in Ruby that helps you manage tasks and track time spent on each task.
- Create and manage tasks
- Add tags to tasks
- Mark tasks as complete
- Delete tasks
- Track time spent on tasks
- Start/stop time tracking
- Multiple time entries per task
- Total time tracking
- Visual indicator for active timing
- Time reporting
- Daily summary of time entries
- Total time per day
- Chronological listing of all activities
- Flexible storage options
- Local tasks per project/directory
- Global tasks accessible from anywhere
- Persistent storage using JSON
- Simple command-line interface
-
Ensure you have Ruby installed on your system
-
Clone this repository:
git clone https://github.com/webmatze/task_manager.git cd task_manager -
Make the script executable:
chmod +x task_manager.rb
-
Create a symbolic link to make it available system-wide:
sudo ln -s "$(pwd)/task_manager.rb" /usr/local/bin/task_manager
Now you can use the task_manager command from anywhere in your terminal!
The following commands are available:
task_manager add "task description"- Add a new tasktask_manager list- Show all taskstask_manager show <task id>- Show detailed task informationtask_manager complete <task id>- Mark a task as completetask_manager delete <task id>- Remove a tasktask_manager start <task id>- Start timing a tasktask_manager stop <task id>- Stop timing a tasktask_manager help- Display available commandstask_manager report- Show daily time report
The task manager supports two storage modes:
-
Local Tasks (default)
- Stored in
tasks.jsonin the current directory - Perfect for project-specific tasks
- Can be committed to version control
- Different task lists for different projects
- Stored in
-
Global Tasks
- Stored in
~/.task_manager/tasks.json - Accessible from any directory
- Perfect for personal tasks
- Single task list across all locations
- Stored in
Use the --global flag with any command to access global tasks:
# Local task examples task_manager add "Project specific task" task_manager list # Global task examples task_manager --global add "Call dentist" task_manager --global list
$ task_manager add "Write documentation" New Task added: Write documentation $ task_manager list Tasks: 1. [ ] Write documentation - Total time: 0h 0m $ task_manager start 1 Started time tracking for task 1 $ task_manager stop 1 Stopped time tracking for task 1. Duration: 0h 5m $ task_manager show 1 Task 1: [ ] Write documentation Total time: 0h 5m Time entries: 1. 2023年05月20日 14:30 to 2023年05月20日 14:35 (0h 5m) $ task_manager complete 1 Task 1 marked as complete! $ task_manager list Tasks: 1. [✓] Write documentation - Total time: 0h 5m
The task manager can generate detailed daily reports of all time entries:
$ task_manager report Time Report: ------------ Monday, May 22, 2023: Total: 2h 15m [1] Write documentation 09:00 - 10:30 (1h 30m) [2] Review code 14:00 - 14:45 (0h 45m) Sunday, May 21, 2023: Total: 1h 45m [1] Write documentation 13:00 - 14:45 (1h 45m)
Reports show:
- Daily summaries with total time
- Individual task entries with start and end times
- Task IDs for easy reference
- Chronological ordering (most recent first)
Like other commands, you can use --global to see reports for your global tasks:
task_manager --global report
Tasks are automatically saved to one of two locations:
- Local tasks:
tasks.jsonin the current directory - Global tasks:
~/.task_manager/tasks.jsonin your home directory
The storage location is determined by the presence of the --global flag when running commands.
Local storage is perfect for project-specific tasks that you might want to commit to version control,
while global storage is ideal for personal tasks that you want to access from anywhere.
- Ruby (version 2.0 or higher)
- JSON gem (included in Ruby standard library)
This project is licensed under the MIT License - see the LICENSE file for details.