hoziron context

Manage multiple Hoziron instances — add, switch, and remove connection contexts.

Contexts can target two kinds of endpoints:

  • API contexts (type = api): connect to a full hoziron-api daemon. All CLI commands are available.
  • Registry contexts (type = registry): connect directly to a standalone registry (e.g. catalog.hoziron.com). Only package and catalog commands are available.

Synopsis

hoziron context <subcommand> [options]

Subcommands

SubcommandDescription
listList available contexts
use <name>Switch the active context
currentShow the current active context
add <name>Add a new context
remove <name>Remove a context

hoziron context list

$ hoziron context list
  CURRENT  NAME           TYPE       URL                                        AUTH
  *        local          api        http://127.0.0.1:4200                      none
           staging        api        https://hoziron.staging.internal           api-key
           catalog-prod   registry   https://catalog.hoziron.com                token

The * indicates the active context. The TYPE column shows whether the context targets an API daemon or a standalone registry.


hoziron context use

$ hoziron context use catalog-prod
Switched to context 'catalog-prod' (registry, https://catalog.hoziron.com)

# Only package/catalog commands are now available
$ hoziron package publish ./my-skill
→ Publishes directly to catalog.hoziron.com

$ hoziron agent list
Error: command 'agent list' is not available in registry context "catalog-prod"
Hint: switch to an API context with `hoziron context use <api-context>`

hoziron context current

$ hoziron context current
catalog-prod (registry, https://catalog.hoziron.com)

hoziron context add

hoziron context add <name> --url <url> [--type <api|registry>] [--auth <mode>] [--token <value>] [--api-key-env <var>] [--issuer <url>]

Flags

FlagDescriptionDefault
--url <url>Target URL (required)
--type <type>Context type: api or registryapi
--auth <mode>Auth mode: none, local, token, oidcnone
--token <value>Static auth token (for token auth)
--api-key-env <var>Env var holding API key (for local auth)
--issuer <url>OIDC issuer URL (for oidc auth)

Examples

# API context — no authentication (local development)
$ hoziron context add dev --url http://127.0.0.1:4200
✓ Added api context 'dev' (http://127.0.0.1:4200)

# API context — API key authentication
$ hoziron context add staging \
    --url https://hoziron.staging.internal \
    --auth local \
    --api-key-env HOZIRON_STAGING_KEY
✓ Added api context 'staging' (https://hoziron.staging.internal)

# Registry context — token authentication (for publishing)
$ hoziron context add catalog-prod \
    --type registry \
    --url https://catalog.hoziron.com \
    --auth token \
    --token hzr_tok_abc123
✓ Added registry context 'catalog-prod' (https://catalog.hoziron.com)

# Registry context — no authentication (read-only browsing)
$ hoziron context add catalog-public \
    --type registry \
    --url https://catalog.hoziron.com
✓ Added registry context 'catalog-public' (https://catalog.hoziron.com)

hoziron context remove

$ hoziron context remove staging
✓ Context 'staging' removed

Context Types

API Context (default)

All CLI commands are available. The CLI communicates with a running hoziron-api daemon.

[contexts.dev-local]
type = "api"
url = "http://localhost:4200"

Registry Context

Only package and catalog commands are available:

  • hoziron package publish, build, inspect, lint, verify
  • hoziron catalog search, info, versions, list, install, publish, yank

All other commands (agent, workflow, skill, etc.) are hidden from --help output and produce a clear error if invoked.

[contexts.catalog-prod]
type = "registry"
url = "https://catalog.hoziron.com"
auth_mode = "token"
token = "hzr_tok_..."

This enables publishing directly to registries like catalog.hoziron.com that don't have a full API daemon in front of them.


Per-Command Context Override

Use --context on any command to target a specific instance without switching:

# Check production health without switching context
$ hoziron --context production health
Status: healthy
Uptime: 14d 3h 22m

# Publish to catalog without switching context
$ hoziron --context catalog-prod package publish ./my-skill

Typical Multi-Environment Setup

# API contexts for full platform access
hoziron context add local --url http://127.0.0.1:4200
hoziron context add staging --url https://hoziron.staging.internal --auth local --api-key-env STAGING_KEY

# Registry context for direct publishing
hoziron context add catalog-prod --type registry --url https://catalog.hoziron.com --auth token --token hzr_tok_abc123

# Day-to-day: work on local
hoziron context use local

# Publish a package directly to the public catalog
hoziron context use catalog-prod
hoziron package publish ./my-skill

# Switch back to full access
hoziron context use local

See Also

  • config.md — Per-instance configuration
  • auth.md — API key management for remote contexts