Skip to content

Collections

In myna, a Collection is a directory that groups related actions together. It provides a shared context for variables and configuration.

A collection is defined by the presence of a myna.toml file in a directory.

my-collection/
├── myna.toml # Collection definition
├── environments/ # Environment configurations
│ ├── dev.toml
│ └── prod.toml
├── create-user.toml # Action
└── get-user.toml # Action

The myna.toml file contains metadata about the collection and shared variables.

myna.toml
version = "1.0"
kind = "collection"
description = "User Management API"
[pre]
# Variables available to all actions in this collection
API_VERSION = "v1"
DEFAULT_TIMEOUT = 5000
TABLE_NAME = "users-${ENV}"
FieldDescription
versionThe version of the collection format (e.g., “1.0”)
kindMust be "collection"
descriptionA human-readable description
[pre]A table of shared variables (strings, numbers, booleans)

Variables defined in [pre] of myna.toml are available to all actions within the collection directory (and subdirectories). They can be overridden by Environment variables or Action-specific variables.

See Variable Resolution for more details.