1 min read 111 words
Docs
CLI
Reference

hessian config add-context

CLI command reference

hessian config add-context

Create a new context

Synopsis

Create a new Hessian context (a named bundle of API host + credentials).

The api_url is required. The api_key is optional — if you’d rather use OAuth, omit it and run hessian login --profile <name> afterwards to populate HESSIAN_TOKEN.

hessian config add-context <name> [flags]

Options

Flag Type Description
--api_key string API key for this context (optional; alternatively use OAuth via ‘hessian login’, which populates HESSIAN_TOKEN)
--api_url string API URL for this context (e.g. https://api.dev-hessian.sh)
--force “ Overwrite an existing profile with the same name
-h, --help “ help for add-context

Options inherited from parent commands

Flag Type Description
--config string config file (default is $HOME/.hessian/config.yaml)
--debug “ Enable debug logging
-H, --header strings Add custom header(s) to requests (format: ‘Key: Value’). Can be repeated.
--json “ Output in JSON format (overrides —output)
--profile string Context profile to use (overrides current_context and HESSIAN_PROFILE)

See also

Last updated on 2-May-2026