Basic Usage
Quick Start Example
# Show current configuration
ocmonitor config show
# Analyze all your sessions
ocmonitor sessions ~/.local/share/opencode/storage/message
# Get a weekly breakdown
ocmonitor weekly ~/.local/share/opencode/storage/message
# Start live monitoring
ocmonitor live ~/.local/share/opencode/storage/messageDefault OpenCode Message Location
By default, OpenCode stores messages at:
~/.local/share/opencode/storage/messageYou can use this path in all commands, or configure a custom path (see Configuration).
Common Commands
Here are the most frequently used commands:
| Command | Description |
|---|---|
ocmonitor sessions <path> | Analyze all sessions in a directory |
ocmonitor session <path> | Analyze a single session in detail |
ocmonitor daily <path> | Daily usage breakdown |
ocmonitor weekly <path> | Weekly usage patterns |
ocmonitor monthly <path> | Monthly usage analysis |
ocmonitor models <path> | Model usage breakdown |
ocmonitor projects <path> | Project usage breakdown |
ocmonitor live <path> | Real-time monitoring dashboard |
ocmonitor config show | Display current configuration |
For the full command reference with all options and flags, see Command Reference.
Live Dashboard
For real-time monitoring, launch the live dashboard:
# Launch the live monitoring dashboard
ocmonitor live ~/.local/share/opencode/storage/messageThis opens an interactive terminal dashboard showing real-time usage statistics.