TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Crane04/esem/llms.txt
Use this file to discover all available pages before exploring further.
esem CLI is a thin wrapper around node that automatically injects the --experimental-loader flag pointing at the bundled loader.js before your script. This means any JavaScript file that uses python: import syntax runs without any manual Node.js flag configuration — you replace node index.js with esem run index.js and the bridge is ready.
Installation
Theesem binary is registered automatically when you install the package. For project-local use, run via npx esem. For one-off use without installing first, use npx --package.
Commands
| Command | Description |
|---|---|
esem run <file.js> | Run a JS file with python: import support |
esem node <file.js> | Alias for run |
esem --version, -v | Print the version number |
esem --help, -h | Print help text |
<file.js> are forwarded to the child Node.js process unchanged.
Environment Variables
Path to the Python executable the bridge should use. Set this to point at a
virtual environment binary so the worker has access to your project’s
installed packages.
How It Works Internally
When you runesem run index.js, the CLI resolves the absolute path to loader.js inside the esem-bridge package directory and spawns a new Node.js child process like this:
stdio: "inherit" means all output from your script (including the Python worker’s stderr) flows directly to your terminal. The CLI exits with whatever exit code the child Node.js process produces.
Full Example
Node.js prints an
ExperimentalWarning about --experimental-loader when
the loader hook is active. This message is expected and does not affect the
functionality of your script. You can suppress it by setting the
NODE_NO_WARNINGS=1 environment variable if it clutters your output.