Introducing the Riza CLI

We're Riza and we make running untrusted code safe and easy. Today we're letting you run our Code Interpreter API locally via our new CLI.

The Riza CLI lets you run our Code Interpreter API in your own environment. When run locally, all data stays on your system.

Downloads are available for Linux or macOS. Additional operating system and architecture support is coming soon.

$ riza serve

The serve command runs the Riza Code Interpreter API. By default, we download and initialize our default Python and JavaScript runtime environments.

$ riza serve
-----> Loading Python
       Downloading WebAssembly module... done (2.46s).
       Compiling to machine code...	 done (51.93s).
       Caching... done (12.09ms).

-----> Loading JavaScript / TypeScript
       Downloading WebAssembly module... done (1.24s).
       Compiling to machine code...	 done (32.12s).
       Caching... done (24.76ms).
 
-----> Listening on localhost:3003

Our default Python and JavaScript environments are initialized once. Running serve again starts the local server almost instantly.

$ riza serve
-----> Loading Python (cached)
-----> Loading JavaScript / TypeScript (cached)
-----> Listening on localhost:3003

To load our default Ruby or PHP environments, pass the --lang option.

$ riza serve --lang php

With serve running, you can use our SDKs to talk to the API. You'll need to configure the base URL to point at the locally running server.

import rizaio

riza = rizaio.Riza(
    # Talk to the locally-running API server
    base_url = "http://localhost:3003",
)

resp = riza.command.exec(
    language="PYTHON",
    code="print('Hello, Riza CLI!')",
)

print(resp.stdout)

This is an early release of the CLI. If you'd like to see any additional features, drop us a message in Discord.