@getpromptly/cli
v0.2.9
Published
Developer prompt analytics CLI - capture and review AI coding sessions
Downloads
480
Maintainers
Readme
@getpromptly/cli
Developer prompt analytics CLI — capture, analyze, and review AI coding sessions tied to tickets.
Install
npm i -g @getpromptly/cliQuick Start
promptly init # Configure AI tools + install /track skill
promptly start # Prompts for ticket ID interactively
# ... work with your AI coding tool ...
promptly finish # Save session data
promptly serve # Open dashboard at localhost:3000
promptly report # View stats (select time period)
promptly digest # Weekly insights digest with trendsNative /track Commands
After promptly init, you can 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
Auto-Prompt
During setup, promptly init can enable auto-prompt — your AI tool will offer session tracking at the start of each conversation without any manual action.
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.
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 uninstall | Remove /track skill |
| 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.
All commands support direct arguments for scripting/automation.
How It Works
Claude Code / Gemini CLI / Codex CLI
|
└──> MCP Server → ~/.promptly/buffer.json → SQLite
↓
promptly serve (localhost:3000)promptly initauto-detects installed tools and lets you select which to configure.promptly startcreates a session and begins logging.- The MCP server captures all conversation turns, tokens, and tool calls.
promptly finishcaptures git activity (commits, branch, diff stats, instruction file changes), auto-categorizes the session (bug-fix, feature, refactor, etc.), computes session intelligence (quality score, tool usage, subagent stats, context window metrics, prompt quality analysis), writes data to SQLite, and clears the buffer.promptly serveserves a dashboard with sessions, analytics, digest, and session replay.
Data Storage
All data stays on your machine at ~/.promptly/:
| File | Purpose |
|------|---------|
| config.json | CLI configuration |
| session.json | Active session state |
| buffer.json | Conversation buffer (cleared on finish) |
| promptly.db | SQLite database with all sessions |
Links
License
MIT
