Metadata-Version: 2.4
Name: i66tolls
Version: 0.1.1
Summary: CLI for I-66 inside-the-Beltway toll lookups
Author-email: Alan Schoen <alanschoen@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/alanjschoen/i66tolls
Project-URL: Repository, https://github.com/alanjschoen/i66tolls
Project-URL: Issues, https://github.com/alanjschoen/i66tolls/issues
Keywords: i66,tolls,virginia,vdot,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Terminals
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12
Requires-Dist: its-a-dt>=0.1.1
Requires-Dist: prompt-toolkit>=3.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# i66tolls

Vibe coded command-line tool for checking tolls on I-66 inside the Capital Beltway (between I-495 and the Theodore Roosevelt Bridge).

Run it with no arguments for an interactive wizard, or pass entry/exit IDs and flags for a quick lookup.

Data comes from VDOT's official toll calculator at [vai66tolls.com](https://vai66tolls.com/).

![Demo](demo.gif)

## Requirements

- Python 3.10+
- [Typer](https://typer.tiangolo.com/) for the CLI
- [prompt_toolkit](https://python-prompt-toolkit.readthedocs.io/) and [its-a-dt](https://pypi.org/project/its-a-dt/) for interactive prompts

## Install

From PyPI:

```bash
pip install i66tolls
```

From source:

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

## Interactive mode

```bash
i66tolls
```

1. **Direction** — `current`, eastbound, or westbound
   - `current` uses the system clock. If no toll period is active, prints a message and exits.
   - Eastbound/westbound continues to entry selection for that direction.
2. **Entry** — choose an entry interchange
3. **Exit** — choose an exit interchange
4. **When** — `current` or `historic` (skipped if you already chose `current` in step 1)
5. **Date/time** — for historic lookups, an interactive date/time picker ([its-a-dt](https://pypi.org/project/its-a-dt/))

Use **↑/↓** and **Enter** to select. Press **←** to go back to the previous step (even for values pre-filled from the command line).

## Provide arguments to skip interactive steps

Provide entry and exit IDs (and any other options) to skip prompts:

```bash
i66tolls 1 10 -c
i66tolls 1 10 --current
i66tolls 16 1 -w -c
i66tolls 1 10 -t "06/10/2026 08:00 AM"
```

When both entry and exit are given, direction is inferred automatically.

### Options

| Flag | Description |
|------|-------------|
| `-e`, `--eastbound` | Eastbound route |
| `-w`, `--westbound` | Westbound route |
| `-c`, `--current` | Use the current toll rate |
| `-t`, `--time` | Historic date/time (`MM/DD/YYYY HH:MM AM/PM`, US/Eastern) |

### Conflicts

- `--eastbound` and `--westbound` cannot be used together
- `--current` and `--time` cannot be used together
- Provide both entry and exit IDs, or neither

## Toll hours

| Direction | Hours |
|-----------|-------|
| Eastbound (toward DC) | Weekdays 5:30–9:30 AM |
| Westbound (toward Beltway) | Weekdays 3:00–7:00 PM |

Outside these windows, current tolls show as unavailable. Federal holidays are also toll-free.

## Entry and exit IDs

Run `i66tolls` and browse the interactive lists, or query the API directly:

```bash
curl -s "https://vai66tolls.com/Index?handler=BeginIntPartial&rbEastVal=true" | grep option
curl -s "https://vai66tolls.com/Index?handler=ExitIntPartial&bIntId=1&rbEastVal=true" | grep option
```

## Data source

This tool uses the same backend API as [vai66tolls.com](https://vai66tolls.com/). Amounts are estimates and can change before you reach the road.

`reference/tolls.py` is the original Alexa skill that used a SmarterRoads XML feed. That public endpoint is no longer available.
