Skip to main content
A sitectl context points to a site running either on your local machine or on a remote server over SSH. You can have many contexts and switch between them with use-context. See the context concept page for a full explanation.

config

Manage the saved connection records sitectl uses to target Docker Compose sites. Each context identifies one local or SSH-accessible site environment, its project and Compose identity, and the application plugin that owns stack-specific behavior. The default context is used only when neither --context nor the current directory selects another environment.

current-context

Display the current site context

get-contexts

List all site contexts

get-environments

List environments grouped by site

get-sites

List configured sites and their environments

set-context

Create or update a context that tells sitectl which Docker Compose project to operate. The context records the site and environment identity, project directory, Compose identity, Docker endpoint, and—when the target is remote—its SSH connection. Use --default to make this the fallback target for commands that omit --context.

use-context

Switch to the specified context

delete-context

Delete a saved context from the local sitectl configuration. By default, this removes only the connection record and leaves containers, volumes, remote resources, and project files unchanged. With --delete-project, a local context requires two typed confirmations before sitectl runs docker compose down -v, deletes the complete project directory, and removes the saved context. Remote project files and containers are never deleted by this command.

validate

Validate sitectl context configuration and access

view

Print the complete persisted sitectl configuration