A Plan is a representation of the actions Kurtosis will perform inside an enclave. It is the central component of Kurtosis's multi-phase run design. Plans are constructed using Starlark by calling methods on a Plan object, such as add_service, remove_service, or upload_files.
Key Mental Model: Injection vs. Construction
You do not instantiate a Plan object yourself. Instead, Kurtosis injects the Plan object into the run function of your main.star file. You can then pass this object to other functions or modules to define your infrastructure and orchestration logic.
# ------ main.star ---------
some_library = import_module("github.com/some-org/some-library/lib.star")
def run(plan):
plan.print("Hello, world!")
some_library.do_something(plan)