Edit on GitHub

declare

Declares a new MLEM Object MLEM Object from config args and config files.

Synopsis

usage: mlem declare [-h]
                    [<subtype> [subtype options] | --load <declaration>]

Builtin subtypes:
- builder
- client
- deployment
- docker_registry
- env
- server

Description

.mlem metafiles can be created for MLEM Objects using this command. This is particularly useful for configuring environments and deployments.

Each MLEM Object, along with its subtype (which represents a particular implementation), will accept different configuration arguments. The list of configuration arguments per type can be fetched by running the mlem types command. Check out this example output.

Options

  • -h, --help - Show this message and exit.

Examples

Declare an environment object metafile with a config key:

# Fetch all available config args for a heroku env
$ mlem types env heroku
[not required] api_key: str = None

# Declare the heroku env
$ mlem declare env heroku production --api_key mlem_heroku_staging
💾 Saving env to staging.mlem

# Print the contents of the new heroku env metafile
$ cat staging.mlem
api_key: mlem_heroku_staging
object_type: env
type: heroku
Content

🐛 Found an issue? Let us know! Or fix it:

Edit on GitHub

Have a question? Join our chat, we will help you:

Discord Chat