Skip to content

moddi3/opencode-wrapped

Repository files navigation

oc-wrapped

Your year in code, beautifully visualized.

Generate a personalized "Spotify Wrapped"-style summary of your OpenCode usage.

License: MIT Bun

OpenCode Wrapped Example

Installation

Quick Start

Run directly without installing:

npx oc-wrapped # or bunx, or yarn/pnpm dlx

Global Install

npm install -g oc-wrapped # or bun/yarn/pnpm

Then run anywhere:

oc-wrapped

Usage Options

Option Description
--year, -y Generate wrapped for a specific year
--help, -h Show help message
--version, -v Show version number

Features

  • Sessions, messages, tokens, projects, and streaks
  • GitHub-style activity heatmap
  • Top models and providers breakdown
  • OpenCode Zen cost tracking
  • Shareable PNG image
  • Inline image display (Ghostty, Kitty, iTerm2, WezTerm, Konsole)
  • Auto-copy to clipboard

Terminal Support

The wrapped image displays natively in terminals that support inline images:

Terminal Protocol Status
Ghostty Kitty Graphics ✅ Full support
Kitty Kitty Graphics ✅ Full support
WezTerm Kitty + iTerm2 ✅ Full support
iTerm2 iTerm2 Inline ✅ Full support
Konsole Kitty Graphics ✅ Full support
Other terminals ⚠️ Image saved to file only

Output

The tool generates:

  1. Terminal Summary — Quick stats overview in your terminal
  2. PNG Image — A beautiful, shareable wrapped card saved to your home directory
  3. Clipboard — Automatically copies the image to your clipboard

Data Source

OpenCode Wrapped reads data from your local OpenCode installation. It follows the XDG Base Directory Specification:

$XDG_DATA_HOME/opencode/ (usually ~/.local/share/opencode/)

No data is sent anywhere. Everything is processed locally.

Building

Development

# Run in development mode with hot reload
bun run dev

Production Build

# Build for all platforms
bun run build

Releasing

Releases are automated via semantic-release. Merging PRs with conventional commits to main triggers a release.

Tech Stack

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.


Made with ❤️ for the OpenCode community

About

Generate year-in-review stats and visualizations for your opencode coding sessions

Resources

License

Stars

Watchers

Forks

Packages

No packages published