ServOS CLI Reference
The servos CLI is the primary tool for managing your ServOS (ServOS) infrastructure, services, and authentication from the terminal.
Installation
Download the latest version of the servos CLI from the downloads page.
Global Options
--json: Output results in JSON format for easy parsing and automation.-h,--help: Print help information.-V,--version: Print version information.
Commands
servos auth
Manage authentication and sessions.
login: Login to an ServOS instance and store the session token.--email <EMAIL>: Email for login.--password <PASSWORD>: Password for login.
logout: Invalidate the local session and remove the stored token.whoami: Display the current user and active organization.
servos context
Manage multiple ServOS environments (e.g., local, staging, production).
list: List all available contexts.add <NAME> <URL>: Add a new context.<NAME>: Context name (e.g.,prod).<URL>: ServOS Control Plane URL (e.g.,https://api.servos.example.com).
use <NAME>: Switch the active context.
servos server
Manage servers within the current organization.
list: Tabular view of all servers with their status, IP, and roles.add <IP>: Add a new server to ServOS.--name <NAME>: Name of the server.--user <USER>: SSH user (defaults toroot).--key-file <KEY_FILE>: Path to the SSH private key file.
commission <ID>: Start the commissioning process (installs Docker and the ServOS Agent).role <ID> <ROLE>: Assign a role to a server (e.g.,builder,runner).--builder: Mark the server as a builder node.
ssh <ID>: Drop directly into a secure SSH shell on the target server.stats <ID>: Show real-time performance statistics for a server.
servos service
Manage applications and services.
list: Show all services in the current environment.create <NAME>: Create a new service.--kind <KIND>: Service kind (e.g.,web,worker,db). Defaults toweb.--image <IMAGE>: Docker image to use.--domain <DOMAIN>: Public domain for routing.--port <PORT>: Internal port the application listens on.
deploy <NAME>: Trigger a new deployment.--source <SOURCE>: Source directory for local code upload.
scale <NAME> <COUNT>: Scale a service to a specific number of instances.restart <NAME>: Restart all instances of a service.logs <NAME>: Tail logs from all instances of a service.exec <NAME> -- <CMD>: Run a command inside a running service container.rollback <NAME>: Instantly revert to the previous successful deployment.--id <ID>: Specific deployment ID to roll back to.
env <NAME>: Manage environment variables.set <KEY> <VALUE>: Set an environment variable.get <KEY>: Get an environment variable.
servos system
Manage system-wide operations and health.
health: Show system health and status.backup: Create a full system backup.backups list <SERVICE>: List backups for a specific service.backups restore <ID>: Restore a specific backup.
servos install
Install and set up the ServOS Control Plane.
local: Setup a local ServOS instance for development using Docker.remote <TARGET>: Install ServOS on a remote machine.<TARGET>: Formatuser@ip.--key <KEY_FILE>: Path to the SSH private key file.