Skip to content
akoskomuvesPublic

About

Developer prompt analytics for AI coding sessions — capture, analyze, and review conversations tied to tickets.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Promptly

Developer prompt analytics -- capture, analyze, and review AI conversations tied to development work.

Quick Start

npm i -g @getpromptly/cli
promptly init            # Configure AI tools + install /track skill
promptly start           # Prompts for ticket ID interactively
# ... work with any supported AI coding tool ...
promptly finish          # Save session data
promptly serve           # Open local dashboard at localhost:3000
promptly report          # View stats (select time period)
promptly digest          # Weekly insights digest with trends

Native /track Commands

After promptly init, use the /track command directly in your AI tool:

Tool Command
Claude Code /track AUTH-123
Codex CLI /track AUTH-123
Gemini CLI /track AUTH-123
VS Code + Copilot /track AUTH-123

All tools support: /track <ticket-id>, /track status, /track finish

Features

  • Local-first: Everything runs on your machine. No account needed.
  • Multi-tool support: Works with Claude Code, Gemini CLI, Codex CLI, Cursor, Windsurf, and VS Code/Copilot via MCP.
  • Native /track command: Built-in slash commands for Claude Code, Codex CLI, Gemini CLI, and VS Code + Copilot.
  • Auto-prompt: AI tools offer session tracking at conversation start — no manual setup needed.
  • Session tracking: Tag conversations to tickets, track token usage and duration.
  • Git-aware sessions: Automatically captures commits, branches, and diff stats made during each session.
  • Auto-categorization: Sessions are classified as bug-fix, feature, refactor, investigation, testing, or docs based on ticket ID, git commits, and conversation content.
  • Session intelligence: Quality scoring (1-5 stars), tool usage analytics (Bash, Read, Edit, etc.), subagent tracking, context window metrics, and prompt quality analysis -- computed automatically at finish time.
  • Session replay: Step through conversation turns with timing, playback controls, and cumulative stats to see how a session unfolded.
  • Analytics dashboard: Cost-per-project trends, parallel session detection, skill usage analytics, instruction file effectiveness tracking, and aggregate prompt quality.
  • Spend optimization: promptly optimize analyzes your session history and surfaces actionable recommendations — premium-model misuse on simple tasks, context-window saturation on long sessions, repeated corrections that belong in your instruction file, repetitive multi-step Bash workflows worth turning into a skill, and pre/post action patterns worth automating as hooks. Each rec has a dollar or time savings estimate. Available in CLI, dashboard (/optimize), and JSON API.
  • Prompt review: promptly review scores the prompts behind your work — one captured session, or every session behind a GitHub PR (promptly review --pr <n>) — with an LLM-as-judge on markdown rubrics (intent clarity, scope discipline) plus spend efficiency, in one verdict. --comment posts the verdict back to the PR and edits it in place on re-run (no spam). The same review runs through the promptly_review MCP tool when you tell your agent you're reviewing a PR. Bring your own Anthropic key.
  • Import past Claude Code sessions: promptly import-claude pulls existing sessions from ~/.claude/projects into Promptly with no MCP setup needed — handy for backfilling history or skipping the MCP install entirely.
  • Built-in dashboard: View sessions, analytics, digest, and session replay in your browser at localhost:3000.
  • Optional cloud sync: For teams that want a shared dashboard.

vs ccusage / Codeburn: those parse Claude Code's local JSONL logs to show your token spend. Promptly adds multi-tool coverage (Cursor, Codex CLI, Gemini CLI, VS Code), git/ticket attribution, session intelligence, and an optional team dashboard.

Deployment Tiers

Free (Local) Cloud
Install npm i -g @getpromptly/cli SaaS
Storage SQLite on disk Our infra
Dashboard promptly serve (localhost) app.getpromptly.xyz
Users Single user Multi-user, teams
Signup None Per-seat
Connectivity Full offline Zero ops

CLI Commands

