# send-message

CLI app for extracting and delivering AI agent session messages

## Installation

### From DevPi (private registry)

```bash
uv add send-message
```

> Requires the DevPi index to be configured in `~/.config/uv/uv.toml`:
> ```toml
> index-strategy = "unsafe-best-match"
>
> [[index]]
> name = "devpi"
> url = "https://pypi.registry.hochguertel.work/root/dev/+simple/"
> ```

### From source (monorepo)

```bash
git clone https://pastoral-oyster.pikapod.net/tools/ai-session-tools.git
cd ai-session-tools
uv sync --all-packages
```

## Usage

`send-message` extracts messages from AI agent sessions (Devin, OpenCode,
Copilot), previews them in the terminal, lists sessions and messages, and
delivers selected messages as markdown notes committed to git and sent via
email.

```bash
# Show help
send-message --help

# List recent sessions across all tools
send-message list-sessions

# Preview the latest message from the auto-detected session
send-message preview latest

# Send the latest message (save, commit, email, push)
send-message send latest

# Dry run — save only, no commit/email/push
send-message send latest --dry-run

# Force a specific tool and session
send-message send latest --tool devin --session-id plum-produce

# Search for a message containing "database"
send-message preview "search:database"
```

### Environment variables

| Variable               | Purpose                              |
| ---------------------- | ------------------------------------ |
| `SEND_MESSAGE_TOOL`    | Default tool override                |
| `SEND_MESSAGE_SESSION` | Default session ID override          |
| `NO_COLOR`             | Disable colored output               |
| `FORCE_COLOR`          | Force colored output                 |

## Development

```bash
# Run tests
uv run pytest apps/send-message/tests/

# Lint
uv run ruff check apps/send-message/

# Type check
uv run mypy
```

## License

MIT
