Skip to content

Overview

Starkite exposes Go's standard library as type-safe, scriptable Starlark modules for general-purpose automation, cloud-native operations, data processing, and GenAI agent workflows. All modules are auto-loaded and available in every .star script without any import statement.

Available Modules

Module Description
os Environment, process info, and command execution
fs Filesystem operations and Path objects
http HTTP client, server, and URL builder
ssh Remote command execution and file transfer
json JSON encoding, decoding, and file I/O
yaml YAML encoding, decoding, and file I/O
csv CSV reading, writing, and file I/O
gzip Gzip compression and decompression
zip ZIP archive reading and writing
base64 Base64 encoding and decoding
hash Cryptographic hash functions
strings String utility functions
regexp Regular expression matching and replacement
template Go text/template rendering
time Time, duration, and arithmetic
uuid UUID generation
fmt Formatted printing and string formatting
log Structured logging
table ASCII table rendering
concur Concurrent execution
retry Retry logic with backoff
io Interactive user input
vars Typed variable access
runtime Runtime and platform information
inventory Inventory management
test Testing assertions
k8s Kubernetes resource management (Cloud edition)
ai Multi-provider LLM client with chat, tools, and agents (AI edition)
mcp Model Context Protocol server + client (AI edition)

Auto-Loading

Unlike standard Starlark, starkite modules do not require load() statements. All modules are injected into the global scope automatically:

# No import needed — just use the module directly
content = read_text("config.yaml")
data = yaml.decode(content)
print(os.hostname())

The load() Function

You can still use load() to import symbols from other .star files in your project:

load("helpers.star", "deploy", "rollback")

deploy("production")

The load() function searches relative to the current script's directory.

The try_ Pattern

Every module function that can fail has a corresponding try_ variant. Instead of raising an error, try_ functions return a Result object:

# Raises an error if the file doesn't exist
content = read_text("/etc/missing")

# Returns a Result — never raises
result = path("/etc/missing").try_read_text()
if result.ok:
    print(result.value)
else:
    print("Error:", result.error)

The Result type has three attributes:

Attribute Type Description
ok bool True if the operation succeeded
value any The return value on success
error string The error message on failure

This pattern applies uniformly to all modules — module-level functions, factory functions, and object methods all support try_ variants. See the Error Handling guide for more details.