0BSD · Self-Hosted · No SaaS · No Excuses

PHALUS

Private Headless Automated License Uncoupling System

All the ethical ambiguity of AI-powered clean room reimplementation, but you run it yourself. No cute marketing site. No fake testimonials from "Dr. Heinrich Offshore." No offshore subsidiaries. Just a Rust binary, your API keys, and whatever you tell your lawyers.

$0
SaaS Markup
0
Cloud Accounts Required
Plausible Deniability

Open Source Has Terms & Conditions

Apparently "free as in freedom" doesn't mean "free as in do whatever you want and pretend you wrote it." Who knew.

§

The AGPL Exists

One careless npm install and suddenly your proprietary SaaS must disclose its source. Your investors are calling. Your lawyers are crying. Your quarterly report is weeping.

©

Attribution Is Hard

Keeping track of 2,000+ transitive dependencies and their license terms? That's not engineering, that's archaeology. And your compliance team bills by the hour.

Copyleft Is Contagious

Some licenses require you to share your improvements. Your board didn't raise $40M in Series B so you could give code to strangers on the internet.

Compliance Costs Money

Third-party audits. License scanners. Legal reviews. All so you can use a left-pad function some maintainer wrote in eleven lines.

⚠ Ethical Notice: The above problems are real. The solution this tool provides is ethically questionable and legally untested. It exists for research, education, and to make the point that AI has made clean room reimplementation trivially cheap. If that doesn't concern you, it should.

Same Pipeline. No Middleman.

Malus showed the world this was possible. PHALUS lets you do it in your basement.

malus.sh (SaaS)

×Their robots, their servers
×Pay-per-KB pricing via Stripe
×"MalusCorp-0 License" — proprietary output license
×Indemnification via offshore subsidiary
×Testimonials from "Patricia Bottomline"
×Fun marketing site with confetti animations

phalus (Self-Hosted)

Your machine, your API keys
Free. 0BSD. Forever.
You pick the output license (MIT, Apache, BSD, etc.)
Indemnification via your own risk tolerance
Zero testimonials from anyone, real or fictional
This brutalist site with scanline overlays

How License Uncoupling Works

Two AI agents. One firewall. Zero eye contact with source code. Legal precedent since 1984.

01

Feed It a Manifest

Drop in your package.json, requirements.txt, Cargo.toml, or go.mod. PHALUS resolves every dependency against the live registry. It knows what you depend on. It judges silently.

$ phalus plan package.json Resolving 47 packages from npm registry... ├── [email protected] 3.2 KB MIT ├── [email protected] 2.1 KB MIT ├── [email protected] 211 KB MIT └── ... 44 more Total: 2.4 MB across 47 packages
02

Agent A: The Reader

Agent A reads only public documentation — READMEs, API docs, type definitions. Never a single line of source code. It produces a Clean Room Specification Pack (CSP): 10 documents describing what the package does, never how. Think of it as the world's most thorough product requirements doc, written by an AI that takes clean room protocol more seriously than your compliance team.

03

The Isolation Firewall

Agent B has never met Agent A. They don't share context, state, or API sessions. The only thing that crosses the boundary is the CSP, logged with SHA-256 checksums. This is the legal core — provable separation between the documentation reader and the code writer. Phoenix Technologies did this with humans in 1984. We do it with LLMs in 2026.

04

Agent B: The Builder

Agent B reads only the CSP and uses a symbiont reasoning loop to iteratively implement the package from scratch. It writes code, checks API completeness, resolves missing imports, and repeats until done. It has provably never seen the original code, the original docs, or even the package name's npm page. The output is functionally equivalent, independently derived code. Yours to do with as you please. Allegedly.

05

Validation & Audit

The validator checks syntax, runs tests, and scores similarity against the original. Anything above threshold gets flagged. Every step is recorded in an append-only audit trail — because if you're going to do something legally dubious, you should at least have really good paperwork.

$ phalus inspect ./phalus-output --audit [email protected] ├── CSP: 10 documents, SHA-256 verified ✓ ├── Firewall: context isolation, no leak ✓ ├── Syntax: valid ✓ ├── Tests: 3/3 passing ✓ ├── Similarity: 0.23 (threshold: 0.70) ✓ └── License: MIT (user-selected) ✓

Schema-Enforced Specifications

Agent A now produces structured, machine-parseable specs. Agent B can actually read them.

📐

Prescribed JSON Schemas

All 10 CSP documents now follow strict JSON schemas with typed fields. 02-api-surface uses a structured exports array. 09-test-scenarios has concrete input/output pairs. No more unstructured blobs.

🔍

Gap-Category Directives

8 explicit directives ensure Agent A covers merge algorithms, type-detection cascades, serialization semantics, interface contracts, default behaviors, security mechanisms, enum values, and sentinel values. The stuff that actually trips up reimplementors.

🔗

Fixed Completeness Checker

Agent B's check_completeness now correctly parses the structured API surface, including nested static_methods and instance_methods. The agentic self-correction loop is no longer blind.

📦

