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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616322dda06721a426e78a3ff5b2e0e009222ee9b4fcde10c9aa2aa9c58af206
|
|
| MD5 |
47b3a6535ffab59bd6fea0207d4b109c
|
|
| BLAKE2b-256 |
0fb313435b2e5c60962182bd5f681382e6839ebb5941244004e5eafe88caf99f
|
Provenance
The following attestation bundles were made for opi_cli-0.1.1.tar.gz:
Publisher:
publish.yml on kpister/opi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opi_cli-0.1.1.tar.gz -
Subject digest:
616322dda06721a426e78a3ff5b2e0e009222ee9b4fcde10c9aa2aa9c58af206 - Sigstore transparency entry: 1059796756
- Sigstore integration time:
-
Permalink:
kpister/opi@48e60f786b4e5458461e387cabc9cb4baa97c28f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kpister
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@48e60f786b4e5458461e387cabc9cb4baa97c28f -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfa089c07d6a3bb21e728c4899195b2e7cafc74f2d8678092a1a227e9a085569
|
|
| MD5 |
33d97bc86570e88b671069fe73453bf8
|
|
| BLAKE2b-256 |
0f042b142f3c801a6ad353c22e875075146496ed5fed27f0bfffcb3c7a1120dd
|
Provenance
The following attestation bundles were made for opi_cli-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on kpister/opi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opi_cli-0.1.1-py3-none-any.whl -
Subject digest:
dfa089c07d6a3bb21e728c4899195b2e7cafc74f2d8678092a1a227e9a085569 - Sigstore transparency entry: 1059796758
- Sigstore integration time:
-
Permalink:
kpister/opi@48e60f786b4e5458461e387cabc9cb4baa97c28f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kpister
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@48e60f786b4e5458461e387cabc9cb4baa97c28f -
Trigger Event:
release
-
Statement type: