Metadata-Version: 2.4
Name: task-manager-tui-anil00024
Version: 1.0.0
Summary: Terminal-Based Personal Task Manager (CLI + TUI)
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: textual>=0.58.0

# Personal Task Manager (CLI + TUI)

A terminal application for managing daily tasks through a clean,
keyboard-driven Terminal User Interface. Built with Python and
[Textual](https://textual.textualize.io/), backed by SQLite for local,
persistent storage.

## Features

- Create, edit, delete, and complete tasks
- Priorities (Low / Medium / High) and due dates
- Categories for organizing tasks
- Live dashboard: pending, completed, overdue, and high-priority counts
- Search by title, category, status, or priority
- Filter by Pending / Completed / Overdue / High priority
- Fully keyboard-driven, mouse optional
- Local persistence via SQLite — data survives restarts
- Tested responsive with 5,000+ stored tasks

## Requirements

- Python 3.9+

## Installation

### Option 1 — install as a command (recommended)

```bash
git clone <this-repo-url>
cd task_manager
pip install -e .
```

This installs the `taskman` command onto your PATH.

```bash
taskman
```

### Option 2 — run without installing

```bash
pip install -r requirements.txt
python -m task_manager
```

## Where data is stored

By default, tasks are stored in a local SQLite database at:

```
~/.task_manager/tasks.db
```

This file is created automatically on first run. Data persists across
restarts. To use a different database file (e.g. for testing), pass a path
when constructing `TaskManagerApp(db_path=...)` in your own script.

## Usage

Launch the app, then use the keyboard shortcuts below. The dashboard shows
live stats at the top and your task list in a scrollable table underneath.

### Keyboard Shortcuts

| Key       | Action              |
|-----------|---------------------|
| `↑ / ↓`   | Navigate tasks      |
| `Enter`   | View / Edit task    |
| `a`       | Add task            |
| `e`       | Edit selected task  |
| `d`       | Delete selected task|
| `Space`   | Mark complete / pending |
| `/`       | Search              |
| `f`       | Filter              |
| `r`       | Refresh             |
| `?`       | Help                |
| `q`       | Quit                |

### Task fields

Each task has: Title, Description, Status (Pending/Completed), Priority
(Low/Medium/High), Category, Due Date, Created Date, and Updated Date. The
last four are managed automatically or via the Add/Edit form.

## Running the tests

```bash
pip install -r requirements-dev.txt
pytest tests/ -v
```

The test suite covers:
- `tests/test_db.py` — the SQLite persistence layer (CRUD, search, filters,
  stats, persistence across reconnects)
- `tests/test_app_smoke.py` — headless Textual UI smoke tests (screens open
  and close correctly, keyboard bindings work, add-task flow works end to
  end)

## Project layout

```
task_manager/
├── task_manager/
│   ├── __init__.py
│   ├── __main__.py      # `python -m task_manager` entry point
│   ├── app.py            # Textual TUI (screens, widgets, bindings)
│   └── db.py              # SQLite persistence layer
├── tests/
│   ├── test_db.py
│   └── test_app_smoke.py
├── docs/
│   ├── approach.md
│   ├── architecture.md
│   ├── tradeoffs.md
│   └── prompts.md
├── pyproject.toml
├── requirements.txt
├── requirements-dev.txt
└── README.md
```

## Architecture at a glance

- **`db.py`** owns all persistence. It exposes a `TaskDB` class with plain
  Python methods (`add_task`, `update_task`, `delete_task`, `list_tasks`,
  `get_stats`, ...) and knows nothing about the UI.
- **`app.py`** owns all presentation. It is a Textual `App` with one main
  `DashboardScreen` and several modal `Screen`s (add/edit form, confirm
  delete, search, filter, help). Screens talk to `TaskDB` directly and
  never touch SQL.

See `docs/architecture.md` for more detail and `docs/tradeoffs.md` for the
reasoning behind key decisions.
