A basic command-line task management application built with Rust. This tool allows users to add, list, mark as complete, and delete tasks, making it easier to manage daily tasks from the terminal.
Created as a simple practice project.
- Add Task: Create a new task with a description and due date.
- List Tasks: Display all tasks with their status (pending or completed).
- Complete Task: Mark a task as completed.
- Delete Task: Remove a task from the list.
- Persistent Storage: Tasks are saved in a JSON file (
tasks.json) and loaded each time the program runs.
A basic understanding of Rust is preferential, but not required.
- Rust (latest stable version recommended)
-
Clone the repository:
git clone https://github.com/yourusername/task-manager.git cd task-manager -
Install dependencies: The project uses
clapfor command-line argument parsing andserdefor JSON handling. Rust's package manager, Cargo, will automatically install these dependencies when you build or run the project. -
Build the project:
cargo build --release
You can run the Task Manager directly from the command line using:
cargo run -- [command] [arguments]Add a new task with a description and due date:
cargo run -- add "Task description" "YYYY-MM-DD"Example:
cargo run -- add "Finish Rust CLI project" "2024-11-01"List all tasks, showing their index, description, due date, and completion status:
cargo run -- listMark a task as completed by specifying its index:
cargo run -- complete [index]Example:
cargo run -- complete 0Delete a task by specifying its index:
cargo run -- delete [index]Example:
cargo run -- delete 0All tasks are saved in a file called tasks.json in the project's root directory. The file is updated each time a task is added, marked as complete, or deleted, providing persistent storage between program runs.
- Add a task:
cargo run -- add "Submit project report" "2024-11-05"
- List tasks:
cargo run -- list
- Complete a task:
cargo run -- complete 0 - Delete a task:
cargo run -- delete 0
- Automatically add timestamps to tasks.
- Allow users to edit tasks.
- Allow ability to priotize tasks (e.g., high, medium, low).
- Allow users to set reminders for tasks.
- Allow users to set recurring tasks (e.g., daily, weekly, monthly).
- Allow users to set task categories (e.g., work, personal, health).
tasks.json is defaulted to be ignored by Git for security purposes (In case you don't want tasks being made public). If you want to add tasks to the repository, you will need to remove the .gitignore file and commit the changes.