Skip to main content

A simple command-line todo application

Project description

๐Ÿ“ Todo CLI X

A command-line Todo application built in Python, designed as a progressive learning project.

Python Learning Project Status Version License Good First Issue

Todo CLI X


๐Ÿ‘‰๐Ÿพ See the project Roadmap

๐Ÿ“š Learning Objectives

  • Learn Python through hands-on practice
  • Apply a clear and professional project methodology
  • Deepen understanding of core concepts (modules, functions, data structures, etc.)
  • Get introduced to modern tools in the Python ecosystem:
    • uv for dependency management
    • pyproject.toml for project configuration
    • Unit testing
    • argparse for command-line interfaces
    • And other tools/modules...
  • GitHub Actions

๐Ÿš€ Project Status

  • โœ… Git repository initialized
  • โœ… Python environment managed with UV
  • โœ… Core logic implemented (add, list, complete, delete, clear)
  • โœ… Priority filtering and sorting
  • โœ… Fully tested with pytest
  • โœ… Continuous Integration (CI) set up
  • โœ… CLI welcome screen and helpful feedback
  • โœ… Task metadata: created and due dates
  • โœ… Enhanced list display with --verbose
  • โœ… Display of due date by default
  • โœ… Support for multi-ID delete
  • โœ… Tagging system for tasks (e.g. --tags work,urgent)
  • โœ… Filter tasks by tag(s) with --tags option

Quick Install (Recommended)

If you just want to use the todo CLI tool without cloning the repository, you can install it globally using pipx:

brew install pipx
pipx ensurepath
pipx install todo-cli-x

Once installed, run the CLI from anywhere in your terminal:

todo --help
todo add "Submit report" --priority high --due 2025-06-10
todo add "Refactor API" --priority high --due 2025-06-30 --tags dev,urgent
todo list
todo list --verbose
todo list --tags dev

To upgrade later:

pipx upgrade todo-cli-x

Local Development Setup

๐Ÿ“‚ Project Structure

todo-cli/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ todo_cli/                # Main application package
โ”‚       โ”œโ”€โ”€ __init__.py          # Marks the directory as a Python package
โ”‚       โ”œโ”€โ”€ core.py              # Business logic: add, delete, list, etc.
โ”‚       โ””โ”€โ”€ main.py              # CLI entry point (parses commands and calls core logic)
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ test_core.py             # Unit tests for core logic (add, list, complete, etc.)
โ”‚   โ””โ”€โ”€ test_utils.py            # Unit tests for utility functions (formatting, display, etc.)
โ”œโ”€โ”€ pyproject.toml               # Project configuration (metadata, dependencies, CLI script)
โ”œโ”€โ”€ uv.lock                      # Lock file generated by UV (resolved dependencies)
โ”œโ”€โ”€ README.md                    # Project documentation and usage instructions
โ”œโ”€โ”€ LICENSE                      # MIT license file
โ”œโ”€โ”€ .gitignore                   # Git ignored files and directories
โ””โ”€โ”€ .python-version              # Python version used for the virtual environment (3.11)

Clone the repository:

git clone https://github.com/vidjinnangni/todo-cli.git
cd todo-cli

Set up the environment using uv:

uv sync

(Optional) Activate the virtual environment manually:

(macOS and Linux)

source .venv/bin/activate

Task Storage

  • All tasks are stored in a local file named todo_data.json (automatically created when needed).
  • This file is excluded from version control (.gitignore) to avoid polluting the repository with user data.
  • You can see an example of the file format in examples/todo_data.example.json:
[
  {
    "id": 1,
    "text": "Buy milk",
    "done": false,
    "priority": "medium",
    "created": "2025-06-01T12:00:00+00:00",
    "due": "2025-06-15",
    "tags": ["shopping", "errands"]
  }
]

Usage

Run the CLI tool without activating the environment:

uv run todo add "Submit report" --priority high --due 2025-06-10
uv run todo add "Refactor API" --priority high --due 2025-06-30 --tags dev,urgent
uv run todo list
uv run todo list --verbose
uv run todo list --tags dev

command todo list

todo list command

command todo list --verbose

todo list verbose

Or activate the environment and use todo directly:

source .venv/bin/activate
todo add "Submit report" --priority high --due 2025-06-10
todo add "Refactor API" --priority high --due 2025-06-30 --tags dev,urgent
todo list --tags dev

๐Ÿ“š Learn how the CLI is implemented internally โ†’ CLI Architecture

Running Tests

First, install all dependencies:

uv sync --extra dev

Then run the tests:

uv run pytest

Or:

source .venv/bin/activate
pytest

โš–๏ธ License

This project is licensed under the MIT License. See the LICENSE file for more information.


๐Ÿ™Œ Contributions Welcome

Contributions are not only welcome โ€“ theyโ€™re encouraged! Whether youโ€™re a beginner looking to learn or an experienced developer with suggestions, ideas, or improvements, youโ€™re invited to participate.

Roadmap

Hereโ€™s how you can contribute:

  • ๐Ÿ› Report bugs โ€” Found something that doesnโ€™t work as expected? Open an issue!
  • โœจ Suggest features โ€” Got an idea to make the tool more useful? Share it in the discussions or issues.
  • ๐Ÿงน Improve the code โ€” Clean up logic, refactor modules, or enhance test coverage.
  • ๐Ÿ“ Enhance documentation โ€” Clear, friendly documentation helps everyone.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

todo_cli_x-1.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

todo_cli_x-1.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file todo_cli_x-1.1.0.tar.gz.

File metadata

  • Download URL: todo_cli_x-1.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for todo_cli_x-1.1.0.tar.gz
Algorithm Hash digest
SHA256 345bdb44943815359fc38d804971bb781aff9606e27c795e3e0338cb369810c0
MD5 68e74b1ee68b3b05d932685488b53a89
BLAKE2b-256 382ff5fb21248b14e91ebf70428f1c421dc5b4bb76a5301f02c8c3270836c11f

See more details on using hashes here.

File details

Details for the file todo_cli_x-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: todo_cli_x-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for todo_cli_x-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f3def9b2eb4fb5117420afa8bba41792e46ebabd25b291931d8d31cda678da0
MD5 90858a3b28c8c4fe4740d1a9b213232c
BLAKE2b-256 732a4715941fae973c4ca5ef782eb31bb22a1dd0c85e9b3362698a1ad5c374c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page