Contexts
Commands for managing named configuration contexts. Contexts allow you to maintain multiple daemon/registry/auth server configurations and switch between them — useful when working across development, staging, and production environments.
create
Create a new named context with connection details for a daemon, registry server, and auth server.
vmr context create <NAME> [OPTIONS]Arguments
| Argument | Description |
|---|---|
NAME | Name for the new context |
Options
| Flag | Short | Description |
|---|---|---|
--socket-path <PATH> | -s | Unix socket path for the daemon |
--registry-url <URL> | -r | Registry server URL |
--auth-server-url <URL> | -a | Authentication server URL |
--description <TEXT> | -d | Human-readable description of this context |
--set-current | -c | Immediately switch to this context after creation |
Examples
vmr context create dev \
--socket-path /tmp/vm-registry-daemon.sock \
--registry-url http://127.0.0.1:8080 \
--auth-server-url http://127.0.0.1:4078 \
--description "Local development environment" \
--set-current
vmr context create staging \
-s /var/run/vm-registry.sock \
-r https://registry.staging.example.com \
-a https://auth.staging.example.com \
-d "Staging environment"TIP
Use --set-current when creating a context you want to start using immediately. Otherwise, switch to it later with vmr context use.
update
Update the configuration of an existing context. Only the provided fields are modified — omitted fields retain their current values.
vmr context update <NAME> [OPTIONS]Arguments
| Argument | Description |
|---|---|
NAME | Name of the context to update |
Options
| Flag | Short | Description |
|---|---|---|
--socket-path <PATH> | -s | New Unix socket path |
--registry-url <URL> | -r | New registry server URL |
--auth-server-url <URL> | -a | New authentication server URL |
--description <TEXT> | -d | New description |
Examples
vmr context update staging \
--registry-url https://registry-v2.staging.example.com
vmr context update dev -d "Local dev with S3 backend"use
Switch the active context. All subsequent CLI commands will use the connection details from the selected context.
vmr context use <NAME>Arguments
| Argument | Description |
|---|---|
NAME | Name of the context to activate |
Examples
vmr context use staging
vmr context use devls
List all configured contexts, showing each context's name, registry URL, auth server URL, description, and whether it is the currently active context.
vmr context lsOutput Fields
| Field | Description |
|---|---|
Name | Context name |
Registry URL | Configured registry server URL |
Auth Server URL | Configured authentication server URL |
Description | Human-readable description |
Current | Whether this is the active context |
Created At | When the context was created |
Updated At | When the context was last modified |
Examples
vmr context lsremove
Delete a named context. The currently active context cannot be removed unless --force is specified.
vmr context remove <NAME> [OPTIONS]Arguments
| Argument | Description |
|---|---|
NAME | Name of the context to remove |
Options
| Flag | Short | Description |
|---|---|---|
--force | -f | Force removal even if this is the currently active context |
Examples
vmr context remove staging
vmr context remove dev -fWARNING
Removing the active context with --force will leave no context selected. You must run vmr context use to select a new active context before executing further commands that require daemon connectivity.
current
Display the currently active context and its full configuration details.
vmr context currentExamples
vmr context current