Skip to content

Repository files navigation

Codize CLI

NPM VersionGitHub Actions Workflow StatusGitHub License

A CLI tool for executing source files in the Codize Sandbox.

Installation

$ npm install -g @codize/cli
# without global installation
$ npx @codize/cli --help

Usage

Configuration

Generate your API key at codize.dev/settings/api-keys, then configure it using one of the following methods (listed in priority order):

  1. CLI flag:--api-key
  2. Environment variable:CODIZE_API_KEY
  3. Config file:codize config set api-key <key>
# Save API key to config file (recommended)
$ codize config set api-key cdz_YourApiKeyHere
# Or use an environment variable
$ export CODIZE_API_KEY="cdz_YourApiKeyHere"

The config file is stored at $XDG_CONFIG_HOME/codize/config.json (defaults to ~/.config/codize/config.json).

Running a File

$ codize run main.ts

You can pass multiple files:

$ codize run main.ts utils.ts

JSON Output

Use --json to get structured output for programmatic use:

$ codize run main.ts --json
{
"compile": {
"stdout": "",
"stderr": "",
"output": "",
"exitCode": 0
},
"run": {
"stdout": "SGVsbG8K",
"stderr": "",
"output": "SGVsbG8K",
"exitCode": 0
}
}

License

MIT

About

A CLI tool for executing source files in the Codize Sandbox.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages