Skip to main content
The Native API (boxlite_*) provides full-featured, flexible control over BoxLite with JSON configuration, streaming output callbacks, and advanced features like volumes and networking.

Box Creation

boxlite_create_box

Create and auto-start a box.

Parameters

Example

boxlite_start_box

Start or restart a stopped box.

boxlite_stop_box

Stop a running box.
Consumes the handle - do not use after calling.

boxlite_remove

Remove a box.

Parameters

boxlite_get

Reattach to an existing box.

Parameters

boxlite_box_id

Get box ID string from handle.
Caller must free the returned string with boxlite_free_string().

Command Execution

boxlite_execute

Execute a command with optional streaming output.

Parameters

Callback Signature

Example

Lifecycle Functions

boxlite_runtime_shutdown

Gracefully stop all running boxes.

Parameters

boxlite_runtime_free

Free a runtime instance.
Safe to call with NULL. Automatically frees all boxes.

Discovery & Introspection

boxlite_list_info

List all boxes as JSON.
Returns JSON array. Caller must free out_json with boxlite_free_string().

boxlite_get_info

Get single box info as JSON.

Parameters

boxlite_box_info

Get box info from handle as JSON.
Example JSON output:

Complete Native API Example