8000 GitHub - jiunbae/oh-my-prompt: Analytics dashboard for Claude Code prompts stored in MinIO · GitHub
[go: up one dir, main page]

Skip to content

About

Analytics dashboard for Claude Code prompts stored in MinIO

Resources

Stars

56 stars

Watchers

0 watching

Forks

Latest commit

 

History

293 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Oh My Prompt

Your AI coding sessions, captured and analyzed.

A self-hosted prompt journal + CLI that captures every interaction
with Claude Code, Codex, OpenCode, Gemini CLI, and more — then turns them into actionable insights.


npm version License Node Next.js


Quickstart for Agents · Start with Human · CLI · Dashboard · Local Mode · Server Deploy · Realtime: muxa · Contributing


Dashboard Preview

Why?

You write hundreds of prompts a day to AI coding agents. But do you actually know which ones work?

Oh My Prompt gives you the answer. It captures every prompt, scores its quality, and shows you patterns you'd never notice on your own.


🎯 Capture

Shell hooks silently intercept
every prompt — and every tool
the agent runs (Bash, Edit, …)

📊 Analyze

Quality scores, token usage,
session patterns, trends

🔄 Sync

Local SQLite → server API
Works offline, syncs when ready


Supported Agents

Claude Code
Anthropic
Codex
OpenAI
OpenCode
Open Source
Gemini CLI
Google
Hook + Backfill Hook + Backfill Hook + Backfill Hook + Backfill

All agents are auto-detected during omp setup. Hooks capture prompts in real-time; backfill imports your full history.


Quickstart for Agents

