starlark-dev

Solid

Develop and debug Kurtosis Starlark packages. Create packages from scratch, understand the plan-based execution model, use print() debugging, handle future references, and test packages locally. Use when writing or troubleshooting .star files.

DevOps & Infrastructure 544 stars 96 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 86/100

Stars 20%
91
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Starlark Dev Create, debug, and test Kurtosis Starlark packages. ## Package structure A minimal Kurtosis package needs two files: ``` my-package/ kurtosis.yml # Package metadata main.star # Entry point ``` ### kurtosis.yml ```yaml name: github.com/your-org/my-package ``` ### main.star ```python def run(plan, args): plan.add_service( name="my-service", config=ServiceConfig( image="nginx:latest", ports={ "http": PortSpec(number=80, transport_protocol="TCP"), }, ), ) ``` ## Running packages ```bash # Run a local package kurtosis run ./my-package # Run with parameters kurtosis run ./my-package '{"param1": "value1"}' # Run a remote package from GitHub kurtosis run github.com/ethpandaops/ethereum-package # Run with a custom config file kurtosis run github.com/ethpandaops/ethereum-package --args-file config.yaml # Dry run (plan only, no execution) kurtosis run ./my-package --dry-run ``` ## Execution model Kurtosis Starlark executes in two phases: 1. **Planning phase** — Your code runs and builds a plan of actions. `add_service()`, `exec()`, etc. don't execute immediately — they return future references. 2. **Execution phase** — The plan is executed in order. Future references are resolved to actual values. This means you **cannot** use the return value of `plan.exec()` in Python-level logic like `if/else` during the planning phase. Use `plan.verify()` or `plan.assert(...

Details

Author
kurtosis-tech
Repository
kurtosis-tech/kurtosis
Created
3 years ago
Last Updated
today
Language
Go
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category