Quick Install
Install the kite binary on your local machine using your preferred setup:
curl -fsSL https://starkite.run/install.sh | sh
brew install project-starkite/tap/kite
irm https://starkite.run/install.ps1 | iex
Running Starkite Scripts
1. Run via the kite CLI
Starkite scripts run through the kite CLI. The kite run command (or its implicit shorthand) accepts any .star file and forwards --var arguments to the script — suitable for ad-hoc invocation, CI pipelines, and pipeline composition with other tools.
$ kite run ./deploy.star
# shorthand — `run` is implicit
$ kite ./deploy.star --var image_tag=v1.0.0
# pipe results to other tools
$ kite ./manifest.star | kubectl apply -f -
2. Execute via shebang
A starkite script with a #!/usr/bin/env kite shebang and the executable bit set runs like any other shell program. The kite prefix is not required at the call site.
$ cat deploy.star
#!/usr/bin/env kite
print("rolling out v1.0.0")
$ chmod +x deploy.star
$ ./deploy.star
rolling out v1.0.0
One Binary. Complete Automation.
Standard Library
Thirty built-in modules cover everyday automation: container runtimes (Docker/Podman), remote SSH fleets, files, processes, databases (SQL), HTTP client and server, JSON, YAML, CSV, gzip/zip, hashing, regex, templating, time, UUIDs, structured logging, retries, and concurrency. Every module is built directly into the runtime, eliminating the need for a Python venv, Node install, or external package manager.
Browse modules#!/usr/bin/env kite
# Spin up an HTTP API server in a few lines
def health(req):
return {"status": 200, "body": {"ok": True}}
def echo(req):
return {"status": 200, "body": req.body}
http.serve({
"GET /health": health,
"POST /echo": echo,
}, port=8080)
Cloud-Native
Starkite delivers unified infrastructure automation across three tiers without external CLI dependencies: direct container engine management over Docker and Podman daemon sockets (containers), agentless remote server fleet orchestration through SSH bastions (ssh, fleet), and cluster platform engineering with declarative controllers and admission webhooks (k8s).
#!/usr/bin/env kite
# Orchestrate multi-tier cloud-native infrastructure
def main():
# 1. Start ephemeral container dependency
dockr = containers.config()
db = dockr.run("postgres:16-alpine", detach=True, ports={"5432/tcp": 0})
defer(lambda: (dockr.stop(db), dockr.delete(db)))
# 2. Deploy matching Kubernetes service
k8s.deploy(name="app-backend", image="ghcr.io/org/app:v1", replicas=2)
# 3. Verify fleet node connectivity over SSH
nodes = ssh.config(hosts=["edge-1", "edge-2"], auth={"user": "deploy"})
for r in nodes.exec("systemctl status app-agent"):
print(r.host, "Agent status:", r.ok)
Agentic AI
Supercharge your AI-native automation. Starkite integrates with LLMs and agent harnesses through standard protocols:
- MCP Tool Serving: Expose Starlark functions as instant tools for external agents (Claude, Cursor, IDEs).
- Sandboxed Execution: External agents run deterministic, dependency-free Starlark scripts within explicit capability boundaries.
- Deterministic Tooling: Because Starlark is hermetic and sandboxed, AI agents can generate and execute scripts safely without environment drift.
Because Starlark is dependency-free and sandboxed, AI agents can generate and run scripts safely without complex setup.
MCP Integration#!/usr/bin/env kite
# Expose cluster operations as MCP tools
def list_pods(namespace):
"""List pods in a namespace."""
pods = k8s.list("pods", namespace=namespace)
return [{"name": p["metadata"]["name"],
"phase": p["status"]["phase"]} for p in pods]
def restart_deployment(name, namespace):
"""Restart a deployment."""
k8s.rollout("deployment", name,
action="restart", namespace=namespace)
return "restarted %s/%s" % (namespace, name)
mcp.serve(
name = "k8s-ops",
tools = [list_pods, restart_deployment],
)
Security
Starkite enforces kernel-level isolation by default across Linux (Landlock ABI v1–v5 + Seccomp-BPF), macOS (Seatbelt), and Windows (AppContainers + Job Objects). Every execution runs under zero-trust deny-all: filesystem, network, and subprocess access require explicit capabilities or first-class mounts (--sandbox-mount). Starlark scripts additionally enforce in-VM API call gates (calls.allow/calls.deny) for defense-in-depth.
# Confine native binaries directly with kernel sandboxing
$ kite exec --sandbox-mount ./data:/data:ro -- curl -s https://example.com
kite: sandbox: operation not permitted (network is denied)
# Run Starlark script under composable path and network rules
$ kite run ./job.star --sandbox-path-read=. --sandbox-net-allow
# Default zero-trust execution blocks unauthorized calls
$ kite run ./untrusted.star
Error: script error: permission denied: os.exec exec("/bin/sh") - no matching allow rule
Built-in Script Testing
Write tests
Test files end in _test.star and define test_* functions. Each test verifies conditions through the built-in assert(cond, msg), with optional setup() and teardown() hooks running before and after every test. The skip() built-in marks the current test as skipped.
def test_addition():
assert(2 + 2 == 4, "basic math should work")
def test_string_contains():
assert("kite" in "starkite", "starkite should contain kite")
def test_list_length():
items = ["a", "b", "c"]
assert(len(items) == 3, "list should have 3 items")
Run tests
The kite test command discovers every _test.star file under the given path, runs each test_* function, and reports pass/fail counts. The --verbose flag prints each test name as it runs. The exit code is non-zero on any failure.
$ kite test ./tests/
Found 1 test file(s)
============================================================
Tests: 3 passed, 0 failed, 3 total
Time: 9ms
============================================================
Language Service & Editor Intelligence
Starkite embeds first-class Language Server Protocol (LSP) intelligence directly into the unified kite binary. With kite lsp, modern editors (VS Code, Neovim, Helix, Zed) receive instant autocompletions, hover documentation, parameter hints, and load() navigation over standard I/O. Dialect linters (kite validate --lint) enforce safety rules (L001–L005), while kite doc --skills reflects against the live Go runtime catalog to produce standardized skill definitions for autonomous AI coding agents.
# Start the language server over stdio for editor clients
$ kite lsp --stdio
# Verify language server catalog introspection and probe diagnostics
$ kite lsp --probe
Catalog introspection: 31 modules, 290 functions, 14 types registered
Grammar engine: Tree-sitter Starlark (pure Go)
Diagnostics: active (L001, L002, L003, L004, L005)
# Validate syntax and dialect rules with structured JSON diagnostics
$ kite validate --lint --json ./deploy.star
{"code":"L002","line":12,"column":5,"message":"unchecked try_ Result: res.ok must be verified"}
Ready to Start?
curl -fsSL https://starkite.run/install.sh | sh