Install and set up Oh My Prompt (https://github.com/jiunbae/oh-my-prompt).

npm install -g oh-my-prompt && omp setup

Run `omp setup` interactively — do NOT pass any flags.
Ask me for each input (server URL, auth, device name, hooks).
When done, run `omp doctor` and summarize the result.

Setup Flow Preview

omp setup launches an interactive wizard with colored prompts, spinners, and a summary box:

$ omp setup

┌  oh-my-prompt
│
◆  Server URL
│  https://prompt.jiun.dev
│
◆  Authentication
│  ● Login with email & password (recommended)
│  ○ Paste existing API token
│
◆  Email
│  user@example.com
│
◆  Password
│  ********
│
◇  Authenticating... done
│
◆  Device name
│  my-macbook
│
◇  Database migrated (schema v3)
│
◆  Install hooks
│  ◻ Claude Code (detected)
│  ◻ Codex (detected)
│  ◻ OpenCode (not found)
│  ◻ Gemini CLI (detected)
│
◇  Hooks installed (Claude Code, Codex, Gemini CLI)
│
◇  Server validated (200)
│
◇  Setup Complete ───────────────────╮
│                                    │
│  Server:  https://prompt.jiun.dev  │
│  Device:  my-macbook               │
│  Hooks:   claude, codex, gemini    │
│                                    │
├────────────────────────────────────╯
│
└  Run omp backfill to import existing prompts

Non-interactive mode (--yes) and JSON output (--json) are fully supported for CI/scripting.

Manual Install Options
# npm (recommended)
npm install -g oh-my-prompt && omp setup

# npx (no global install)
npx oh-my-prompt setup

# source
git clone https://github.com/jiunbae/oh-my-prompt.git
cd oh-my-prompt
pnpm install
pnpm build:cli
cd packages/omp-cli
npm link
omp setup

How It Works

  You                    CLI                      Dashboard
  ───                    ───                      ─────────

  claude "fix the bug"
       │
       └──── hook ────▶  omp ingest ──▶ SQLite (local)
                              │
                              ├── omp sync ──▶ POST /api/sync/upload
                              │                       │
                              │                ┌──────┴──────┐
                              │                │  PostgreSQL  │
                              │                └─────────────┘
                              │                       │
                              │              ┌────────┴────────┐
                              │              │ omp serve        │  ← local mode
                              │              │ localhost:3000   │
                              │              └─────────────────┘
                              │                      or
                              │              ┌─────────────────┐
                              └──────────────│ your-server.com │  ← server mode
                                             └─────────────────┘

Start with Human

# Install
npm install -g oh-my-prompt

# Setup (interactive wizard)
omp setup

# Verify
omp doctor

That's it. Now use Claude Code, Codex, OpenCode, or Gemini CLI normally — prompts are captured automatically.

claude "Refactor this function to use async/await"
#        ↑ captured silently in the background

Choose Your Mode

SQLite (no Docker) Local Docker Server
Setup omp serve --local omp serve Deploy to your server
Requires Nothing Docker Docker + domain
Dashboard localhost:3000 localhost:3000 your-domain.com
Database SQLite (same as CLI) PostgreSQL + Redis PostgreSQL + Redis
Data Local only Local only Multi-device sync
Best for Solo use, minimal setup Full features, solo Teams, cross-machine

SQLite Mode — zero dependencies, view your data instantly:

omp serve --local              # Dashboard at http://localhost:3000
omp serve --local --port 8080  # Custom port
omp serve --local --host 0.0.0.0  # Network access

Docker Mode — full-featured with PostgreSQL and Redis:

omp serve        # Start dashboard at http://localhost:3000
omp sync         # Sync captured prompts to local dashboard

Server Mode — deploy once, sync from anywhere:

omp config set server.url https://your-domain.com
printf '%s' "$OMP_TOKEN" | omp config set server.token --stdin
omp sync         # Sync to remote server

📟 CLI

omp setup — Interactive configuration wizard

Beautiful step-by-step wizard powered by @clack/prompts:

$ omp setup

┌  oh-my-prompt
│
◆  Server URL .............. https://your-server.com
◆  Authentication .......... Login with email & password
◆  Email ................... you@example.com
◆  Password ................ ********
◇  Authenticating... Logged in as you@example.com
◆  Device name ............. my-laptop
◇  Database migrated (schema v3)
◆  Install hooks ........... Claude Code, Codex, Gemini CLI
◇  Hooks installed (Claude Code, Codex, Gemini CLI)
◇  Server validated (200)
│
◇  Setup Complete ───────────────────╮
│                                    │
│  Server:  https://your-server.com  │
│  Device:  my-laptop                │
│  Hooks:   claude, codex, gemini    │
│                                    │
├────────────────────────────────────╯
│
└  Run omp backfill to import existing prompts

Flags: --yes (non-interactive), --json (machine-readable), --skip-validate, --server, --token, --device

omp analyze — Score prompt quality
$ omp analyze abc123

  Score: 85/100 (Good)

  Signals:
    ✓ Goal         Clear objective stated
    ✓ Context      Background information provided
    ✗ Constraints  No specific constraints
    ✓ Output       Expected format described
    ✗ Examples     No examples included

  Suggestions:
    → Add specific constraints or requirements
    → Include examples of expected output
omp stats — View statistics
$ omp stats --view weekday --since 7d

  ┌──────────────────────────────────────────────────────────────┐
  │ Local Analytics                                             │
  │ Range: 7d -> now                                            │
  └──────────────────────────────────────────────────────────────┘

  Top Projects
  api       ██████████████████████████ 42  6.2k tok · 88% rsp
  frontend  ████████████████░░░░░░░░░ 27  3.8k tok · 91% rsp

  Grouped By weekday
  Mon       ██████████████████████████ 18  2.1k tok · 94% rsp
  Tue       ████████████████████░░░░░░ 14  1.8k tok · 86% rsp
All commands
Command Description
omp setup Interactive configuration wizard
omp install [claude|codex|opencode|gemini|all] Install capture hooks
omp uninstall [claude|codex|opencode|gemini|all] Remove capture hooks
omp status Show config and hook status
omp doctor Validate setup, diagnose issues
omp sync Sync local prompts to server
omp sync status Show sync history
omp backfill [--claude-only|--codex-only|--opencode-only|--gemini-only] Import history from all agents
omp serve Start local dashboard (Docker)
omp serve --local Start local dashboard (SQLite, no Docker)
omp serve stop Stop local dashboard server
omp stats [--view overview|projects|sources|hourly|weekday|sessions] [--group-by day|week|month|project|source|hour|weekday] View local analytics
omp export [--format json|jsonl|csv] Export prompts
omp import codex-history Import from Codex
omp config get|set|validate Manage configuration
omp db migrate Run database migrations

📊 Dashboard

The self-hosted web dashboard turns raw prompts into insights.

Prompt Journal

  • Full-text search across all prompts
  • Filter by project, type, date, tags
  • Quality signals on every prompt
  • Markdown + syntax highlighting

Analytics

  • Activity heatmap
  • Token usage trends
  • Quality score tracking
  • Project breakdown
  • Session analysis

Multi-User

  • Email/password auth
  • Admin-managed allowlist
  • Per-user data isolation
  • Individual API tokens

Security

  • No client credentials needed
  • bcrypt password hashing
  • httpOnly secure cookies
  • Non-root container

Admin Diagnostics — admins can open /admin/diagnostics to check database, Redis, LLM configuration, optional live LLM probe, timezone/KST handling, i18n locale support, sync recency, and AI insight cache health. The diagnostics API only returns redacted configuration state; secrets and API keys are never shown.

Screenshots
Analytics Sessions
Analytics Sessions
AI Insights Search
AI Insights Search
Templates Login
Templates Login
Light Mode
Dashboard Analytics
Dashboard (Light) Analytics (Light)

🏗 Local Dashboard

SQLite Mode (zero dependencies)

The fastest way to view your data. No Docker, no server — just your existing SQLite database.

omp serve --local                    # Dashboard at http://localhost:3000
omp serve --local --port 8080        # Custom port
omp serve --local --host 0.0.0.0     # Expose to network

This reads directly from the same SQLite database the CLI uses. No sync, no registration — just open and browse.

Docker Mode (full features)

For the full dashboard experience with PostgreSQL, Redis, and the web UI:

# Start (pulls images and runs PostgreSQL + Redis + App)
omp serve

# Dashboard is now at http://localhost:3000
# Register an account, then:
omp config set server.url http://localhost:3000
printf '%s' "$OMP_TOKEN" | omp config set server.token --stdin  # from Settings page
omp backfill                              # import history from all agents
omp sync                                  # sync to local dashboard
omp serve status    # check container status
omp serve logs      # tail app logs
omp serve stop      # stop (data is preserved)
omp serve           # restart — your data is still there

Configuration:

omp config set serve.port 3030                # change port (default: 3000)
omp config set serve.adminEmail you@email.com # auto-seed admin account
omp config set serve.image my-registry/omp    # custom Docker image

🌐 Server Deployment

For multi-device sync and team use, deploy Oh My Prompt to your own server.

Docker Compose

git clone https://github.com/jiunbae/oh-my-prompt.git
cd oh-my-prompt
docker compose up -d    # Starts PostgreSQL + Redis + App on :3000

Docker (standalone)

docker run -p 3000:3000 \
  -e DATABASE_URL=postgresql://user:pass@host:5432/prompts \
  -e SESSION_SECRET=$(openssl rand -hex 32) \
  -e OMP_ADMIN_EMAIL=you@email.com \
  registry.jiun.dev/oh-my-prompt:latest

Environment Variables

Variable Required Default Description
DATABASE_URL Yes — PostgreSQL connection string
SESSION_SECRET Yes — Cookie signing key (openssl rand -hex 32)
REDIS_URL No redis://localhost:6379 Redis for caching
OMP_ADMIN_EMAIL No — Auto-seed admin email on startup
NODE_ENV No production Environment mode
NEXT_PUBLIC_APP_URL No — Public base URL for absolute links
COOKIE_SECURE No true in production Set false only for plain-HTTP deployments
OMP_TIME_ZONE No TZ or UTC App analytics timezone, e.g. Asia/Seoul

AI Insights / LLM

AI insights use an OpenAI-compatible or provider-specific LLM configured by environment variables:

Variable Required Default Description
OMP_LLM_PROVIDER No — openai, custom, ollama, anthropic, azure, or gemini
OMP_LLM_API_KEY Provider-dependent — API key; optional for local custom/ollama servers that do not require auth
OMP_LLM_BASE_URL No provider default Base URL for OpenAI-compatible/local serving
OMP_LLM_MODEL No provider default Model name
OMP_LLM_MAX_TOKENS No 2048 Max output tokens for insight generation
OMP_LLM_TEMPERATURE No 0.3 Sampling temperature
OMP_LLM_ENABLE_THINKING No — Optional true/false flag for compatible local models

For a local OpenAI-compatible server:

OMP_LLM_PROVIDER=custom
OMP_LLM_BASE_URL=http://localhost:8000/v1
OMP_LLM_MODEL=your-model
# OMP_LLM_API_KEY can be omitted if your local server accepts unauthenticated requests.

Use /admin/diagnostics as an admin to verify the active LLM config. Click Run LLM Probe only when you want to send a short live test request to the configured model.

Kubernetes

Example manifests are in k8s/. Update secrets and ingress, then select an immutable image tag before applying the Kustomize bundle:

cd k8s
kustomize edit set image registry.jiun.dev/oh-my-prompt=registry.jiun.dev/oh-my-prompt:<git-sha>
kubectl apply -k .

Connect CLI to Server

omp config set server.url https://your-domain.com
printf '%s' "$OMP_TOKEN" | omp config set server.token --stdin  # after registration
omp backfill     # import history from Claude, Codex, OpenCode, Gemini
omp sync         # upload to server

🏛 Architecture

oh-my-prompt/
├── src/app/                    Next.js 16 App Router
│   ├── (dashboard)/            Protected pages (prompts, analytics, admin)
│   └── api/                    REST API (auth, sync, analytics)
├── src/components/             React + Recharts + Shadcn/ui
├── src/db/                     Drizzle ORM schema (PostgreSQL)
├── src/services/               Business logic (upload, sync, classify)
├── src/omp/                    CLI source (Node.js + SQLite)
├── packages/omp-cli/           Standalone npm package
└── .gitea/workflows/           Gitea CI/CD (Docker build + k8s deploy)
Frontend Next.js 16 · React 19 · Tailwind CSS 4 · Recharts
Backend Next.js API Routes · tRPC · Zod
Database PostgreSQL · Drizzle ORM
CLI Node.js · SQLite WAL (sql.js fallback) · @clack/prompts · picocolors
Infra Docker · Kubernetes · ArgoCD · Gitea CI

🔭 Realtime Companion: muxa

muxa is omp's natural counterpart on the realtime side. Where omp captures every prompt over time and turns the history into searchable analytics, muxa watches your tmux panes live — agent state (working / waiting / idle / error), pane-to-session correlation, status-line glyphs, a fullscreen TUI, and an HTTP dashboard that surfaces every tmux pane on your machine in one tab.

Same four agents on both sides; opposite axes — omp owns the history layer, muxa owns the live layer. They're complementary, not competitive.

muxa can also push PromptSubmitted events straight into your omp instance, so your prompt journal stays current without an extra hook setup. Add this to muxa's config:

[sinks.oh_my_prompt]
enabled  = true
endpoint = "https://prompt.jiun.dev"   # or your self-hosted URL
# token comes from $OMP_SERVER_TOKEN

Then run muxad and prompts flow into omp's ingest endpoint with retry, backoff, and dedup. See muxa's docs/SINKS.md for the full setup.


🤝 Contributing

git clone https://github.com/jiunbae/oh-my-prompt.git
cd oh-my-prompt
pnpm install
pnpm dev          # Web dashboard
pnpm build:cli    # Build CLI package
  1. Fork → 2. Branch (feat/thing) → 3. Commit → 4. PR

📄 License

MIT — Jiun Bae


GitHub · npm · Issues

Built for developers who talk to AI all day.

About

Analytics dashboard for Claude Code prompts stored in MinIO

Resources

Stars

56 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0