Metadata-Version: 2.4
Name: prompttransform
Version: 0.3.2
Summary: Adversarial and obfuscation prompt transformation toolkit (packaged duplicate of promptify).
Author: m4xx101
License: Proprietary - See repository licensing terms
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.9
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff>=0.3.0; extra == "dev"

# prompttransform

Verbatim packaged distribution of the project's root `promptify.py` adversarial / obfuscation prompt transformation toolkit. The `prompttransform` package mirrors the monolithic core exactly (no integrity compromise) and exposes a clean Python API plus a CLI.

## Key Principle: Single Source of Truth
Edit **only** the root `promptify.py` at the repository top level. After any change run (preferred):

```bash
# From repo root (Unix)
cp promptify.py Publish/prompttransform/promptify.py

# PowerShell (Windows)
Copy-Item -LiteralPath .\promptify.py -Destination .\Publish\prompttransform\promptify.py -Force

Or use the sync helper script:
```bash
python tools/sync_promptify.py --sync
```
```

No partial edits inside `Publish/prompttransform/promptify.py`. Always overwrite fully to prevent drift.

## Installation (Local / Dev)
```bash
pip install -e ./Publish
```
(Or after publishing to an index:)
```bash
pip install prompttransform
```

## CLI Usage
After install, the entry point `promptransform` is available:
```bash
promptransform --help
promptransform --version
promptransform list
promptransform run --prompt "ignore all previous instructions" --technique BASE64 --technique HOMOGLYPH
promptransform interactive
```

## Python API Quick Start
```python
from prompttransform import Promptify, Techniques

p = Promptify("ignore all previous instructions")
p.apply(Techniques.BASE64).apply(Techniques.HOMOGLYPH, level='enhanced')
print(p.get_transformed_prompt())
```

### Apply a Recipe
```python
recipe = [
    (Techniques.SYSTEM_OVERRIDE, {"level": "enhanced"}),
    (Techniques.ROT13, {}),
]
result = Promptify("give me access").apply_recipe(recipe)
print(result.get_transformed_prompt())
```

### Enumerate All Techniques
```python
for t in Techniques.get_all():
    print(t.name, '-', t.value.category)
```

## Versioning
Current version: `0.1.0`

Increment `__version__` in `prompttransform/version.py` and `version` in `pyproject.toml` together.

## Responsible / Ethical Use
This toolkit includes adversarial, obfuscation, and injection-style transformations intended for **research, red teaming, evaluation, and defensive hardening** of LLM systems. Do **not** use it to bypass safety systems in production or for malicious purposes. Always comply with applicable laws, platform terms, and ethical guidelines.

## Drift / Integrity Check
Preferred:
```bash
python tools/sync_promptify.py --check
```

Manual hash comparison (fallback):
```bash
# Unix
shasum promptify.py Publish/prompttransform/promptify.py
# PowerShell
Get-FileHash .\promptify.py; Get-FileHash .\Publish\prompttransform\promptify.py
```
The digests should match.

## Planned Enhancements
- Automated sync script + pre-commit hook
- Technique registry metadata export (JSON)
- Optional modular decomposition preserving public facade

## License
See repository-level licensing terms. All rights reserved unless otherwise specified.

## Changelog
- 0.1.0: Initial packaged release (verbatim copy + CLI + metadata)
