<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng" -->

---
title: Stop Guessing What Your AI Coding Sessions Cost: Meet...
description: oc-monitor is a terminal UI tool written in Go that provides real-time cost and usage monitoring for OpenCode AI coding sessions. Built on the Bubble Tea TUI...
canonical: https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stop Guessing What Your AI Coding Sessions Cost: Meet oc-monitor | daily.dev
og:description: oc-monitor is a terminal UI tool written in Go that provides real-time cost and usage monitoring for OpenCode AI coding sessions. Built on the Bubble Tea TUI...
og:url: https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng
og:image: https://api.daily.dev/og/posts/VB8MIISng.png
og:image:alt: Stop Guessing What Your AI Coding Sessions Cost: Meet oc-monitor
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop Guessing What Your AI Coding Sessions Cost: Meet oc-monitor

**[Medium](https://daily.dev/sources/medium_js)** · 4 min read · 0 upvotes · 0 comments

## Summary

oc-monitor is a terminal UI tool written in Go that provides real-time cost and usage monitoring for OpenCode AI coding sessions. Built on the Bubble Tea TUI framework, it reads directly from OpenCode's local SQLite database to display spending breakdowns by agent, model, and project, along with daily/hourly trends, context window usage, session detail views, full-text search, and JSON export. All data stays local — the only network call is an optional lookup to models.dev for context window metadata. It can be installed via go install or built from source, and is navigated entirely via keyboard shortcuts.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@bharathkc013/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-6b7247252218>

## Questions this post answers

### How can I track how much money my OpenCode AI coding sessions are costing me?

A terminal tool called oc-monitor reads directly from OpenCode's local SQLite database (opencode.db) and displays real-time cost breakdowns by agent, model, and project, down to the cent. It also shows daily and hourly spend trends, a calendar heatmap, and a live burn-rate chart while sessions are running, all without sending any data off the machine.

_Developers watching AI coding spend can find tools like this alongside other agent-cost discussions on daily.dev._

### Does oc-monitor send my OpenCode session data to any external server?

No, all session data stays local because oc-monitor reads directly from the OpenCode SQLite database on disk. The only network call it makes is an optional lookup to models.dev to fetch context window sizes for known models, which is cached locally and refreshed every 24 hours; nothing about sessions, code, or costs leaves the machine.

_Anyone weighing privacy trade-offs in AI coding tools can track these details via daily.dev._

### How do I install and run oc-monitor for OpenCode usage tracking?

Install it via a pre-built binary, run 'go install github.com/bikky/oc-monitor@latest', or clone the repository and build it with 'go build -o oc-monitor ./cmd/oc-monitor'. Go 1.21+ is required to build from source, and OpenCode must have been run at least once so opencode.db exists; by default it looks in ~/.local/share/opencode/opencode.db, or an OPENCODE_DB environment variable can point elsewhere.

_Developers setting up cost-monitoring tooling for AI agents can keep track of new utilities like this on daily.dev._

## Similar posts on daily.dev

- [toktrack: Track AI CLI spending across Claude, Codex & Gemini in 40ms](https://daily.dev/posts/toktrack-track-ai-cli-spending-across-claude-codex-gemini-in-40ms-qajwlumdx) · Product Hunt · 1 upvotes · 0 comments
- [AgentsView: A practical look at your AI agent sessions](https://daily.dev/posts/agentsview-a-practical-look-at-your-ai-agent-sessions-k2zkw0xij) · The Art of Simplicity · 1 upvotes · 0 comments
- [The AI bill arrived. Now what?](https://daily.dev/posts/the-ai-bill-arrived-now-what--g0bssipuf) · Coralogix · 0 upvotes · 0 comments
- [Monitor Claude Code adoption in your organization with Datadog’s AI Agents Console](https://daily.dev/posts/monitor-claude-code-adoption-in-your-organization-with-datadog-s-ai-agents-console-krovhrigb) · Datadog · 0 upvotes · 0 comments

---

Tags: [#golang](https://daily.dev/tags/golang), [#cli](https://daily.dev/tags/cli), [#opencode](https://daily.dev/tags/opencode)

[View this post on daily.dev](https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Stop Guessing What Your AI Coding Sessions Cost: Meet oc-monitor","url":"https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng"},"datePublished":"2026-07-21T07:35:25.976Z","dateModified":"2026-09-14T09:04:54.446Z","description":"oc-monitor is a terminal UI tool written in Go that provides real-time cost and usage monitoring for OpenCode AI coding sessions. Built on the Bubble Tea TUI...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"golang,cli,opencode","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Stop Guessing What Your AI Coding Sessions Cost: Meet oc-monitor"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/stop-guessing-what-your-ai-coding-sessions-cost-meet-oc-monitor-vb8miisng#faq","mainEntity":[{"@type":"Question","name":"How can I track how much money my OpenCode AI coding sessions are costing me?","acceptedAnswer":{"@type":"Answer","text":"A terminal tool called oc-monitor reads directly from OpenCode's local SQLite database (opencode.db) and displays real-time cost breakdowns by agent, model, and project, down to the cent. It also shows daily and hourly spend trends, a calendar heatmap, and a live burn-rate chart while sessions are running, all without sending any data off the machine. Developers watching AI coding spend can find tools like this alongside other agent-cost discussions on daily.dev."}},{"@type":"Question","name":"Does oc-monitor send my OpenCode session data to any external server?","acceptedAnswer":{"@type":"Answer","text":"No, all session data stays local because oc-monitor reads directly from the OpenCode SQLite database on disk. The only network call it makes is an optional lookup to models.dev to fetch context window sizes for known models, which is cached locally and refreshed every 24 hours; nothing about sessions, code, or costs leaves the machine. Anyone weighing privacy trade-offs in AI coding tools can track these details via daily.dev."}},{"@type":"Question","name":"How do I install and run oc-monitor for OpenCode usage tracking?","acceptedAnswer":{"@type":"Answer","text":"Install it via a pre-built binary, run 'go install github.com/bikky/oc-monitor@latest', or clone the repository and build it with 'go build -o oc-monitor ./cmd/oc-monitor'. Go 1.21+ is required to build from source, and OpenCode must have been run at least once so opencode.db exists; by default it looks in ~/.local/share/opencode/opencode.db, or an OPENCODE_DB environment variable can point elsewhere. Developers setting up cost-monitoring tooling for AI agents can keep track of new utilities like this on daily.dev."}}]}
```

