A CLI tool for executing source files in the Codize Sandbox.
$ npm install -g @codize/cli
# without global installation
$ npx @codize/cli --helpGenerate your API key at codize.dev/settings/api-keys, then set the CODIZE_API_KEY environment variable or pass the --api-key flag:
$ export CODIZE_API_KEY="cdz_YourApiKeyHere"$ codize run main.tsYou can pass multiple files:
$ codize run main.ts utils.tsUse --json to get structured output for programmatic use:
$ codize run main.ts --json
{
"compile": {
"stdout": "",
"stderr": "",
"output": "",
"exitCode": 0
},
"run": {
"stdout": "Hello\n",
"stderr": "",
"output": "Hello\n",
"exitCode": 0
}
}