@adam903/pvc
v1.0.5
Published
**Prompt Version Control (PVC)** is a CLI tool designed to track, analyze, and version control your AI coding sessions. It captures user prompts, assistant responses, and file edits, creating detailed reports to help you audit and improve your AI-assisted
Readme
PVC - Prompt Version Control (
)
Prompt Version Control (PVC) is a CLI tool designed to track, analyze, and version control your AI coding sessions. It captures user prompts, assistant responses, and file edits, creating detailed reports to help you audit and improve your AI-assisted workflow.
📦 Installation
npm install -g @adam903/pvcNote: Requires a valid
prismasetup. The installer will automatically runprisma generateto prepare the database client.
🚀 Getting Started
1. Global Authentication
Log in once to authenticate. PVC uses SSH key challenge-response for secure authentication. Your session is stored globally, so you don't need to login for every project.
pvc login --ssh2. Initialize a Project
Navigate to your project root and initialize PVC. This creates a .pvc directory and local configuration.
cd my-project
pvc init3. Link Remote Workspace
Connect your local project to a remote PVC workspace to enable syncing.
pvc remote add <workspace-url>🛠️ Core Commands
pvc watch
The heart of PVC. Starts a process that monitors your local AI session logs (e.g., from an IDE extension). It detects:
- Prompts & Responses: What you asked and what the AI answered.
- File Edits: Changes made to your codebase.
- Security Risks: fast scans for leaked secrets in prompts or files.
pvc watch
# Or watch a specific session
pvc watch --session=<session-id>pvc update-conv
Updates the local configuration with the ID of the most recent AI session found in your logs.
pvc update-conv⚙️ Configuration
PVC uses a tiered configuration system:
- Global Config: Stores authentication tokens (
userId,sessionToken).- Windows:
%APPDATA%\pvc\config.json - macOS/Linux:
~/.pvc/config.json
- Windows:
- Local Config: Stores project specifics (
workspaceId,remoteUrl).- Path:
./.pvc/config.json
- Path:
🛡️ Security
PVC includes a built-in risk analyzer that checks for:
- Secrets: API keys, tokens, passwords (using Gitleaks rules).
- Sensitive Files: Uploading
.envor certificates to the AI context.
Blocked prompts are logged locally and prevented from being sent if configured.
License
MIT
