warden command is a thin shell over the library. Every command takes --db <path> to
select the project database (default warden.db, or the WARDEN_DB environment variable).
Run
warden --help, or warden <command> --help, for the authoritative, version-specific
flag list. This page documents the commands as of the current release.Project lifecycle
warden version
warden version
Print the installed WARDEN version.
warden init
warden init
Create an empty project knowledge base.
warden demo
warden demo
Run the entire pipeline end-to-end on generated sample modules. No network or toolchain needed.
The fastest way to see what WARDEN does.
Ingest and inspect
warden ingest
warden ingest
Parse, fingerprint, and load a module version into the KB. Seeds names from the name section,
exports, and imports.
<wasm>: path to the.wasmfile (required).--glue, -g: optional Emscripten.jsglue (recovers version, dynCall sigs, pthread shape).--label, -l: version label (defaults to the filename stem).
warden versions
warden versions
List all ingested module versions.
warden coverage
warden coverage
Show symbol-coverage statistics for a version (named / by oracle / by human / by agent).
warden funcs
warden funcs
List functions for a version with their current names and provenance.
--unnamed: show only functions that still have no name.
warden show
warden show
Show everything known about a single function: type, stable id, calls, provenance, and evidence.
warden set-name
warden set-name
Set a human-verified name for a function. Human names are sovereign and locked against agent
overwrite by default.
The Oracle
warden oracle build
warden oracle build
Build (or extend) an Oracle signature store from labeled modules (modules that still carry a
name section).
<wasm...>: one or more labeled.wasmfiles.--out, -o: signature store path (defaultoracle.json).--emver: the Emscripten version these were built with (recorded on each signature).--opt: the opt level, e.g.-O2.
warden oracle identify
warden oracle identify
Identify runtime/libc functions in a version against a signature store, and infer the
Emscripten version from the distribution of matches.
--indexed: build a MinHash-LSH index over the store before matching, giving sublinear candidate lookup for large signature stores. Produces the same results as the default linear scan at any threshold above 0.82, but is significantly faster when the store exceeds a few thousand signatures.
Decompile and execute
warden lift
warden lift
Decompile a single function (or every function in a module) to readable pseudo-C using the
built-in pure-Python stack-machine lifter.
<label>: the version to lift (required).--index, -i: lift only function at indexN. Omit to lift the entire module.--out, -o: write output to a file instead of stdout.
warden export --format pseudo; that command now emits real pseudo-C
rather than a mnemonic dump.Example output for parse_token:warden exec
warden exec
Execute a single function in the built-in mini interpreter and print the return values.
Covers the integer instruction subset; no external toolchain is required.
<label>: the version containing the function (required).<index>: function index (required).[args...]: zero or more integer arguments passed to the function.
UnsupportedExecution when an instruction outside the supported subset is encountered.
For behavioral comparison across versions use warden diff or call
warden.interp.differential_execute from the Python API directly.warden analyze
warden analyze
Run the concurrency and struct-layout analyzers over a version and persist their findings as
KB facts. This populates the The command runs both analyzers in sequence:
thread_model and structs tables that were previously empty.- Concurrency analyzer: detects shared-memory access patterns, atomic sites, and pthread
markers; writes facts via
kb.add_thread_fact. - Struct analyzer: recovers struct layouts (name, field offsets, sizes, and inferred
types) from access patterns; writes records via
kb.upsert_struct.
warden show and in the HTML report produced by warden report.warden report
warden report
Generate a self-contained HTML reverse-engineering report for a version. The file has inline
CSS and requires no server to view.
--out, -o: output path (default<label>-report.html).
- A coverage summary (named / oracle / human / agent / unnamed).
- A confidence heatmap: every function colored by provenance and confidence score.
- A thread and memory model section (populated after
warden analyze). - The diff changelog from all prior
warden diffruns against this version.
Agents, diff, verify, export
warden agent
warden agent
Run one propose → verify → write-back sweep over unnamed functions. Auto-selects the OpenAI
backend when
OPENAI_API_KEY is set and the SDK is installed, then Anthropic when
ANTHROPIC_API_KEY is set, otherwise the deterministic offline backend.--strategy controls how functions are ordered and processed (default: call-graph).call-graph (default): walks the call graph bottom-up.- Builds the intra-module call graph. Direct calls are exact. Indirect calls (
call_indirect/dynCall) are over-approximated to table targets of the matching type, so the graph is a static skeleton. - Condenses strongly-connected components (mutual recursion) and sorts them into bottom-up layers. Every function in a layer has all of its defined callees in earlier layers.
- Runs the concurrency and struct analyzers first and routes their findings into per-function notes (atomic sites, struct layouts).
- Processes layers bottom-up. Each function is named with its callees’ recovered names already in view, carried in
FunctionFacts.callee_namesandFunctionFacts.notes. This is the main quality win over a flat pass. - Functions in the same layer are independent and are proposed concurrently via asyncio (blocking LLM backends run in worker threads, capped by
--concurrency, default 8). Writes still go through the provenance and confidence economy, so concurrent branches that share a callee cannot clobber each other.
flat: the original single-pass, leaves-first ordering. Available for comparison or when call-graph analysis is not needed.warden agent-backends
warden agent-backends
List agent backends, availability, required credentials, and default models. Use this before
a provider-backed run to confirm what auto-selection will see.
warden diff
warden diff
Diff two versions, carry annotations forward, and print the semantic changelog.
--no-carry: classify only; do not port annotations forward.
warden export
warden export
Export a deliverable. All formats are deterministic so they diff cleanly in git.
| Format | Output |
|---|---|
headers | A C header of recovered function prototypes. |
pseudo | Readable per-function listings with names and summaries. |
kb-text | A stable, git-diffable dump of every symbol. |
ghidra | A Python script that renames functions in the Ghidra WASM plugin. |
warden verify
warden verify
Verify ingestion determinism and report differential-equivalence readiness (whether a
wasm2c/w2c2 + C toolchain is present).
warden mcp
warden mcp
Serve the knowledge base over the Model Context Protocol (stdio). Requires
pip install -e '.[mcp]'. See the MCP reference.