Metadata-Version: 2.4
Name: inkdrop
Version: 0.1.0
Summary: Add your description here
Requires-Python: >=3.13
Requires-Dist: cryptography>=49.0.0
Requires-Dist: keyring>=25.7.0
Requires-Dist: prompt-toolkit>=3.0.52
Description-Content-Type: text/markdown

# inkdrop

Interactive terminal email sender with recipient history and attachment autocomplete.

## Install

From PyPI:

```bash
uv tool install inkdrop
```

Or from source, in this project directory:

```bash
uv sync
uv tool install .
```

## First run

No manual config file needed — just run:

```bash
inkdrop
```

The first time, it'll walk you through a one-time setup:

1. It asks for your Gmail address and an **App Password** (not your regular
   Gmail password — Gmail no longer accepts that over SMTP). Create one at:
   https://myaccount.google.com/apppasswords
   (requires 2-Step Verification to be turned on for your Google account).
2. It verifies the credentials with a real login attempt before saving
   anything, so a typo doesn't silently get stored.
3. It saves the credentials for future runs — using your OS's secure
   keyring (GNOME Keyring / KWallet / Keychain) when one is available. If no
   system keyring is found (common on WSL or headless Linux without a
   keyring daemon running), it automatically falls back to a locally
   encrypted file under `~/.inkdrop/` instead — no extra setup required
   either way.

Every run after that is silent — no prompts, straight to composing an email.

To switch accounts or rotate your app password later:

```bash
inkdrop --reconfigure
```

This clears the saved credentials; the next run starts setup again.

## Attachments

Drop files you frequently attach into `~/.inkdrop/attachments/` — it's
created automatically on first run, and shows up as autocomplete suggestions
when the app asks "File to attach". Typing a path with `/` falls back to
full filesystem completion for anything else.

## Data stored

Everything lives under `~/.inkdrop/` , independent of where inkdrop itself
is installed:

| File | Purpose |
|---|---|
| `attachments/` | Files you commonly attach, shown in autocomplete |
| `email_history.json` | Past recipient addresses, shown in autocomplete |
| `.secret.key` , `credentials.enc` | Only present if no OS keyring was found — locally encrypted Gmail credentials ( `chmod 600` ) |

If a system keyring is available, credentials are stored there instead and
none of the `.secret.key` / `credentials.enc` files are created.

## Development

Run without installing:

```bash
uv run inkdrop
```

To pick up code changes after an `uv tool inkdrop` , reinstall:

```bash
uv tool install . --reinstall
```

## Platform support

v1 targets **Linux only** (tested on Fedora/WSL). macOS and Windows keyring
backends should work via the same `keyring` library, but are untested.
