Repository navigation
CLI
estrogen [options] <dir>...
estrogen takes one or more already-built directories and rewrites the JS, HTML and
SVG in each, in place. It does not run a bundler. Give it the directory your
build wrote, such as dist.
estrogen dist
estrogen dist public/app-
-c,--config <file>: path to a TOML config file (names, canary, options). A command-line flag overrides the same setting in the file. See Configuration. -
--canary <file>: path to the canary list (JSON). estrogen checks every processed file against it and fails if any listed literal survives verbatim. -
--names <file>: path to the name map (proxy and store names to rename, and the store-name allow-list). -
--sourcemap <dir>: write source maps into<dir>, outside the build. Off by default. See Source maps. -
--seed <hex>: seed the randomness from a fixed value for reproducible output. Tests only. Never on a shipped build. -
-j,--jobs <n>: process up tonfiles in parallel. Default is the CPU count. -
--check: check only. Run the passes and the canary check without writing any file. Exit nonzero if a file would fail. -
--quiet: suppress progress output. Errors still print to stderr. -
-v,--verbose: print per-file detail (processed, skipped, and why). -
--version: print the version and exit. -
-h,--help: print usage and exit.
-
0: every directory was processed and every processed file passed the canary check. - nonzero: something failed. estrogen prints the file and the reason to stderr.
The exact nonzero values are not settled. Treat any nonzero exit as failure; do not branch on a specific number.
estrogen fails closed. If any file cannot be fully processed, the run fails: estrogen writes no partial output for that file, names the file and the reason on stderr, and exits nonzero. A build that cannot be fully protected fails the build. It never ships half done.
This matches the Node scripts estrogen replaces, which throw on a parse error, a store name not in the allow-list, a proxy name that falls across a regex escape, or a wasm literal in mixed base64 alphabets.
estrogen rewrites app chunks, inline scripts, HTML shells, and SVG cloaks. It never
rewrites a .map file, and never a file it has already processed. Vendored
transport assets are not re-obfuscated but are still canary-checked. Input is
UTF-8; a byte-order mark is kept, and non-ASCII inside a literal round-trips
unchanged.
See also Node API for the same surface from JavaScript.
@sysce/estrogen ·
Fracital/estrogen · ISC · by David Reed.
estrogen raises the cost of reading a build; it does not make it secret.