core

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCollection

func CreateCollection(name string) error

CreateCollection creates a new collection directory and a default collection.yml

func CreateRunnable

func CreateRunnable(collectionName, runnableName string) error

CreateRunnable creates a new runnable directory and a default runnable.yml within a collection

func CreateShell

func CreateShell(collection, name string) error

CreateShellHelper creates a wrapper script for the collection. Ideally this should go to a location in PATH. For now, we will try to put it in $HOME/bin or similar if it exists, or just tell the user where we created it.

func ExecuteContext

func ExecuteContext(ctx *ExecutionContext, args []string) error

ExecuteContext runs the resolved command with hooks

func ExportCollection

func ExportCollection(name, output string) error

ExportCollection exports a collection to a tar.gz file. name: name of the collection to export. output: optional output path. Defaults to <name>.tar.gz in current dir.

func ImportCollection

func ImportCollection(source, name string) error

ImportCollection imports a collection from a source. source: git URL, tar.gz path, or local folder path. name: optional name for the collection. If empty, inferred from source.

func ListCollections

func ListCollections() error

ListCollections prints available collections

func ListRunnables

func ListRunnables(collectionName string) error

ListRunnables prints available runnables for a collection

func ShowCollection

func ShowCollection(name string, showReadme bool) error

ShowCollection prints details about a collection

func ShowRunnable

func ShowRunnable(collectionName, runnableName string, showReadme bool) error

ShowRunnable prints details about a runnable

Types

type ExecutionContext

type ExecutionContext struct {
	RunnablePath string // Directory containing runnable.yml or resolved file
	Config       *config.RunnableConfig
	Environments map[string]string
}

ExecutionContext holds the resolved state for execution

func ResolveCommand

func ResolveCommand(collection string, pathComponents []string) (*ExecutionContext, error)

ResolveCommand traverses the collection to find the target runnable. It supports both legacy file access (optional) and new structured access.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL