Registry / devops / cxpher

cxpher

JSON →
library2.2.3jsnpmunverified

cXpher (v2.2.3, active) is a JavaScript/TypeScript toolchain combining package management, bundling, encryption, and native binary compilation. It outputs single native executables for Linux, macOS, Windows across x64/x86/ARM64/ARM32 with multi-layer runtime protection: AES encryption of source, per-build randomized keys, debugger detection, and zero-disk source delivery. Unlike pkg, nexe, or Bun's --compile, cXpher does not embed plaintext or trivially-decompiled bytecode; it uses strong symmetric crypto and runtime hardening. It also functions as a full package manager with dependency resolution, content-addressable store, and parallel installs. Release cadence is regular with active maintenance.

npm install cxpher
INSTALL
IMPORT
SIG · CXPHER
C
cxpher
devopsjavascriptv2.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import cXpher from 'cxpher'
const cXpher = require('cxpher')
cXpher is ESM-only; CommonJS require throws ERR_REQUIRE_ESM.
compile
import { compile } from 'cxpher'
import compile from 'cxpher/compile'
Named export 'compile' is available from the main entry; no subpath export exists.
CompileOptions
import { CompileOptions } from 'cxpher'
import { CompileOptions } from 'cxpher/types'
Type is re-exported from main entry; no separate types subpath.

Demonstrates compiling a TypeScript entry point into an encrypted native binary with per-build key from environment variable.

import { compile } from 'cxpher'; const options = { entry: 'src/index.ts', output: 'dist/my-app', platform: 'linux-x64', encrypt: true, key: process.env.CXPHER_KEY ?? '' }; try { const result = await compile(options); console.log('Binary written to', result.path); } catch (err) { console.error('Compilation failed:', err.message); }
Debug
Known issues
breakingcXpher is ESM-only as of v2.0.0. require('cxpher') throws ERR_REQUIRE_ESM.
fix
Use dynamic import (import()) or switch project to ESM.
affects: >=2.0.0
deprecatedThe '--bundle' CLI flag is deprecated in v2.2.0; use '--compile' instead.
fix
Replace --bundle with --compile in CLI commands.
affects: >=2.2.0 <3.0.0
gotchaOutput binaries are tied to the OS/arch of the build host unless cross-compilation is explicitly configured. Building on macOS will produce a binary that does not run on Linux.
fix
Specify --platform flag or set CXPHER_PLATFORM env var to target a different architecture.
affects: >=1.0.0
gotchaEncryption key must be exactly 32 bytes (256-bit) for AES-256. cXpher does not perform key stretching; passing a short key silently truncates or pads it.
fix
Ensure key is 32 bytes (use crypto.randomBytes(32) or derive with scrypt).
affects: >=1.0.0
deprecatedThe global content-addressable store at ~/.cxpher/store is deprecated in v2.3.0 (not yet released). Use per-project lockfiles instead.
fix
Remove ~/.cxpher/store references; rely on lockfile in project root.
affects: >=2.3.0-beta
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Trying to require('cxpher') in a CommonJS context.
fix
Switch to ESM: add "type": "module" to package.json, or use dynamic import: const cXpher = await import('cxpher');
Error: Key must be 32 bytes. Received 16
Passing a key that is not exactly 32 bytes to the encryption routine.
fix
Generate a 32-byte key: crypto.randomBytes(32).toString('hex') and set as CXPHER_KEY.
Error: ENOENT: no such file or directory, open 'dist/cxpher.lock'
Running compilation without an existing lockfile; cXpher expects one after install.
fix
Run 'cxpher install' first to generate lockfile, or use --no-lockfile flag.
Error: Debugger detected! Binary will not run.
Attempting to run the compiled binary under a debugger (e.g., gdb, lldb, IDE debugger).
fix
Run the binary outside of debugger context. This protection is intentional and cannot be bypassed.
Upgrade
Version history
2.2.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
packagecxpher
cxpher — npm install cxpher · libregistry