A simple and efficient command-line interface (CLI) tool for managing and tracking tasks, written in Rust. task-tracker-cli
allows you to add, update, delete, and list tasks directly from your terminal, with tasks stored persistently in a JSON file.
- Features
- Prerequisites
- Installation
- Usage
- Task Storage
- Built With
- Platform Support
- Contributing
- Running Tests
- License
- Credits
- Add Tasks: Quickly add new tasks with descriptions.
- Update Tasks: Modify existing tasks.
- Delete Tasks: Remove tasks when they're no longer needed.
- Task Status Management: Mark tasks as "In Progress," "Done," or restart them back to "Todo."
- Filter Tasks: View tasks based on their status.
- Persistent Storage: Tasks are saved in a JSON file for persistence.
- Rust: Install Rust if building from source.
- Terminal: A command-line interface to run the program.
Pre-built binaries are available for Windows, Linux, and macOS on the Releases page.
-
Download the binary:
- Go to the Releases page.
- Download the
task-tracker-cli-release.zip
file. - Extract the contents of the ZIP file.
-
Navigate to the download location in Command Prompt or PowerShell:
cd C:\Path\To\Extracted\Folder\task-tracker-cli-windows
-
Run the application directly:
task-tracker-cli.exe
You can now use the CLI by prefixing commands with
task-tracker-cli.exe
. For example:task-tracker-cli.exe add "Finish Rust project"
-
Download the binary:
- Go to the Releases page.
- Download the
task-tracker-cli-release.zip
file. - Extract the contents of the ZIP file.
-
Navigate to the download location in your terminal:
cd /path/to/extracted/folder/task-tracker-cli-linux
-
Make the binary executable:
chmod +x task-tracker-cli
-
Run the application directly:
./task-tracker-cli
You can now use the CLI by prefixing commands with
./task-tracker-cli
. For example:./task-tracker-cli add "Finish Rust project"
For convenience, you can add the binary to a directory that's in your system's PATH
, allowing you to run task-tracker-cli
from anywhere without specifying the path.
Windows:
-
Move the binary to a directory in your
PATH
:- Copy or move the
.exe
file toC:\Windows\System32
or any directory that's in yourPATH
. - Alternatively, add the directory containing
task-tracker-cli.exe
to yourPATH
environment variable.
- Copy or move the
-
Verify installation:
Open a new Command Prompt or PowerShell window and run:
task-tracker-cli --help
Linux and macOS:
-
Move the binary to
/usr/local/bin/
:sudo mv task-tracker-cli /usr/local/bin/task-tracker-cli
-
Verify installation:
Open a new terminal window and run:
task-tracker-cli --help
Clone the repository and navigate to the project directory:
git clone https://github.com/seabensea/task-tracker-cli.git
cd task-tracker-cli
Build the project in release mode:
cargo build --release
Run the project:
./target/release/task-tracker-cli
To use the CLI tool, run it with the following commands:
-
Add a new task
task-tracker-cli add "<description>"
-
Update an existing task
task-tracker-cli update <id> "<new_description>"
-
Delete a task
task-tracker-cli delete <id>
-
Mark a task as "In Progress"
task-tracker-cli mark-in-progress <id>
-
Mark a task as "Done"
task-tracker-cli mark-done <id>
-
Restart a task to "Todo" status
task-tracker-cli restart-task <id>
-
List tasks with optional filters
task-tracker-cli list [all | done | in-progress | not-done]
-
View help information
task-tracker-cli help
task-tracker-cli add "Finish Rust project"
Output:
Task added successfully with ID: 1
ID | Description | Status | Created At | Updated At
---------------------------------------------------------------------------------------------------------------
1 | Finish Rust project | Todo | 01-01-2023 01:23:45 | 01-01-2023 01:23:45
task-tracker-cli list all
Output:
ID | Description | Status | Created At | Updated At
---------------------------------------------------------------------------------------------------------------
1 | Finish Rust project | Todo | 01-01-2023 01:23:45 | 01-01-2023 01:23:45
task-tracker-cli update 1 "Finish Rust project with README"
Output:
Task with ID 1 updated successfully.
ID | Description | Status | Created At | Updated At
---------------------------------------------------------------------------------------------------------------
1 | Finish Rust project with README | Todo | 01-01-2023 01:23:45 | 01-01-2023 01:24:45
task-tracker-cli mark-done 1
Output:
Task with ID 1 marked as done.
ID | Description | Status | Created At | Updated At
---------------------------------------------------------------------------------------------------------------
1 | Finish Rust project with README | Done | 01-01-2023 01:23:45 | 01-01-2023 01:25:45
task-tracker-cli delete 1
Output:
Task with ID 1 deleted successfully.
No tasks found.
task-tracker-cli help
Output:
Usage: task-tracker-cli <command> [arguments]
Commands:
add <description> - Add a new task
update <id> <description> - Update a task
delete <id> - Delete a task
mark-in-progress <id> - Mark a task as in progress
mark-done <id> - Mark a task as done
restart-task <id> - Restart a task
list [all | done | in-progress | not-done] - List tasks
Tasks are stored in a tasks.json
file located in the current directory. Each task contains:
- ID: Unique identifier.
- Description: Details of the task.
- Status: Can be
Todo
,In Progress
, orDone
. - Created At: Timestamp when the task was created.
- Updated At: Timestamp of the last update to the task.
- Rust - The programming language used.
- Serde - For serialization and deserialization of data.
- Chrono - For date and time handling.
- Colored - For colored terminal output.
task-tracker-cli
supports the following operating systems:
- Linux
- macOS
- Windows
Contributions are welcome! Please follow these steps:
-
Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/seabensea/task-tracker-cli.git
-
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
-
Commit your changes with clear messages:
git commit -am "Add new feature"
-
Push to your fork:
git push origin feature/your-feature-name
-
Submit a pull request to the main repository.
Ensure your code is properly formatted and free of common issues:
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
To run the tests for this project, use the following command:
cargo test
This project is licensed under the MIT License.
This project is inspired by the Task Tracker challenge on roadmap.sh.