Skip to content

Commands ​

With a local installation, run npx codefend followed by one of these options. A global installation also supports codefend directly.

ShortLongAction
-i--initWrite .codefendrc.json in the current directory.
-c--checkReport selected configuration errors and warnings.
-o--obfuscateCheck the configuration, then generate the obfuscated source directory.
-v--versionPrint the installed Codefend version.
-h--helpPrint CLI usage.
bash
npx codefend --version
npx codefend --init
npx codefend --check
npx codefend --obfuscate

Run commands from the directory containing your configuration. Current CLI options do not accept a custom config path, a dry-run mode, or a watch mode.

In Codefend, --init overwrites an existing configuration and --obfuscate removes the configured output before generation. Review the configuration and output-directory guidance first.

The check command is not a complete schema, path-safety, or program-correctness validator. Inspect its printed diagnostics; some current failure paths do not return a failing process status, so exit status alone is insufficient for validation in automation.