Command Description
promptly init Configure MCP (interactive tool selector)
promptly start Start logging (prompts for ticket ID)
promptly start <ticket-id> Start logging for specific ticket
promptly finish Finish session and save data
promptly status Show current session status
promptly serve Start local dashboard on localhost:3000
promptly report Show stats (interactive period selector)
promptly digest Weekly insights digest with trends
promptly login Authenticate with cloud API
promptly teams List teams with quick actions
promptly team set Interactive team selector
promptly team set <slug> Set default team by slug
promptly team unset Clear default team
promptly skill install Install /track command for all configured tools
promptly skill status Check skill installation status
promptly import-claude Import a past Claude Code session from ~/.claude/projects (no MCP setup needed)
promptly optimize Analyze session history and surface AI spend leak recommendations
promptly optimize --apply <rec-id> Apply a recommendation: generates the skill / instruction rule / hook it suggests
promptly review <session-id> Run prompt review against a captured session (LLM-as-judge)
promptly review --pr <n> Review every session behind a GitHub PR — prompt quality (LLM-as-judge) + spend efficiency in one verdict. Flags: --comment (post/update as a PR comment), --status (pass/fail commit status on the PR, --status-threshold <n>), --no-quality, --rubric <id>, --model <id>, --json
promptly statusline install Show 🔴 REC <ticket> in Claude Code's status line while recording
promptly telemetry on|off|status Manage anonymous usage telemetry

All commands work without a TTY (scripts, CI, AI agents): prompts fall back to sensible defaults or fail with the flag to pass instead. Use promptly init --tools claude --yes for fully unattended setup.

Telemetry: promptly init sends a one-time anonymous install ping (version + OS, never content); usage telemetry only runs in cloud mode after login. Opt out any time: promptly telemetry off or DO_NOT_TRACK=1.

How It Works

Claude Code / Gemini CLI / Codex CLI
        |
        └──> MCP Server --> ~/.promptly/buffer.json --> SQLite
                                                          |
                                            promptly serve (localhost:3000)
  1. promptly init auto-detects installed AI coding tools and registers the MCP server with each.
  2. promptly start TICKET-123 creates a session and signals the MCP server to begin logging.
  3. As you work with your AI coding tool, the MCP server captures all conversation turns to a local buffer.
  4. promptly finish captures git activity (commits, branch, diff stats, instruction file changes), auto-categorizes the session, computes session intelligence (quality score, tool usage, subagent stats, context window metrics, prompt quality analysis), writes data to SQLite, and clears the buffer.
  5. promptly serve serves a dashboard with sessions, analytics, digest, and session replay.

Data Storage

All data is stored locally at ~/.promptly/:

File Purpose
config.json CLI configuration (API URL, mode, token)
session.json Active session state
buffer.json MCP conversation buffer (cleared on finish)
promptly.db SQLite database with all completed sessions

Cloud Mode

For teams that want a shared dashboard, sign up at getpromptly.xyz.

promptly login             # Opens browser to sign in
promptly teams             # List your teams
promptly team set          # Interactive team selector (or: promptly team set my-team)
promptly start TICKET-1    # Creates session in your team
promptly finish            # Saves to SQLite AND uploads to API

Team Features

  • Create teams at app.getpromptly.xyz/teams
  • Invite members via shareable link (Owner/Admin can invite)
  • Role-based access: Owner, Admin, Member
  • Shared sessions: All team members can view sessions created within the team
  • Team analytics: View usage by developer, model, and tool
  • Per-tool comparison: See which AI coding tools your team uses most (Claude Code, Cursor, Gemini CLI, etc.)
  • Data export: Download sessions and analytics as CSV or JSON from the dashboard

See docs/SETUP.md for cloud setup details.

Development

This is a TypeScript monorepo using Turborepo and pnpm.

pnpm install
pnpm build          # Build all packages
pnpm dev            # Dev mode (watch)

Packages

Package Path Description
@getpromptly/shared packages/shared Shared types and utilities
@getpromptly/cli packages/cli CLI tool
@getpromptly/mcp-server packages/mcp-server MCP server for conversation capture

Documentation

License

MIT

About

Developer prompt analytics for AI coding sessions — capture, analyze, and review conversations tied to tickets.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages