Skip to main content
Context profiles store your default connection settings — API base URL, company ID, and API key reference — in ~/.zmeel/context.json. Once a profile is set, every client command picks up those defaults automatically.

Commands

zmeel context set --api-base <url> [options]
zmeel context show
zmeel context list
zmeel context use <profile>

context set

Save or update values on a profile.
zmeel context set --api-base http://localhost:3100 --company-id <company-id>
OptionDescription
--api-base <url>Base URL of your Zmeel server
--company-id <id>Default company ID for company-scoped commands
--api-key-env-var-name <name>Name of the environment variable that holds your API key
--profile <name>Profile to write to (defaults to the currently active profile)
--useAlso set this profile as the active profile after saving
--context <path>Path to a custom context file instead of ~/.zmeel/context.json
--data-dir <path>Isolate all local state away from ~/.zmeel
--jsonOutput the updated profile as raw JSON
Use --api-key-env-var-name instead of storing a literal token. Set the variable once in your shell and Zmeel reads it automatically on every command:
zmeel context set --api-key-env-var-name ZMEEL_API_KEY
export ZMEEL_API_KEY=your-token-here
This keeps secrets out of ~/.zmeel/context.json.

context show

Print the active profile and the path to the context file.
zmeel context show
OptionDescription
--profile <name>Inspect a specific profile instead of the active one
--context <path>Path to a custom context file
--data-dir <path>Isolate all local state away from ~/.zmeel
--jsonOutput raw JSON

context list

List all profiles defined in the context file.
zmeel context list
The output includes each profile’s name, whether it is currently active, its API base URL, default company ID, and API key env var name.
OptionDescription
--context <path>Path to a custom context file
--data-dir <path>Isolate all local state away from ~/.zmeel
--jsonOutput raw JSON

context use

Switch the active profile.
zmeel context use default
ArgumentDescription
<profile>Name of the profile to activate
OptionDescription
--context <path>Path to a custom context file
--data-dir <path>Isolate all local state away from ~/.zmeel

Global options

All client commands support these options. When present, they override whatever is saved in the active context profile.
OptionDescription
--api-base <url>Override the server base URL for this invocation
--api-key <token>Bearer token for this invocation
--context <path>Path to a custom context file
--profile <name>Use a specific profile for this invocation
--data-dir <path>Isolate all local state away from ~/.zmeel
--jsonOutput raw JSON