Task Tracker CLI is a command-line application built with Python and Typer to help you manage your tasks efficiently.
This project is part of the roadmap.sh Backend project beginner level.
- Add, Update, and Delete tasks
- Mark a task as in progress or done
- List all tasks
- List all tasks that are done
- List all tasks that are not done
- List all tasks that are in progress
-
Clone the repository:
## Cloning the repository git clone https://github.com/sikatikenmogne/task-tracker-cli.git cd task-tracker-cli
-
Create and activate a virtual environment:
## Creating and activating a virtual environment python3 -m venv venv . venv/bin/activate
-
Install the dependencies:
## Installing dependencies pip install -r requirements.txt -
Install the CLI application using pipx:
## Installing the CLI application using pipx pipx install .
Option 2: Using Docker
-
Clone the repository:
## Cloning the repository git clone https://github.com/sikatikenmogne/task-tracker-cli.git cd task-tracker-cli
-
Build the Docker image:
## Building the Docker image docker build -t task-cli-app .
-
Run the Docker container:
## Running the Docker container docker run --rm -it task-cli-app
You can also run specific commands within the Docker container. For example, to mark a task as in progress:
## Marking a task as in progress using Docker
docker run --rm -it task-cli-app mark-in-progress 1Option 3: Using Dev Container
-
Clone the repository:
## Cloning the repository git clone https://github.com/sikatikenmogne/task-tracker-cli.git cd task-tracker-cli
-
Open the project in Visual Studio Code.
-
When prompted, reopen the project in a dev container.
-
The dev container will automatically build and set up the environment.
You can now run the CLI commands within the dev container terminal. For example:
## Adding a new task in the dev container
task-cli add "Buy groceries"
## Output: Task added successfully (ID: 1)Here are some examples of how to use the Task Tracker CLI:
## Adding a new task
task-cli add "Buy groceries"
## Output: Task added successfully (ID: 1)
## Listing all tasks
task-cli list
## Listing tasks by status
task-cli list --status in-progress
## Marking a task as completed
task-cli complete 1
## Marking a task as in-progress
task-cli mark-in-progress 1
## Deleting a task
task-cli delete 1You can also run the Task Tracker CLI commands within a Docker container. Here are the Docker equivalents for the above commands:
## Adding a new task
docker run --rm -it task-cli-app add "Buy groceries"
## Output: Task added successfully (ID: 1)
## Listing all tasks
docker run --rm -it task-cli-app list
## Listing tasks by status
docker run --rm -it task-cli-app list --status in-progress
## Marking a task as completed
docker run --rm -it task-cli-app complete 1
## Marking a task as in-progress
docker run --rm -it task-cli-app mark-in-progress 1
## Deleting a task
docker run --rm -it task-cli-app delete 1To contribute to this project, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
- https://packaging.python.org/en/latest/guides/creating-command-line-tools/
- https://clig.dev/
- https://github.com/fastapi/typer
- https://packaging.python.org/en/latest/guides/installing-stand-alone-command-line-tools/#installing-stand-alone-command-line-tools
- https://www.geeksforgeeks.org/file-handling-python/
- https://stackoverflow.com/questions/12309269/how-do-i-write-json-data-to-a-file
- https://blogboard.io/blog/knowledge/how-to-write-a-list-to-a-file-in-python/
- https://docs.python.org/3/library/json.html#module-json
- https://roadmap.sh/projects/task-tracker