Skip to main content

OpenCode database CLI manager — browse, export, analyze, clean up sessions

Project description

opencode-db

Python 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.

pip install opencode-db

Quick start

opencode-db list         # recent sessions
opencode-db view         # interactive session viewer (colored, scrollable)
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

Features

  • view — просмотр сессии в терминале с ANSI-цветами, Markdown-рендерингом и прокруткой через less
  • list / info / search / tree — навигация и поиск по сессиям
  • export — экспорт диалога в Markdown (с поддержкой Obsidian)
  • delete / prune — удаление и массовая очистка с фильтрами
  • costs / stats — аналитика токенов и расходов
  • --db-path / OPENCODE_DB — кастомный путь к БД

Optional extras

pip install opencode-db[rich]   # enhanced Markdown rendering (recommended)
pip install opencode-db         # zero external dependencies

Requirements

  • Python 3.12+
  • OpenCode (must have been run at least once)
  • macOS / Linux

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opencode_db-0.7.0.tar.gz (52.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencode_db-0.7.0-py3-none-any.whl (49.4 kB view details)

Uploaded Python 3

File details

Details for the file opencode_db-0.7.0.tar.gz.

File metadata

  • Download URL: opencode_db-0.7.0.tar.gz
  • Upload date:
  • Size: 52.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for opencode_db-0.7.0.tar.gz
Algorithm Hash digest
SHA256 947d24f09a31ab50712c27e0d1bbdae8cb8d4d44625b5ab575d7f895021134b9
MD5 c4902a38545b58a7458b708520fe1c4d
BLAKE2b-256 a9c86ad47a7826d3fca889393562b5ef7f56324b624ea5aca8c769775c605450

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencode_db-0.7.0.tar.gz:

Publisher: release.yml on VasilevNStas/opencode-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opencode_db-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: opencode_db-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 49.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for opencode_db-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5e5401c66978d6d96c5f9376b6d6564a7487cf24eb413ee9688894235ea9da3
MD5 834ecee4738c46ff8da545180626218b
BLAKE2b-256 ddccece761a6946428e20ef16275f12f64663ce13b8468c3b4e5781574a5a5ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencode_db-0.7.0-py3-none-any.whl:

Publisher: release.yml on VasilevNStas/opencode-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page