Contexts
Commands for managing named configuration contexts. Contexts allow you to maintain multiple daemon/registry 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 socket and registry server.
vmr context create <NAME> [OPTIONS]Arguments
| Argument | Description |
|---|---|
NAME | Name for the new context |
Options
| Flag | Short | Description |
|---|---|---|
--socket-url <URL> | -s | Daemon socket URL (unix:, tcp://, or ssh://) |
--registry-url <URL> | -r | Registry server URL |
--description <TEXT> | -d | Human-readable description of this context |
--set-current | Immediately switch to this context after creation |
Examples
vmr context create dev \
--socket-url unix:/run/vm-registry-daemon.sock \
--registry-url http://127.0.0.1:8080 \
--description "Local development environment" \
--set-current
vmr context create staging \
-s tcp://10.0.0.42:7846 \
-r https://registry.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-url <URL> | -s | New daemon socket URL |
--registry-url <URL> | -r | New registry 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, socket URL, registry URL, description, and whether it is the currently active context.
vmr context ls [OPTIONS]Options
| Flag | Short | Description |
|---|---|---|
--names-only | -q | Print only context names, one per line |
Output Fields
| Field | Description |
|---|---|
Name | Context name |
Socket URL | Configured daemon socket URL |
Registry URL | Configured registry server URL |
Description | Human-readable description |
Current | Whether this is the active context |
Examples
vmr context ls
vmr context ls -qremove
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