Getting Started · 1 of 3

Install & enable OxiScript

OxiScript ships built into oxidb-server. There is no separate install — if your server is v0.20 or newer, you already have it. This page just makes sure your environment is ready to run procedures.

1. Get a server running

# macOS (Apple Silicon)
curl -LO https://github.com/parisxmas/OxiDB/releases/download/v0.34.0/oxidb-server-v0.34.0-darwin-arm64.tar.gz
tar xzf oxidb-server-v0.34.0-darwin-arm64.tar.gz
./oxidb-server &

For Linux, Windows, Docker, or building from source, see the Quick Start.

2. Get the CLI

curl -LO https://github.com/parisxmas/OxiDB/releases/download/v0.34.0/oxidb-cli-v0.34.0-darwin-arm64.tar.gz
tar xzf oxidb-cli-v0.34.0-darwin-arm64.tar.gz
./oxidb --host 127.0.0.1 --port 4444

3. Confirm OxiScript is on

From a JSON client (Python, Go, raw netcat) send a compile_oxiscript command. If the server returns a step list, you're good.

{"cmd": "compile_oxiscript", "script": "proc ping() { return {ok: true} }"}

Response:

{"ok": true, "data": {
  "name": "ping",
  "params": [],
  "steps": [{"step": "return", "value": {"ok": true}}]
}}

4. Enable the REST API (optional)

If you want to call procedures over plain HTTP, set OXIDB_HTTP_PORT when starting the server:

OXIDB_HTTP_PORT=8080 OXIDB_DATA=./data ./oxidb-server

Now POST /api/procedures and POST /api/procedures/<name>/call are live.

5. Quick smoke test (Python)

import socket, struct, json

s = socket.create_connection(("127.0.0.1", 4444))
def send(payload):
    data = json.dumps(payload).encode()
    s.sendall(struct.pack("<I", len(data)) + data)
    n = struct.unpack("<I", s.recv(4))[0]
    return json.loads(s.recv(n))

print(send({"cmd": "create_procedure", "script": "proc hi(name) { return {hi: name} }"}))
print(send({"cmd": "call_procedure", "name": "hi", "params": {"name": "world"}}))
Already familiar with OxiDB? Procedures are stored in the special _procedures collection and survive restarts. The OxiScript compiler is exposed via the same TCP port as everything else.
Report Issue