Metadata-Version: 2.4
Name: ynab-utils
Version: 1.0.0
Summary: A collection of command line utilities for YNAB (You Need a Budget) users.
Project-URL: Homepage, https://github.com/davekonopka/ynab-utils
Project-URL: Issues, https://github.com/davekonopka/ynab-utils/issues
Project-URL: Repository, https://github.com/davekonopka/ynab-utils
Author-email: Dave Konopka <dave.konopka@gmail.com>
License-File: LICENSE
Keywords: budgeting,cli,duplicate-detection,finance,ynab
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.12
Provides-Extra: dev
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# ynab-utils

A collection of command line utilities for YNAB (You Need a Budget) users.

## Installation

```bash
# Install from PyPI
pip install ynab-utils

# Or install with uv
uv tool install ynab-utils
```

## Quick Start

```bash
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and run
git clone <repo-url>
cd ynab-utils
uv run ynab-utils --help
```

## Commands

### detect-dupes

Find potential duplicate transactions in your YNAB export.

```bash
# Basic usage - finds exact duplicates on same date
ynab-utils detect-dupes --file transactions.csv

# Show all confidence levels (1=loosest, 5=strictest)
ynab-utils detect-dupes --file transactions.csv --confidence 1

# Only check recent transactions
ynab-utils detect-dupes --file transactions.csv --start-date 2025-01-01

# Adjust date matching window (default: 2 days)
ynab-utils detect-dupes --file transactions.csv --days 5

# Output as JSON
ynab-utils detect-dupes --file transactions.csv --output json
```

**Confidence levels:**
- 5: Same date, same amount, exact payee match
- 4: Same date, same amount, similar payee names
- 3: Within date window, same amount, exact/similar payee
- 2: Within date window, same amount, similar payee
- 1: Within date window, same amount only

## Development

```bash
# Clone the repository
git clone https://github.com/davekonopka/ynab-utils.git
cd ynab-utils

# Install dev dependencies (includes pre-commit)
uv sync --extra dev

# Set up pre-commit hooks
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg

# Run the CLI during development
uv run ynab-utils --help

# Run tests
uv run pytest

# Run tests with coverage
uv run pytest --cov=ynab_utils

# Lint code
uv run ruff check src/

# Format code
uv run ruff format src/

# Run pre-commit checks manually
uv run pre-commit run --all-files
```

**Git Commits:** This project uses [Conventional Commits](https://www.conventionalcommits.org/). Examples:
- `feat(detect-dupes): add --start-date filter`
- `fix(cli): correct argument parsing for --output`
- `test: add integration tests for date filtering`

## Publishing

```bash
# Build distribution packages
uv build

# Upload to PyPI (requires PyPI token)
uv publish
```
