Examples¶
The fastest way to learn what a Starkite script looks like is to read one that already works. This page catalogs runnable .star scripts from the starkite repository, grouped by the domain they exercise — core automation, Kubernetes, AI & MCP, and the sandbox. Each entry links to source you can clone and run as-is with kite run <path>, then adapt to your own task. Start with the card that matches what you are trying to do.
-
Core modules
System info, SSH health checks, HTTP servers and clients — the base automation modules.
-
Kubernetes
Deployments, rolling updates, controllers, webhooks, and full app stacks.
-
AI & MCP
MCP tool serving and client integration with the
mcpmodule. -
Sandbox
OS and container isolation with
--sandboxedand--sandbox-profile.
Core modules¶
Begin where every script begins: the base modules for talking to the local system, a remote host over SSH, and the network. These examples range from a one-line hello world to a full HTTP server with middleware, so you can pick the one closest to your task and build outward.
| Example | Description |
|---|---|
| hello.star | Hello world |
| shell.star | Shell execution, pipelines, and script runners |
| sysinfo.star | System information gathering |
| remote-check.star | Remote server health checks via SSH |
| http-server/ | REST APIs, webhooks, middleware |
When you want the concepts behind these rather than the finished scripts, read the Core Modules guides.
Kubernetes¶
Once you are comfortable with the base modules, the k8s module turns those same patterns toward a cluster. The examples below run the full range of cluster work — a single deployment, a zero-downtime rolling update, a reconcile loop, an admission webhook, a complete multi-tier stack — so you can match one to the shape of your own operation.
| Example | Description |
|---|---|
| deploy-k8s | Basic Kubernetes deployment |
| quick-deploy | One-line deployments |
| rolling-update | Zero-downtime rolling updates |
| app-stack | Full application stack |
| namespace-stack | Namespace provisioning |
| multi-env | Multi-environment deployments |
| microservices | Microservices deployment |
| redis-cluster | Redis cluster with Helm |
| wordpress-stack | WordPress + MySQL stack |
| cronjobs | Kubernetes CronJobs |
| cluster-health | Cluster health monitoring |
| debug-pod | Debug pod for troubleshooting |
| controller/ | Controller reconcile loops |
| webhook/ | Validating and mutating admission webhooks |
For the concepts these scripts rest on — connecting to a cluster, applying manifests, watching resources — see the Kubernetes guides.
AI & MCP¶
The mcp module lets a script serve tools to external agent harnesses or connect to remote tool servers. This example lives under aikite/examples/agent/ and demonstrates connecting to an MCP tool server and invoking tools.
| Example | Description |
|---|---|
| mcp_integration.star | Client connection and tool invocation over MCP |
To understand MCP tool serving and client patterns, read the MCP guide.
Sandbox¶
When you run code you do not fully trust, the examples above gain a second layer: --sandboxed (or --sandbox-profile) confines the script to OS-level or container isolation. These examples show that layer in action — a network fetch under the default profile, offline compute over the working directory, and the sandbox composed with a permission profile for defense in depth.
| Example | Description |
|---|---|
| netaccess-http-fetch.star | HTTPS fetch under the default profile |
| opaque-compute.star | Offline compute over $CWD |
| defense-in-depth.star | Compose --sandbox-opaque with --permissions=deny-all |
| sandbox-module-exec.star | Programmatic sandbox module execution |
For the isolation model, supported drivers, and profile configuration, see the Sandbox guide.