@alfe.ai/config
v0.0.2
Published
**Config** — read/write `~/.alfe/config.toml` for Alfe CLI and gateway.
Downloads
247
Readme
packages/config (@alfe.ai/config)
Config — read/write ~/.alfe/config.toml for Alfe CLI and gateway.
What It Does
Shared config management for the Alfe user-side tools (CLI, gateway daemon, plugins). Reads and writes the user's local config file at ~/.alfe/config.toml.
readConfig()— read and parse~/.alfe/config.tomlwriteConfig(config)— write config to~/.alfe/config.tomlconfigExists()— check if config file existsgetApiEndpoint()— resolve API URL from config or token prefixgetEndpointFromToken(token)— derive API endpoint from token prefix (alfe_dev_,alfe_test_,alfe_live_)
Config Format
# ~/.alfe/config.toml
api_key = "alfe_live_xxxx..."
gateway = "https://api.alfe.ai" # optional overrideThe API endpoint is derived automatically from the token prefix unless gateway is explicitly set.
Development
pnpm install
pnpm --filter @alfe.ai/config buildDependencies
- smol-toml — TOML parsing and serialization
