Protect your intellectual property when using AI coding assistants. Your code is obfuscated before the AI sees it, then changes are transparently reversed.
package com.acme.billing; public class InvoiceService { private final CustomerRepository repo; public Invoice createInvoice( String customerId, double amount) { Customer c = repo.findById(customerId); return new Invoice(c, amount); } }
package pkg_dbb0472d; public class Cls_1019e8c4 { private final Cls_38a36e28 fld_0fb06a37; public Cls_074c3843 mtd_cd4dcc1c( String fld_a7c92e1b, double fld_9f720679) { Cls_b068b09e c = fld_0fb06a37.mtd_bbc8da48(fld_a7c92e1b); return new Cls_074c3843(c, fld_9f720679); } }
Packages, classes, methods, fields, and endpoints are renamed with deterministic HMAC hashes. The AI cannot infer your business domain.
Package hierarchy is flattened to a single level. com.acme.billing.service becomes pkg_a1b2c3d4.
pom.xml is sanitized: internal repos, SCM URLs, developer info, and credentials are removed. Dependencies are preserved.
application.properties and .yml files: passwords, tokens, and internal URLs are replaced with safe placeholders.
All comments are sanitized: Javadoc, block, and line comments are replaced with generic placeholders while preserving the exact line count (critical for lossless reverse-apply). README.md identifiers are replaced. No business context leaks.
Automatically detects Lombok, Spring Boot, Spring Data, JPA/Hibernate, Jackson, OpenAPI, Validation, Spring Config, and Spring REST. Protects field names, repository query methods (findByXxx), JPQL entity references, accessor methods, and obfuscates REST endpoint paths.
HTTP proxy mode intercepts API calls to Claude, Mistral, or any LLM, obfuscating on the fly.
Personally Identifiable Information (PII) in string literals is automatically detected and replaced with format-valid pseudonyms: email addresses, phone numbers, social security numbers, IBANs, credit cards, public IPs. Deterministic (same PII → same pseudonym across files).
Line-preserving 3-way merge keeps your original comments, Javadoc, and formatting for every line the AI didn’t touch — zero information loss. AI-generated variable names are translated to readable names. Auto-realignment when versions mismatch.
Verifies the obfuscated code compiles, identifies conflicting identifiers, and re-obfuscates until green. Exclusions are persisted across runs. Supports multi-module projects with parallel build commands.
Parallel Java file processing, AST caching (parse once, reuse), smart asset skipping, and parallel build verification.
One terminal profile: open a “PromptCape Claude” terminal and a wrapper script does it all — resolves the cache (and offers to obfuscate the project if it has not been done yet), starts the proxy in the background, cds into the workspace, and launches claude with ANTHROPIC_BASE_URL set. An auto-installed Stop hook prints “cache compiles OK — N files ready to apply” after every AI response. promptcape proxy --logs tails the live obfuscate/de-obfuscate stats per request so you can watch nothing leaks.
PII (Personally Identifiable Information) is any data that can identify a natural person — directly or indirectly. It includes names, email addresses, phone numbers, social security numbers, bank account numbers, IP addresses, and more. Under the GDPR (EU General Data Protection Regulation), sending PII to a third-party AI service without appropriate safeguards is a compliance risk.
PromptCape automatically detects PII inside Java string literals and configuration files, and replaces them with deterministic, format-valid pseudonyms before the code reaches the AI.
User user = new User(
"Jean Dupont",
"jean.dupont@acme.fr",
"+33 6 12 34 56 78"
);
String iban = "FR7630006000011234567890189";
String card = "4111 1111 1111 1111";
Cls_a1b2c3d4 fld_e5f6 = new Cls_a1b2c3d4(
"Jean Dupont",
"user_7f3a@example.com",
"+33 6 00 42 18 73"
);
String fld_9c8d = "FR00 0000 0000 7291 4063 812";
String fld_1a2b = "4000 0000 0000 3847";
Same PII always produces the same pseudonym — test assertions that compare values still pass. Private IPs (192.168.x.x, 127.0.0.1) and version numbers are preserved.
Fully supported. AST parsing via JavaParser: packages, classes, methods, fields, enums, records. Deterministic HMAC-based identifier obfuscation with package flattening.
Kotlin — parser integration planned (kotlinx.ast).
Python — via the built-in ast module.
JavaScript / TypeScript — via Babel or the TypeScript compiler API.
Scan your project, collect all identifiers under your base package, create an obfuscated workspace. Use --verify to auto-fix compilation errors by excluding conflicting identifiers.
promptcape obfuscate --base-package com.acme --verify ./my-project
Iterate with the AI until the build is green:
mvn compileLine-preserving merge: only AI-modified lines are de-obfuscated. Your original comments, formatting, and Javadoc are preserved — zero data loss.
promptcape apply
Verify and ship your real code:
mvn compile / mvn testIncludes launcher scripts for Windows, Linux, macOS, and Git Bash. Requires Java 25+.
Download ZIPStandalone executable, no Java required. Built with GraalVM native-image.
Download binaryA valid license is required to run PromptCape. Get your free license below.
Fill out this form and we'll send you a 6-month free license key within 24 hours.
Found a bug, have a question, or want to suggest a feature? Let us know.