Skip to main content

Discover, analyze, and evolve your best prompts from AI coding sessions

Project description

reprompt

CI PyPI version Python License: MIT

Discover, analyze, and evolve your best prompts from AI coding sessions.

repomix packs your code for AI. reprompt extracts insights from AI.

Every developer's AI session history contains reusable prompt patterns -- scattered across hundreds of session files. reprompt extracts them, deduplicates, analyzes frequency, and builds a personal prompt library that evolves over time.

Quick Start

pipx install reprompt-cli
reprompt scan
reprompt report
reprompt library

Terminal Report

reprompt -- AI Session Analytics
========================================

 Overview
 Total prompts:        1,247
 Unique (deduped):       832
 Sessions scanned:       156
 Sources: claude-code, openclaw

 Top Prompt Patterns
 #  | Pattern                  | Count | Category
 1  | fix the failing test...  |    42 | debug
 2  | add unit tests for...    |    38 | test
 3  | refactor X to use...     |    27 | refactor

Features

  • Auto-detection -- finds Claude Code and OpenClaw sessions automatically
  • Two-layer dedup -- SHA-256 exact + TF-IDF semantic similarity
  • Hot terms analysis -- TF-IDF discovers your most-used technical terms
  • K-means clustering -- groups similar prompts into themes
  • Prompt library -- extracts high-frequency patterns, auto-categorizes (debug/implement/test/review/refactor/explain/config)
  • Rich reports -- beautiful terminal output with tables and bar charts
  • Multiple formats -- terminal, JSON (for pipelines), Markdown (for docs)
  • Pluggable adapters -- add support for any AI coding tool
  • Prompt search -- find past prompts by keyword across all sessions
  • Zero config -- works out of the box, customize via env vars or TOML

How reprompt Compares

Feature reprompt prompt-manager agent-sessions cclog
Multi-tool support ✅ Claude, OpenClaw, + adapters ✅ Multiple ✅ Multiple ❌ Claude only
Exact dedup (SHA-256)
Semantic dedup (TF-IDF)
Hot terms analysis ✅ TF-IDF
K-means clustering
Pattern library ✅ Auto-categorized
CLI interface ✅ TUI ❌ macOS app
JSON/Markdown export
Pluggable adapters
Zero config

Supported AI Tools

Tool Status Session Path
Claude Code Supported ~/.claude/projects/
OpenClaw / OpenCode Supported ~/.openclaw/ + ~/.opencode/sessions/
Cursor Planned --
Aider Planned --
Codex CLI Planned --
Gemini CLI Planned --

Usage

# Scan all detected AI tools
reprompt scan

# Scan specific source
reprompt scan --source claude-code

# Scan custom path
reprompt scan --path ~/custom/sessions

# Rich terminal report
reprompt report

# JSON output (for CI/pipelines)
reprompt report --format json

# Search your prompt history
reprompt search "authentication"
reprompt search "debug" --limit 5

# View your prompt library
reprompt library

# Filter by category
reprompt library --category debug

# Export prompt library as Markdown
reprompt library prompts.md

# Database stats
reprompt status

# Auto-scan after sessions
reprompt install-hook

# Cleanup old data
reprompt purge --older-than 90d

Configuration

Zero config by default. Customize with environment variables or TOML:

# Environment variables (prefix: REPROMPT_)
REPROMPT_EMBEDDING_BACKEND=ollama reprompt scan
REPROMPT_DB_PATH=~/custom/reprompt.db reprompt status
# ~/.config/reprompt/config.toml
[embedding]
backend = "tfidf"  # tfidf | ollama | local | openai

[storage]
db_path = "~/.local/share/reprompt/reprompt.db"

[dedup]
semantic_threshold = 0.85

[library]
min_frequency = 3

Optional Backends

pip install reprompt-cli[ollama]   # Ollama API embeddings
pip install reprompt-cli[local]    # sentence-transformers (CPU)
pip install reprompt-cli[openai]   # OpenAI API embeddings

Adding an Adapter

Create a new adapter by subclassing BaseAdapter:

from reprompt.adapters.base import BaseAdapter
from reprompt.core.models import Prompt

class MyToolAdapter(BaseAdapter):
    name = "my-tool"
    default_session_path = "~/.my-tool/sessions"

    def parse_session(self, path):
        # Parse session file -> list[Prompt]
        ...

    def detect_installed(self):
        return Path(self.default_session_path).expanduser().exists()

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reprompt_cli-0.2.0.tar.gz (179.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reprompt_cli-0.2.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file reprompt_cli-0.2.0.tar.gz.

File metadata

  • Download URL: reprompt_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 179.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reprompt_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eb08ba0d82c5aa69aa18aa13a7a66073c9c3020742906733742727473c733f87
MD5 93a7858f4cc584cde698fb2ed4ff57f1
BLAKE2b-256 ced8184f04eab8a71f7cd0be20da2cfa56b0ca47db101d4d35bc5b07e94812fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprompt_cli-0.2.0.tar.gz:

Publisher: publish.yml on reprompt-dev/reprompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reprompt_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: reprompt_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reprompt_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5be0ece05e8527ff27e37d99cca024df294a80fb8dbc6f62647d5d62b3f12c2
MD5 377926374ffe8fdd78efa4e7daf5da1f
BLAKE2b-256 52712b14c160251c4c90155d0e67337ac29d86ac1528d0c9c7d5779b1767fb5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprompt_cli-0.2.0-py3-none-any.whl:

Publisher: publish.yml on reprompt-dev/reprompt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page