| Crates.io | rstodo |
| lib.rs | rstodo |
| version | 0.1.0 |
| created_at | 2025-09-02 20:57:42.042282+00 |
| updated_at | 2025-09-02 20:57:42.042282+00 |
| description | A simple command-line todo application |
| homepage | https://github.com/yourusername/todo-cli |
| repository | https://github.com/yourusername/todo-cli |
| max_upload_size | |
| id | 1821623 |
| size | 16,506 |
A simple command-line todo application written in Rust. Manage your tasks efficiently from the terminal with persistent storage.
Make sure you have Rust installed on your system. If not, install it from rustup.rs.
# Verify Rust installation
rustc --version
cargo --version
Clone the repository:
git clone <your-repository-url>
cd todo-cli
Build the project:
cargo build --release
Run the application:
# Run directly with cargo
cargo run -- <command>
# Or use the compiled binary
./target/release/todo-cli <command>
# copy the binary into the PATH
# Best method on LINUX/MacOS
sudo cp target/release/todo-cli /usr/local/bin/todo-cli
todo-cli add "Buy groceries"
todo-cli add "Complete Rust project"
todo-cli add "Call mom"
todo-cli list
Output example:
0: Buy groceries
1: Complete Rust project
2: Call mom
# Remove task with ID 1
todo-cli remove 1
todo-cli --help
# Add some tasks
$ todo-cli add "Learn Rust"
Task added.
$ todo-cli add "Build a CLI app"
Task added.
$ todo-cli add "Deploy to production"
Task added.
# List all tasks
$ todo-cli list
0: Learn Rust
1: Build a CLI app
2: Deploy to production
# Remove completed task
$ todo-cli remove 0
Task removed.
# Check remaining tasks
$ todo-cli list
0: Build a CLI app
1: Deploy to production
Tasks are automatically saved to todos.json in the current working directory. The file is created automatically when you add your first task.
Example todos.json structure:
{
"todos": [
"Build a CLI app",
"Deploy to production"
]
}
todo-cli/
├── src/
│ └── main.rs # Main application logic
├── Cargo.toml # Project dependencies and metadata
├── Cargo.lock # Dependency lock file
├── todos.json # Task storage (created at runtime)
├── .gitignore # Git ignore rules
└── README.md # This file
clap - Command line argument parsing
serde - Serialization/deserialization
serde_json - JSON support
cargo build --release
Fork the repository
Create a feature branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'Add some amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request