CLI Getting Started

Get up and running with the Scriptling command-line interface.

Installation

Homebrew (macOS & Linux)

brew install paularlott/tap/scriptling

The SQLite, SQL, Valkey and BadgerDB database plugins are compiled in.

A smaller build without them is available: see Slim Build. For 1Password service accounts in scriptling.secret, see 1Password Builds.

GitHub Releases

Download pre-built binaries from GitHub Releases:

  • Linux (AMD64, ARM64)
  • macOS (AMD64, ARM64)
  • Windows (AMD64, ARM64)

Build from Source

git clone https://github.com/paularlott/scriptling.git
cd scriptling

# Build CLI for current platform
make build

# Run scripts
./bin/scriptling script.py

Your First Script

Create a file called hello.py:

name = "World"
print(f"Hello, {name}!")

# Use standard libraries
import json
import math

data = json.dumps({"numbers": [1, 2, 3]})
print(data)
print(f"sqrt(16) = {math.sqrt(16)}")

Run it:

scriptling hello.py

Interactive Mode

Launch the REPL to experiment:

scriptling --interactive

Pipe a Script

echo 'print("Hello")' | scriptling

HTTP Server

Server modes evaluate a startup script before accepting requests. Create setup.py for any one-time initialization:

print("Server initialized")

Then run Scriptling as an HTTP server:

scriptling --server :8000 setup.py

MCP Server

The same startup script can initialize a Model Context Protocol server; tools are loaded from the directory passed to --mcp-tools:

scriptling --server :8000 --mcp-tools ./tools setup.py

Slim Build

scriptling-slim is the same CLI without the compiled-in database plugins (it is mutually exclusive with scriptling); the drivers can still be loaded at runtime from their own formula:

brew install paularlott/tap/scriptling-slim
brew install paularlott/tap/scriptling-plugins
export SCRIPTLING_PLUGIN_DIR="$(brew --prefix)/opt/scriptling-plugins/libexec/plugins"

Release zips name the binary scriptling whether default or slim. See Plugins for how plugins load and the database reference for the APIs.

1Password Builds

Two more builds add 1Password service account support to scriptling.secret, so its onepassword provider accepts a service_account_token as well as 1Password Connect. They are otherwise the same as scriptling and scriptling-slim, and add about 14 MB:

brew install paularlott/tap/scriptling-onepassword        # database plugins compiled in
brew install paularlott/tap/scriptling-slim-onepassword   # without the database plugins
Formula / release zip Database plugins 1Password service accounts
scriptling compiled in —
scriptling-slim load with scriptling-plugins —
scriptling-onepassword compiled in yes
scriptling-slim-onepassword load with scriptling-plugins yes

All four install the same scriptling command, so install only one; every release zip names the binary scriptling. 1Password Connect works in all of them. See 1Password service accounts for configuration.

Next Steps