phalus
Private Headless Automated License Uncoupling System — a self-hosted tool for AI-powered clean room software reimplementation. Feed it a dependency manifest and it runs a two-phase, isolation-enforced LLM pipeline: Agent A reads only public documentation and produces a formal specification, Agent B reads only that specification and implements the package from scratch.
No user accounts. No payments. No SaaS. You run it on your own machine with your own API keys.
Documentation | Website | crates.io

Install
From crates.io
Download binary
Pre-built binaries for Linux (x86_64, aarch64), macOS (Apple Silicon), and Windows are available from GitHub Releases.
# Linux (x86_64)
|
# macOS (Apple Silicon)
|
Docker
Build from source
&&
Quick Start
Set your API keys:
Preview what would be processed:
Run a single package through the full pipeline:
Run all packages in a manifest:
Dry run (Agent A only, produce specs without implementation):
Cross-language reimplementation:
Inspect results:
Re-validate existing output:
Supported Ecosystems
| Ecosystem | Manifest | Registry |
|---|---|---|
| npm | package.json |
registry.npmjs.org |
| Python | requirements.txt |
pypi.org |
| Rust | Cargo.toml |
crates.io |
| Go | go.mod |
proxy.golang.org |
How It Works
Manifest → Registry Resolver → Doc Fetcher → Agent A (Analyzer)
→ Isolation Firewall → Agent B (Builder) → Validator → Output
- Agent A reads only public documentation (README, API docs, type definitions) and produces a Clean Room Specification Pack (CSP) — 10 documents describing what the package does, never how.
- The Isolation Firewall enforces separation: Agent B never sees the original documentation or source code. Only the CSP crosses the boundary, logged with SHA-256 checksums.
- Agent B reads only the CSP and implements the package from scratch under your chosen license.
- The Validator checks syntax, runs tests, scores similarity against the original, and flags anything above threshold.
Every step is recorded in an append-only audit trail.
Configuration
~/.phalus/config.toml:
[]
= "anthropic"
= "claude-sonnet-4-6"
= ""
= "anthropic"
= "claude-sonnet-4-6"
= ""
[]
= 3
= 500
= 120
[]
= "context" # context | process | container
= "alpine:3"
= "256m"
= "1.0"
= 60
= "none"
= 64
[]
= 50
= 10
= 3
[]
= 0.70
= true
= true
[]
= "mit"
= "./phalus-output"
= true
= true
[]
= false
= "127.0.0.1"
= 3000
[]
= 500
= 10
= ""
All config keys can be overridden via environment variables with PHALUS_ prefix and double-underscore nesting:
PHALUS_LLM__AGENT_A_API_KEY=sk-ant-...
PHALUS_LLM__AGENT_A_MODEL=claude-sonnet-4-6
PHALUS_ISOLATION__MODE=process
PHALUS_WEB__ENABLED=true
Output Licenses
| License | ID |
|---|---|
| MIT | mit |
| Apache 2.0 | apache-2.0 |
| BSD 2-Clause | bsd-2 |
| BSD 3-Clause | bsd-3 |
| ISC | isc |
| Unlicense | unlicense |
| CC0 1.0 | cc0 |
Web UI
Enable the optional local web UI:
PHALUS_WEB__ENABLED=true
Or set web.enabled = true in config.toml. Serves on http://127.0.0.1:3000 by default.
Ethical Notice
This tool raises serious ethical and legal questions about open source sustainability. It exists for research, education, and transparent discourse — not to encourage license evasion. You are responsible for understanding the legal implications in your jurisdiction. The legality of AI-assisted clean room reimplementation is unsettled law.
Background
This project replicates the core pipeline demonstrated by Malus, presented at FOSDEM 2026 by Dylan Ayrey and Mike Nolan. PHALUS strips the concept down to the essential machinery: the pipeline, the isolation, and the audit trail.
License
0BSD