Skip to main content

Open Prompt Initiative: Track, redact, and share AI coding tool usage across a team

Project description

OPI — Open Prompt Initiative

Track, redact, and share your AI coding tool usage across a team.

OPI extracts prompt sessions from tools like Claude Code, Codex CLI, and Gemini CLI, strips sensitive data, and exports them as JSON to a shared directory in your git repo. A pre-commit hook keeps everything in sync automatically.

Why

AI coding tools generate thousands of prompts, but that usage data stays siloed on each developer's machine. OPI makes it visible:

  • See what models your team is using — shields.io badges in your README show token counts per model
  • Share prompt history — exported sessions live in opi-prompts/ alongside your code
  • Keep secrets out of git — built-in redaction strips API keys, PII, file paths, and URLs before export

Install

# With uv (recommended)
uv tool install opi-cli

# Or with pip
pip install opi-cli

Or run without installing:

uvx opi-cli init

Quick start

cd your-repo

# Set up pre-commit hook and opi-prompts/ directory
opi init

# Run the pipeline: extract, redact, export, generate badges
opi update

That's it. On every commit, the pre-commit hook runs opi update to keep your prompt exports current.

Commands

Command Purpose
opi init Set up pre-commit hook in current git repo
opi update Extract, redact, export sessions, and generate README with badges
opi config Manage redaction settings
opi sources Show detected AI coding tools

Multi-user

Each developer runs opi update independently. Sessions export to opi-prompts/ which is committed to git. The generated README aggregates token usage from all users' exports, so badges reflect the full team's usage.

Redaction

By default, OPI redacts:

  • API keys and tokens (OpenAI, GitHub, AWS, etc.)
  • PII (email addresses)
  • File paths
  • URLs with credentials

Configure via opi config --edit or ~/.opi/config.toml:

[redact]
secrets = true
pii = true
file_paths = true
urls = true
org_terms = ["acme-corp", "internal-project"]

Supported tools

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

opi_cli-0.1.1.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

opi_cli-0.1.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file opi_cli-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for opi_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 616322dda06721a426e78a3ff5b2e0e009222ee9b4fcde10c9aa2aa9c58af206
MD5 47b3a6535ffab59bd6fea0207d4b109c
BLAKE2b-256 0fb313435b2e5c60962182bd5f681382e6839ebb5941244004e5eafe88caf99f

See more details on using hashes here.

Provenance

The following attestation bundles were made for opi_cli-0.1.1.tar.gz:

Publisher: publish.yml on kpister/opi

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

File details

Details for the file opi_cli-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for opi_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa089c07d6a3bb21e728c4899195b2e7cafc74f2d8678092a1a227e9a085569
MD5 33d97bc86570e88b671069fe73453bf8
BLAKE2b-256 0f042b142f3c801a6ad353c22e875075146496ed5fed27f0bfffcb3c7a1120dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for opi_cli-0.1.1-py3-none-any.whl:

Publisher: publish.yml on kpister/opi

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