Metadata-Version: 2.4
Name: ms-todo
Version: 0.1.1
Summary: Simple CLI tool to integrate with Microsoft To Do, allowing users to manage their tasks from the command line.
Author-email: Tim Santor <tsantor@xstudios.com>
License-File: AUTHORS.md
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Requires-Dist: click>=8.3.1
Requires-Dist: msal>=1.35.1
Requires-Dist: pydantic>=2.11.7
Requires-Dist: requests>=2.32.5
Requires-Dist: rich>=14.2.0
Description-Content-Type: text/markdown

# ms-todo

![Coverage](https://img.shields.io/badge/coverage-57.45%25-orange)

CLI and importable Python package for Microsoft To Do via Microsoft Graph.

## Install (in your virtualenv)

```bash
pip install -e .
```

## Config File (`~/.ms-todo/.env`)

By default, config is loaded from `~/.ms-todo/.env`.
You can override the config directory with `MS_TODO_CONFIG_DIR`.

```env
CLIENT_ID=YOUR_CLIENT_ID
TENANT_ID=consumers
TASK_LIST_ID=YOUR_TASK_LIST_ID
```

Optional:

```env
CLIENT_SECRET=YOUR_CLIENT_SECRET
```

`CLIENT_SECRET` is not used by the device-code CLI flow, but can remain for other scripts.

## CLI Usage

```bash
ms-todo --help
```

### Who Am I

```bash
ms-todo whoami
```

Shows signed-in user account info and To Do mailbox diagnostics.

### Get Task List IDs

List all:

```bash
ms-todo get-task-list-id
```

Find one by name:

```bash
ms-todo get-task-list-id --list-name "Tasks"
```

### Add a Todo

Using default list from config (`TASK_LIST_ID`):

```bash
ms-todo add-todo "Call accountant"
```

Explicit list ID:

```bash
ms-todo add-todo "Call accountant" --task-list-id "<LIST_ID>"
```

Interactive prompt:

```bash
ms-todo add-todo --interactive
```

### Complete a Todo by ID

With tracked lookup (no list ID needed if task was added via this tool):

```bash
ms-todo complete-todo --todo-id "<TODO_ID>"
```

With explicit list ID:

```bash
ms-todo complete-todo --todo-id "<TODO_ID>" --task-list-id "<LIST_ID>"
```

### Complete a Todo by Source Title

```bash
ms-todo complete-from-source "Call accountant"
```

With explicit list ID:

```bash
ms-todo complete-from-source "Call accountant" --task-list-id "<LIST_ID>"
```

### Bulk Add From File

Using default list from config (`TASK_LIST_ID`):

```bash
ms-todo bulk-add-from-file --file todos.txt
```

Explicit list ID:

```bash
ms-todo bulk-add-from-file --file todos.txt --task-list-id "<LIST_ID>"
```

Interactive list selection:

```bash
ms-todo bulk-add-from-file --file todos.txt --interactive
```

The file should contain one todo title per line. Successfully added titles are removed from the file.

### Debug Logging

```bash
ms-todo --debug whoami
```

The `--debug` flag can be prepended to any command.

## Docs

For Azure app registration and full setup, see `docs/docs/index.md` or run:

```bash
just mkdocs-serve
```


---

# History

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## 0.1.1 (2026-04-20)

- Updated README and move to `hatch` and `xapp-tools`.

## 0.1.0 (2026-03-07)

- First release
