Skip to content

AlexeiLuchian/task-tracker-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Task Tracker CLI

A simple command-line interface (CLI) application for tracking and managing your tasks. This project helps you keep track of what you need to do, what you're working on, and what you've completed.

Features

  • Add, update, and delete tasks
  • Mark tasks as in-progress or done
  • List all tasks or filter by status (todo, in-progress, done)
  • Automatic timestamps for task creation and updates
  • Persistent storage using JSON

Requirements

  • Python 3.x

Installation

  1. Clone this repository:
git clone https://github.com/AlexeiLuchian/task-tracker-cli.git
cd task-tracker-cli
  1. No additional dependencies required - uses Python standard library only!

Usage

Run the CLI using the following command format:

python task_cli.py <command> [arguments]

Commands

Add a new task

python task_cli.py add "Buy groceries"

Output: Task added successfully (ID: 1)

Update a task

python task_cli.py update 1 "Buy groceries and cook dinner"

Output: Task updated successfully (ID: 1)

Delete a task

python task_cli.py delete 1

Output: Task deleted successfully (ID: 1)

Mark a task as in-progress

python task_cli.py mark-in-progress 1

Output: Task status changed to 'in-progress' (ID: 1)

Mark a task as done

python task_cli.py mark-done 1

Output: Task status changed to 'done' (ID: 1)

List all tasks

python task_cli.py list

List tasks by status

python task_cli.py list done
python task_cli.py list todo
python task_cli.py list in-progress

Example Output

When listing tasks, you'll see output like this:

> ID:1
  description: Buy groceries
  status: todo
  created at: 2025-10-12 14:30:00
  last updated: 2025-10-12 14:30:00

> ID:2
  description: Write project documentation
  status: in-progress
  created at: 2025-10-12 15:00:00
  last updated: 2025-10-12 15:45:00

Data Storage

Tasks are stored in a tasks.json file in the same directory as the script. The file is created automatically when you add your first task.

JSON Structure

{
    "last_id": 2,
    "tasks": {
        "task1": {
            "id": 1,
            "description": "Buy groceries",
            "status": "todo",
            "createdAt": "2025-10-12 14:30:00",
            "updatedAt": "2025-10-12 14:30:00"
        },
        "task2": {
            "id": 2,
            "description": "Write documentation",
            "status": "in-progress",
            "createdAt": "2025-10-12 15:00:00",
            "updatedAt": "2025-10-12 15:45:00"
        }
    }
}

Project Structure

task-tracker-cli/
│
├── task_cli.py       # Main CLI application
├── tasks.json        # Task storage (created automatically)
└── README.md         # This file

Project URL

Project idea from: roadmap.sh Task Tracker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages