Is there a free JavaScript obfuscator CLI? Yes. npx javascriptobfuscator-com runs with no account: it renames local variables and encodes string literals on your own machine, with no upload, no rate limit and no size cap. The output starts with a short comment naming the product; paid plans remove it and add the hosted transforms.
Does the CLI upload my code? Not for the free options when no credentials are configured; the CLI says so when it starts. Paid options, JSX or TypeScript input, or an API key send the files to the hosted engine. --engine local guarantees nothing is uploaded; --engine hosted always uses the hosted engine.
How do I obfuscate Node.js code from the command line? Add --target node. Node wraps every file in a module function, so the CLI can then rename top-level names too; require() specifiers and module.exports keys are kept so the module still loads.
How is it different from the javascript-obfuscator npm package? javascript-obfuscator is an open-source library that runs entirely on your machine. javascriptobfuscator-com runs this site’s engine: free options locally, paid transforms such as the Compressor, flattening, runtime defences and VM protection on the hosted engine. The two compared; the CLI converts a javascript-obfuscator options file with --migrate-javascript-obfuscator.