All-JSON Format

Every CSP document uses .json extension. No more JSON-masquerading-as-markdown. Consistent, validatable, and honest about what it is.

# CSP output is now structured JSON across all documents
$ phalus run-one npm/[email protected] --output ./out
 
$ ls out/left-pad/.cleanroom/csp/
01-overview.json 06-type-definitions.json
02-api-surface.json 07-error-catalog.json
03-behavior-spec.json 08-compatibility-notes.json
04-edge-cases.json 09-test-scenarios.json
05-configuration.json 10-metadata.json

Installation Takes 30 Seconds

The moral reckoning takes longer.

Option 1: Install from crates.io

$ cargo install phalus

Option 2: Download binary

# Linux (x86_64)
$ curl -L https://github.com/phalus-sh/phalus/releases/latest/download/phalus-v0.7.0-x86_64-unknown-linux-gnu.tar.gz | tar xz
$ sudo mv phalus /usr/local/bin/
 
# macOS (Apple Silicon)
$ curl -L https://github.com/phalus-sh/phalus/releases/latest/download/phalus-v0.7.0-aarch64-apple-darwin.tar.gz | tar xz
$ sudo mv phalus /usr/local/bin/

Option 3: Docker

$ docker run -p 3000:3000 \
-e PHALUS_LLM__AGENT_A_API_KEY=sk-ant-... \
-e PHALUS_LLM__AGENT_B_API_KEY=sk-ant-... \
ghcr.io/phalus-sh/phalus:latest

Option 4: Build from source

$ git clone https://github.com/phalus-sh/phalus.git
$ cd phalus && cargo build --release

Quick Start

# Set your API keys (your models, your bill)
$ export PHALUS_LLM__AGENT_A_API_KEY=sk-ant-...
$ export PHALUS_LLM__AGENT_B_API_KEY=sk-ant-...
 
# Liberate a package
$ phalus run-one npm/[email protected] --license mit
 
# Or process an entire manifest
$ phalus run package.json --license apache-2.0 --output ./reimplemented
 
# Launch the web UI
$ phalus serve
PHALUS web UI running at http://127.0.0.1:3000
 
# Scan dependency licenses first (new in v0.7.0)
$ phalus scan . --save
 
# Inspect your ethically ambiguous output
$ phalus inspect ./phalus-output --audit --similarity

Supported Ecosystems

Ecosystem Manifest Registry
npmpackage.jsonregistry.npmjs.org
Pythonrequirements.txtpypi.org
RustCargo.tomlcrates.io
Gogo.modproxy.golang.org

This Tool Raises Questions

We think you should read the answers before using it.

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. The legality of AI-assisted clean room reimplementation is unsettled law.

Questions You Should Be Asking

Is this legal?

Clean room reimplementation has legal precedent going back to Phoenix Technologies' 1984 IBM BIOS clone and Baker v. Selden (1879). Whether that precedent extends to AI-assisted reimplementation is, to use the legal term, completely untested. You are your own legal counsel here. We are a Rust binary, not a law firm.

How is this different from Malus?

Malus is a SaaS product with a payment page, a marketing site, and testimonials from "Dr. Heinrich Offshore." PHALUS is the same two-agent pipeline running on your machine, with your API keys, under a 0BSD license. No cloud. No accounts. No middleman taking a cut of your moral compromise.

What about the original developers?

This is the question that matters. Clean room reimplementation — whether done by humans in 1984 or AI in 2026 — fundamentally challenges the social contract of open source. PHALUS exists to make that challenge visible, not to celebrate it. If the ease of this tool concerns you, good. It should.

Can the output actually pass legal review?

Every run produces a full audit trail: SHA-256 checksums at the firewall boundary, provable agent isolation, similarity scoring against the original. Whether that paperwork satisfies your lawyers depends on your lawyers, your jurisdiction, and how much your lawyers charge per hour.

What if the similarity score is too high?

The validator flags anything above your configured threshold (default: 0.70). Some things — like left-pad — have very few correct implementations. If two separate authors independently write the same eleven lines, is that infringement or mathematics? Ask a philosopher. Or a judge. PHALUS just reports the number.

Why is it called PHALUS?

Private Headless Automated License Uncoupling System. The acronym is unfortunate. The name is accurate. We considered alternatives but decided that if you're going to build a tool for ethically ambiguous license circumvention, you might as well commit to the bit.

Can I see the robots?

There are no robots. There are two LLM API calls with a SHA-256 checksum between them. You can see exactly what happens by reading the source code, which is 100% open, unlike whatever you're about to do with the output.

██████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ██╗███████╗ ██╔══██╗██║ ██║██╔══██╗██║ ██║ ██║██╔════╝ ██████╔╝███████║███████║██║ ██║ ██║███████╗ ██╔═══╝ ██╔══██║██╔══██║██║ ██║ ██║╚════██║ ██║ ██║ ██║██║ ██║███████╗╚██████╔╝███████║ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚══════╝

Ready to Uncouple Your Licenses?

Join the zero people who've publicly admitted to using this tool.