Adversarial and obfuscation prompt transformation toolkit (packaged duplicate of promptify).
Project description
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):
# 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:)
pip install prompttransform
CLI Usage
After install, the entry point promptransform is available:
promptransform --help
promptransform --version
promptransform list
promptransform run --prompt "ignore all previous instructions" --technique BASE64 --technique HOMOGLYPH
promptransform interactive
Python API Quick Start
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
recipe = [
(Techniques.SYSTEM_OVERRIDE, {"level": "enhanced"}),
(Techniques.ROT13, {}),
]
result = Promptify("give me access").apply_recipe(recipe)
print(result.get_transformed_prompt())
Enumerate All Techniques
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:
python tools/sync_promptify.py --check
Manual hash comparison (fallback):
# 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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 prompttransform-0.3.2-py3-none-any.whl.
File metadata
- Download URL: prompttransform-0.3.2-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72f53d47c1931a14248dc9a8c11234a77c9cd0ca73f35f43a2b24aa7a75c1e0b
|
|
| MD5 |
e8cf746b467fe0797564676ce66a93e5
|
|
| BLAKE2b-256 |
162752a34191d9c89d979c2cec9b9ce6483af25274e957665062c72f188586f8
|