Versions
Set up
Section titled “Set up”npm install @reminix/sdkimport { createClient } from "@reminix/sdk";
const reminix = createClient(); // reads REMINIX_API_KEYpip install reminixfrom reminix import Reminix
reminix = Reminix() # reads REMINIX_API_KEYnpm install -g @reminix/clireminix loginexport REMINIX_API_KEY="<your API key>"Upload a version
Section titled “Upload a version”POST /v1/scripts/{slug}/versions
Uploads a new DRAFT version: the script’s folder (a .tar.gz, base64 — the CLI makes it), the command that runs it and the JSON Schema of its inputs.
await reminix.scriptVersions.create("unlock-account", { archive: "<archive>",});reminix.script_versions.create("unlock-account", archive="<archive>")reminix publish --draft [dir...], short for:
reminix script-versions create unlock-account --archive '<archive>'curl -X POST "https://api.reminix.com/v1/scripts/unlock-account/versions" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"archive":"<archive>"}'| Field | Description |
|---|---|
slug | |
command | What a run executes. {name} is an input; [ … ] is left out when its inputs are empty. Run as arguments, never through a shell. Omitted: worked out from the folder, or a 400 saying what to add. |
build | Replaces the usual install (requirements.txt, else pyproject.toml, into .deps; package.json with npm). Runs in the folder with the package registries reachable. |
inputSchema | The inputs, as JSON Schema. Omitted: a required text input for each {name} in the command (optional inside [ … ]). |
outputSchema | A JSON Schema document. |
archive | The script's folder as a .tar.gz, base64 — at most 10 MB, without its dependencies. |
hosts | The only hosts the script may reach (HTTPS). Omitted: no network. |
secrets | Secrets to attach to requests to some of hosts, by name. In each environment, the secret's value must allow at least one of them. |
env | Secrets the script reads as environment variables (only those whose owner allowed it). |
timeout | Seconds a run may take (default 30). Over 30 makes a LONG script: runs answer 202 at once and run durably, with live logs and progress, and can be cancelled. |
readme | README.md (markdown), shown on the script's page while this version is published. |
tags | When given, become the script's tags. |
via | How it was uploaded (for the history). Default: api. |
More about this endpoint
Leave the command out and it is worked out from the folder: pyproject.toml’s one script, package.json’s bin, start or main, or the folder’s one .py, .js, .ts or .sh file; leave the schema out and each {name} in the command is a text input. Its dependencies (requirements.txt, pyproject.toml, package.json) are installed now, once; a failed install answers 400 with what it printed. Runs keep using the published version until this one is published.
List a script’s versions
Section titled “List a script’s versions”GET /v1/scripts/{slug}/versions
Every version, newest first, and which one is published.
await reminix.scriptVersions.list("unlock-account");reminix.script_versions.list("unlock-account")reminix script-versions list unlock-accountcurl -X GET "https://api.reminix.com/v1/scripts/unlock-account/versions" \ -H "Authorization: Bearer $REMINIX_API_KEY"| Field | Description |
|---|---|
slug |
Publish a version
Section titled “Publish a version”POST /v1/scripts/{slug}/versions/{number}/publish
Makes this version the one every run uses — from the app, the API, agents and schedules.
await reminix.scriptVersions.publish("unlock-account", 3);reminix.script_versions.publish("unlock-account", 3)reminix script-versions publish unlock-account 3curl -X POST "https://api.reminix.com/v1/scripts/unlock-account/versions/3/publish" \ -H "Authorization: Bearer $REMINIX_API_KEY"| Field | Description |
|---|---|
slug | |
number |
More about this endpoint
Publishing an older version again rolls back. The script’s owner, or a workspace owner or admin. An agent’s publish (and anyone’s, when the workspace requires a second person) becomes a request a person approves — answered 202.
Test-run a version
Section titled “Test-run a version”POST /v1/scripts/{slug}/versions/{number}/runs
Runs one VERSION — a draft before publishing — with these inputs, as a test run: recorded with test: true, not counted as the script’s use, and without run events (no webhooks, no triggers).
await reminix.scriptVersions.run("unlock-account", 2);reminix.script_versions.run("unlock-account", 2)reminix script-versions run unlock-account 2curl -X POST "https://api.reminix.com/v1/scripts/unlock-account/versions/2/runs" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'| Field | Description |
|---|---|
slug | |
number | |
inputs | The script's inputs, by name. Default: none. |
via | How it was started (for the history). Default: api; agents' runs are recorded as mcp. |
More about this endpoint
For the version’s uploader, the script’s owner, or an owner or admin; the script’s approval policy still applies. Prove a draft works before asking a person to publish it.