meted init

Create meted.config.json.

npx @meted/cli init

Interactive by default. It accepts every default when stdin is not a terminal.

Options

Flag
--yesAccept every default without asking
--mode <mode>Starting mode. Default observe
--api-key-env <var>Environment variable holding the provider key
--base-url <url>Provider base URL
--forceOverwrite an existing configuration

What it asks

Which environment variable holds your provider key? (OPENAI_API_KEY)
Provider base URL? (https://api.openai.com/v1)

Starting mode?
  › 1. observe        calculate only, nothing is changed
    2. conservative   apply a generous ceiling
    3. balanced       apply the engine's ceiling
    4. aggressive     tighten below it

What it writes

Path
meted.config.jsonConfiguration. Commit it.

apiKeyEnv in that file holds the name of the environment variable your provider key lives in. The key is read from the environment at request time.

Examples

# CI, containers, scripts
meted init --yes

# Azure OpenAI
meted init --yes \
  --api-key-env AZURE_OPENAI_KEY \
  --base-url https://my-resource.openai.azure.com/openai/v1

# Start in a mode other than observe
meted init --yes --mode conservative

Exit codes

0Configuration written
1A configuration already exists, or a flag was invalid

Was this page helpful?