Skip to main content
The scriptit CLI drives your Script.it sandbox from your machine. Use it to run scripts, read their logs, check triggers, run shell commands and move files without opening the browser. It’s also how coding agents such as Claude Code and Codex work in Script.it. The CLI is a thin remote client. Every command runs in your Script.it sandbox, not on your machine: no script executes locally, and your integration credentials are never copied to your machine. Everything you run lands in a session you can watch live in the app.

Install

You need Python 3.9 or newer and a Script.it account. Install the CLI in its own environment with uv or pipx:
uv tool and pipx keep the CLI’s dependencies out of your projects. To install the latest unreleased version instead, use git+https://github.com/script-it/cli.git in place of scriptit-cli. Check that it installed:
To update or remove it, run uv tool upgrade scriptit-cli or uv tool uninstall scriptit-cli (or the pipx equivalents).

Sign in

1

Open the approval page

The CLI prints a short code such as AB12-CD34 and opens Script.it in your browser. Where no browser can open — over SSH, in a container, or when a coding agent runs the command — it prints the link instead. Open it in any browser where you’re signed in to Script.it.
2

Enter the code

The page says a scriptit CLI is asking to connect to your Script.it account. Only continue if you started this login yourself. Type the code your terminal shows, then click Connect CLI.
3

Done

The page shows CLI connected, and the terminal finishes signing in on its own.
The link carries nothing anyone else can sign in with, so it’s safe to pass through a chat. If the command is interrupted before you approve, run it again: it resumes the same link. Add --no-browser to always print the link instead of opening a window. Your password never reaches the CLI. It stores a refresh token in ~/.config/scriptit/credentials.json, readable only by you.
Organizations decide whether members can use the CLI and other outside agents, with the Use third-party agents permission. If it’s turned off for you, signing in fails with “Your organization has not allowed you to use this account from a third-party agent or the CLI.” See Roles and permissions.

Sessions

Every command runs inside a session — the same kind of session the in-app agent works in. The CLI keeps one current session across commands and shells until you start another.
The session appears in the app like any other. Each command you run shows up there as it runs, so you — or a teammate — can watch the work, open its files, and stop a command. Commands run in the session’s own directory. Your workspaces are mounted inside it, so a script at /workspaces/<workspace-id>/my-script is also workspaces/<workspace-id>/my-script from where commands run. Changes you make there show up in the app at once. data_files/ is the session’s own scratch space. To run one command in a different session without changing the current one, set SCRIPTIT_SESSION:
The CLI works in the sandbox of your active account — the one you have selected in Script.it — and its work uses that account’s credits, like any session.

Run scripts and check on them

scriptit start takes a script’s name from skills list and finds it across your workspaces.

Run shell commands

--timeout is enforced in the sandbox, so a command that runs too long stops there with exit code 124. A session runs one command at a time; a second command waits for the first. There’s no interactive shell, so commands that need keyboard input, such as vim, can’t work. If your sandbox is paused, any command wakes it and waits until it’s ready.

Move files

A relative path in the sandbox starts in the session’s directory, the same place exec runs.

Which commands are which

The CLI answers auth, context, exec, fs, session, sandbox and version itself. Every other command — start, status, logs, wait, validate, describe, trigger, integrations, skills and the rest — is passed to Script.it and answered there. New platform commands work without updating the CLI. scriptit --help covers the CLI’s own commands. scriptit describe --concepts covers the rest. Add --json to any of the CLI’s own commands for machine-readable output. Standard output becomes exactly one JSON document, and progress, warnings and errors go to standard error. On a failure the document is {"error": "..."} and the exit code is non-zero.

Set up a coding agent

The CLI was built for coding agents. Install it, sign in, then install the Script.it skill so the agent knows how to use it.
In Claude Code, the plugin also connects Script.it’s MCP server; sign in to it from /mcp. For a host that reads only an AGENTS.md file, paste the skill’s contents there. Then tell the agent: Use Script.it. The skill has the agent start a session and fetch that session’s instructions with scriptit context, so it always works from your current integrations and scripts. Set SCRIPTIT_CLIENT to label the session with the agent driving it, such as claude-code or codex.

Companion mode

While a coding agent does the work, you can hide the app’s built-in chat and keep Script.it open as a view of what the agent is doing.
  • Go to Settings → Account, and under Appearance click Enter companion mode.
  • The agent’s links to scripts and connection screens also open in companion mode.
  • To leave, click the button in the bottom-right corner — it reads Companion mode, or Connected with the agent’s name — which turns into Exit companion mode when you point at it. Or click Exit companion mode in Settings → Account.

Let the agent show you its work

An agent can drive Script.it through the CLI but has no signed-in browser. scriptit auth browser-url prints a one-time link that opens the app already signed in as you:
The link lends this machine’s sign-in to a browser. It works once, expires after 60 seconds, and you get an email when one is used from somewhere new. Treat it like a password for that minute. It’s available on Script.it’s cloud only.

Exit codes

Environment variables