Metadata-Version: 2.4
Name: ghostcode
Version: 0.5.0
Summary: Privacy proxy for developers — hide business context before sharing code with AI
Author: Smit Vaishanav
License: MIT
Project-URL: Homepage, https://github.com/smitvaishnav/anti-ai
Project-URL: Repository, https://github.com/smitvaishnav/anti-ai
Project-URL: Issues, https://github.com/smitvaishnav/anti-ai/issues
Keywords: privacy,security,ai,llm,code-anonymization,ghostcode
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: click>=8.1.0
Requires-Dist: libclang>=16.0.0
Requires-Dist: cryptography>=41.0.0
Requires-Dist: pyyaml>=6.0
Dynamic: requires-python

# GhostCode — Privacy Proxy for Developers

**Hide your business logic before sharing code with LLMs. Local-first, open-source, zero telemetry.**

GhostCode replaces your private symbols (variable names, functions, strings, comments) with opaque ghost tokens before you share code with AI. The AI sees `gv_001` instead of `customer_revenue`. When you get your answer back, GhostCode restores everything.

## Installation

```bash
pip install ghostcode
```

## Quick Start

```bash
# Hide a file (Level 2: names + comments + literals)
ghost hide my_code.py --level 2

# Paste the ghost output into ChatGPT/Claude, get a response, save it

# Reveal — restore original names in the AI's response
ghost reveal ai_response.py --map-file .ghostcode/maps/my_code_*.json
```

## Privacy Levels

| Level | What it does |
|-------|-------------|
| 1 | Rename symbols + strip comments |
| 2 | + Scrub string/numeric literals |
| 3 | + Function isolation with stubs |
| 4 | + Dimension generalization |

## Pre-Send Risk Report

Every `ghost hide` shows a risk assessment:
- Symbols and literals scrubbed/flagged/kept
- Structural patterns visible to the AI
- **Estimated domain exposure: LOW / MEDIUM / HIGH**

## VS Code Extension

Install the [GhostCode VS Code extension](https://marketplace.visualstudio.com/items?itemName=SmitVaishanav.ghostcode) for one-click hide/reveal buttons in the editor toolbar.

## Supported Languages

- Python (.py)
- C/C++ (.cpp, .cc, .c, .h, .hpp)

## Features

- 🔒 **AST-based symbol renaming** — not regex, real parsing
- 📊 **Smart literal scrubbing** — keeps `0`, `1`, `pi`; scrubs URLs, API keys, business strings
- 🗺️ **Ghost Map** — bidirectional mapping stored as JSON
- 🔐 **Encrypted maps** — optional AES encryption for map files
- 📋 **Audit logging** — immutable JSON logs for compliance
- 🔄 **Round-trip reveal** — restores names in both code and AI explanations
- ⚡ **Zero cloud, zero telemetry** — everything runs locally

## License

MIT
