A simple and efficient command-line task manager developed in Rust. It allows you to add, list, and mark tasks as completed, storing them in a JSON file.
The To-Do CLI is a command-line application developed to help users manage their tasks in a simple and quick manner. With intuitive commands, you can add new tasks, view all registered tasks, and mark tasks as completed.
- Add Tasks: Create new tasks with a descriptive title.
- List Tasks: Display all existing tasks with their status.
- Mark as Completed: Update the status of a task to completed.
- Rust: A high-performance and secure programming language.
- Clap: A library for creating command-line interfaces.
- Serde: A library for serializing and deserializing data.
- Chrono: A library for date and time manipulation.
- Rust: Ensure that Rust is installed on your system. You can install Rust through rustup.
-
Clone the Repository
git clone https://github.com/your-username/to-do-cli.git cd to-do-cli -
Build the Project
cargo build --release
The executable will be generated in
target/release/to-do-cli. -
Install Globally (Optional)
To install the application globally on your system:
cargo install --path .After installation, you can run the
to-do-clicommand from anywhere.
After installation, you can use the following commands:
Adds a new task with the specified title.
cargo run -- add "Buy groceries"Displays all existing tasks.
cargo run -- listExample output:
[ ] 1 - Buy groceries (Created on: 25/04/2024 14:30)
[X] 2 - Read a book (Created on: 24/04/2024 10:15)Marks a task as completed by its ID.
cargo run -- done 1to-do-cli/
├── Cargo.toml
├── README.md
└── src
├── armazenamento.rs
├── main.rs
└── tarefa.rsarmazenamento.rs: Handles the storage and retrieval of tasks from a JSON file.main.rs: Contains the main logic for command-line interface and task management.tarefa.rs: Defines theTarefastruct and related functions.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.