Metadata-Version: 2.4
Name: opencode-db
Version: 0.6.0
Summary: OpenCode database CLI manager — browse, export, analyze, clean up sessions
Project-URL: Homepage, https://github.com/VasilevNStas/opencode-db
Project-URL: Source, https://github.com/VasilevNStas/opencode-db
Project-URL: Tracker, https://github.com/VasilevNStas/opencode-db/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# opencode-db

[![Python](https://img.shields.io/badge/python-3.12%2B-blue)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

**CLI for OpenCode's local database.** OpenCode saves every agent session, conversation, token usage, and cost in a local SQLite file. This tool lets you inspect, export, analyze, and clean up that data.

```bash
pip install opencode-db
```

## Quick start

```bash
opencode-db list         # recent sessions
opencode-db stats        # database summary
opencode-db costs --total  # total token costs
opencode-db export       # export dialog to .md (interactive)
opencode-db help         # full reference
```

## Requirements

- Python 3.12+
- [OpenCode](https://opencode.ai) (must have been run at least once)
- macOS / Linux
