Skip to content

Versions

Terminal window
npm install @reminix/sdk
import { createClient } from "@reminix/sdk";
const reminix = createClient(); // reads REMINIX_API_KEY

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>",
});
FieldDescription
slugstring, path, required
commandstringWhat 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.
buildstringReplaces the usual install (requirements.txt, else pyproject.toml, into .deps; package.json with npm). Runs in the folder with the package registries reachable.
inputSchemaobjectThe inputs, as JSON Schema. Omitted: a required text input for each {name} in the command (optional inside [ … ]).
outputSchemaobjectA JSON Schema document.
archivestring, requiredThe script's folder as a .tar.gz, base64 — at most 10 MB, without its dependencies.
hostsarrayThe only hosts the script may reach (HTTPS). Omitted: no network.
secretsobjectSecrets to attach to requests to some of hosts, by name. In each environment, the secret's value must allow at least one of them.
envarraySecrets the script reads as environment variables (only those whose owner allowed it).
timeoutnumberSeconds 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.
readmestringREADME.md (markdown), shown on the script's page while this version is published.
tagsarrayWhen given, become the script's tags.
viastringHow 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.

GET /v1/scripts/{slug}/versions

Every version, newest first, and which one is published.

await reminix.scriptVersions.list("unlock-account");
FieldDescription
slugstring, path, required

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);
FieldDescription
slugstring, path, required
numbernumber, path, required
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.

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);
FieldDescription
slugstring, path, required
numbernumber, path, required
inputsobjectThe script's inputs, by name. Default: none.
viastringHow 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.