CLI Reference
The BRIDGEPORT CLI provides terminal access to your infrastructure — SSH into servers, view logs, run commands in containers, and manage resources without leaving the command line.
Installation
Section titled “Installation”Download the CLI binary from your BRIDGEPORT instance (click CLI in the top bar, or go to Admin > About). The modal picks the right build for your architecture; follow the on-screen steps for your OS. If you’d rather install from the terminal:
# Replace arm64 with amd64 for Intel MacsBIN=bridgeport-darwin-arm64chmod +x ~/Downloads/$BIN
# Clear Gatekeeper's quarantine flag so the binary runs without the# "cannot be opened because the developer cannot be verified" dialogxattr -d com.apple.quarantine ~/Downloads/$BIN
sudo mv ~/Downloads/$BIN /usr/local/bin/bridgeportIf you skip the xattr step, macOS will block the binary on first run. Either run the command above, or right-click the binary in Finder and pick Open once — macOS then whitelists it permanently.
# Replace amd64 with arm64 for ARM machinesBIN=bridgeport-linux-amd64chmod +x ~/Downloads/$BINsudo mv ~/Downloads/$BIN /usr/local/bin/bridgeportIf /usr/local/bin is not writable, use ~/.local/bin/bridgeport and make sure it’s on your PATH.
Build from Source
Section titled “Build from Source”cd cli && make buildsudo mv cli/bin/bridgeport /usr/local/bin/Global Flags
Section titled “Global Flags”These flags are available on every command:
| Flag | Description |
|---|---|
--url <url> | BRIDGEPORT server URL (overrides config file) |
--token <token> | API token (overrides config file) |
--config <path> | Config file path (default: ~/.bridgeport/config.yaml) |
--no-color | Disable colored output |
-v, --verbose | Enable verbose output |
Configuration
Section titled “Configuration”The CLI stores its configuration in ~/.bridgeport/config.yaml. This file holds three values:
| Key | Description |
|---|---|
url | BRIDGEPORT server URL (e.g., https://deploy.example.com) |
token | Authentication token (JWT or API token) |
defaultEnvironment | Default environment name for commands that accept --env |
You can set these interactively with bridgeport config or by logging in with bridgeport login.
Authentication and Identity
Section titled “Authentication and Identity”Authenticate with a BRIDGEPORT server. Credentials can be provided interactively or via flags.
bridgeport login [flags]Flags
| Flag | Description |
|---|---|
--email <email> | Email address (prompted if omitted) |
--password <password> | Password (prompted securely if omitted) |
--save | Save token to config file (default: true) |
Examples
# Interactive login (recommended)bridgeport login --url https://deploy.example.com
# Non-interactive (for scripts)bridgeport login --url https://deploy.example.com --email admin@example.com --password mypasswordOutput
Logging in to https://deploy.example.com...✓ Logged in as admin@example.com (admin)Token saved to /home/user/.bridgeport/config.yamlwhoami
Section titled “whoami”Display information about the currently authenticated user.
bridgeport whoamiOutput
User: AdminEmail: admin@example.comRole: adminURL: https://deploy.example.comconfig
Section titled “config”View or interactively configure CLI settings. Settings are saved to ~/.bridgeport/config.yaml.
bridgeport config [flags]Flags
| Flag | Description |
|---|---|
--show | Display current configuration |
--path | Print the config file path |
Examples
# Interactive configurationbridgeport config
# Show current settingsbridgeport config --show
# Print config file locationbridgeport config --pathOutput (—show)
Current configuration:
Server URL: https://deploy.example.com Token: bp_a...xyz9 Default Environment: (not set)
Config file: /home/user/.bridgeport/config.yamlServer Operations
Section titled “Server Operations”List all servers with their status, metrics, and service count.
bridgeport list [flags]Flags
| Flag | Description |
|---|---|
--env <name> | Filter by environment name |
Examples
# List all servers across environmentsbridgeport list
# List servers in staging onlybridgeport list --env stagingOutput
ENV SERVER IP STATUS CPU MEM SERVICESstaging app-api 10.20.10.3 healthy 12% 45% 3staging app-worker 10.20.10.4 healthy 8% 32% 2production app-api 10.30.10.3 healthy 34% 67% 3status
Section titled “status”Show detailed information about a specific server, including network info, system metrics, and running services.
bridgeport status <environment> <server>Examples
bridgeport status staging app-apiOutput
Server: app-apiEnvironment: staging
Network: Private IP: 10.20.10.3 Public IP: 123.45.67.89
Metrics: CPU: 12.3% Memory: 1.8 GB / 4.0 GB (45.0%) Disk: 12.4 GB / 50.0 GB (24.8%) Uptime: 14d 6h 23m
Services:NAME STATUS HEALTH IMAGE TAGtraefik running healthy traefik v3.0app-api running healthy registry.example.com/myapp v1.4.2app-worker running healthy registry.example.com/myapp v1.4.2Open an SSH session to a server, or run a one-off command.
bridgeport ssh <environment> <server> [-- command]Examples
# Interactive shellbridgeport ssh staging app-api
# Run a commandbridgeport ssh staging app-api -- ls -la /opt
# Check disk usagebridgeport ssh staging app-api -- df -hExecute a command inside a running Docker container, or open an interactive shell.
bridgeport exec <environment> <server> <service> [flags] [-- command]Flags
| Flag | Description |
|---|---|
--shell <shell> | Shell to use (default: /bin/sh) |
Examples
# Open a shell in the containerbridgeport exec staging app-api app-api
# Use bash instead of shbridgeport exec staging app-api app-api --shell bash
# Run a one-off commandbridgeport exec staging app-api app-api -- ls -la
# Check environment variablesbridgeport exec staging app-api app-api -- env | grep DATABASEView container logs from a service running on a server.
bridgeport logs <environment> <server> <service> [flags]Flags
| Flag | Description |
|---|---|
-f, --follow | Stream logs in real-time |
--tail <n> | Number of lines to show (default: 100) |
Examples
# View recent logsbridgeport logs staging app-api app-api
# Stream logs livebridgeport logs staging app-api app-api -f
# Show last 20 linesbridgeport logs staging app-api app-api --tail 20Run a predefined command from the service’s type configuration (e.g., Django shell, database migrations).
bridgeport run <environment> <server> <service> [command] [flags]Flags
| Flag | Description |
|---|---|
--list | Show available commands for the service |
Examples
# List available commandsbridgeport run staging app-api app-api --list
# Run Django migrationsbridgeport run staging app-api app-api migrate
# Open Django shellbridgeport run staging app-api app-api shellOutput (—list)
Available commands for app-api (Django):
shell Interactive Django shell Command: python manage.py shell
dbshell Database CLI shell Command: python manage.py dbshell
migrate Apply database migrations Command: python manage.py migrateResource Management
Section titled “Resource Management”services
Section titled “services”List services across all servers, optionally filtered by environment or server.
bridgeport services [flags]Flags
| Flag | Description |
|---|---|
--env <name> | Filter by environment name |
--server <name> | Filter by server name (requires --env) |
Examples
# List all servicesbridgeport services
# Services in stagingbridgeport services --env staging
# Services on a specific serverbridgeport services --env staging --server app-apiOutput
ENV SERVER SERVICE STATUS HEALTH IMAGE TAGstaging app-api traefik running healthy traefik v3.0staging app-api app-api running healthy registry.example.com/myapp v1.4.2staging app-api app-worker running healthy registry.example.com/myapp v1.4.2databases
Section titled “databases”List databases with their type, monitoring status, and backup configuration.
bridgeport databases [flags]Flags
| Flag | Description |
|---|---|
--env <name> | Filter by environment name |
Examples
bridgeport databasesbridgeport databases --env productionOutput
ENV NAME TYPE HOST MONITORING BACKUPstaging app-postgres postgres 10.20.10.3:5432 connected localproduction app-postgres postgres 10.30.10.3:5432 connected spacessecrets
Section titled “secrets”List secret names in an environment. Values are never displayed in the CLI.
bridgeport secrets <environment>Examples
bridgeport secrets stagingOutput
KEY DESCRIPTION USAGE PROTECTEDDATABASE_URL PostgreSQL connection 3DJANGO_SECRET_KEY Application secret 1 yesSMTP_PASSWORD SMTP credentials 1 yesconfigs
Section titled “configs”List configuration files in an environment with their sync status.
bridgeport configs <environment>Examples
bridgeport configs stagingOutput
NAME FILENAME SYNC SERVICES UPDATEDgateway-compose docker-compose.yml synced 2 2026-02-20 14:30:00caddy-config Caddyfile pending 1 (1 pending) 2026-02-24 09:15:00images
Section titled “images”List container images tracked in an environment with their current and latest tags.
bridgeport images <environment>Examples
bridgeport images stagingOutput
NAME IMAGE CURRENT LATEST AUTO-UPDATEBIOS Backend registry.example.com/bios-backend v1.4.2 v1.4.3 yesBIOS Frontend registry.example.com/bios-frontend v1.4.2 v1.4.2registries
Section titled “registries”List container registries configured in an environment.
bridgeport registries <environment>Examples
bridgeport registries stagingOutput
NAME TYPE URL IMAGES DEFAULTDigitalOcean digitalocean registry.digitalocean.com 4 yesDocker Hub dockerhub registry-1.docker.io 1Monitoring and Operations
Section titled “Monitoring and Operations”health
Section titled “health”Display health check logs for an environment with optional filtering.
bridgeport health <environment> [flags]Flags
| Flag | Description |
|---|---|
--status <status> | Filter by status (success, failure, timeout) |
--type <type> | Filter by resource type (server, service, container) |
--hours <n> | Time range in hours (default: 24) |
--limit <n> | Number of logs to show (default: 50) |
Examples
# All health logs in the last 24 hoursbridgeport health staging
# Only failuresbridgeport health staging --status failure
# Server checks in the last 48 hoursbridgeport health staging --type server --hours 48Output
Showing 12 of 248 logs (last 24 hours)
TIME TYPE RESOURCE CHECK STATUS DURATION2026-02-25 14:30:00 service app-api url success 45ms2026-02-25 14:30:00 server app-api ssh success 120ms2026-02-25 14:25:00 service app-worker container_health failure -backups
Section titled “backups”List recent backups for a specific database.
bridgeport backups <environment> <database> [flags]Flags
| Flag | Description |
|---|---|
--limit <n> | Number of backups to show (default: 20) |
Examples
bridgeport backups staging app-postgresbridgeport backups production app-postgres --limit 5Output
Database: app-postgres (postgres)
STATUS TYPE FILENAME SIZE DURATION CREATEDcompleted scheduled app-postgres-20260225-020000.sql 45.2 MB 12s 2026-02-25 02:00:00completed scheduled app-postgres-20260224-020000.sql 44.8 MB 11s 2026-02-24 02:00:00completed manual app-postgres-20260223-143000.sql 44.5 MB 13s 2026-02-23 14:30:00View audit logs with optional filtering by environment, action, or resource type.
bridgeport audit [flags]Flags
| Flag | Description |
|---|---|
--env <name> | Filter by environment name |
--action <action> | Filter by action (deploy, create, update, delete, etc.) |
--resource-type <type> | Filter by resource type (service, server, database, etc.) |
--limit <n> | Number of logs to show (default: 50) |
Examples
# Recent audit logsbridgeport audit
# Deployment actions in stagingbridgeport audit --env staging --action deploy
# All database-related eventsbridgeport audit --resource-type database --limit 100Output
Showing 15 of 342 logs
TIME USER ACTION TYPE RESOURCE STATUS2026-02-25 14:25:00 admin@example.com deploy service app-api ok2026-02-25 14:20:00 admin@example.com update secret DATABASE_URL ok2026-02-25 13:00:00 ci@example.com deploy service app-worker okUtilities
Section titled “Utilities”version
Section titled “version”Print the CLI version.
bridgeport versionOutput
bridgeport version 20260225-a1b2c3dcompletion
Section titled “completion”Generate shell completion scripts for tab-completion of commands, environments, servers, and services.
bridgeport completion <shell>Supported shells: bash, zsh, fish, powershell
Installation
# Bash (Linux)bridgeport completion bash > /etc/bash_completion.d/bridgeport
# Bash (macOS with Homebrew)bridgeport completion bash > $(brew --prefix)/etc/bash_completion.d/bridgeport
# Zshbridgeport completion zsh > "${fpath[1]}/_bridgeport"
# Fishbridgeport completion fish > ~/.config/fish/completions/bridgeport.fish
# PowerShellbridgeport completion powershell | Out-String | Invoke-ExpressionShell Completion
Section titled “Shell Completion”The CLI supports dynamic shell completions powered by the BRIDGEPORT API. When you press Tab, the CLI queries your BRIDGEPORT instance to suggest:
- Environment names for the first positional argument of
ssh,status,exec,logs,run,health,secrets,configs,registries,images, andbackups - Server names for the second positional argument (filtered by the selected environment)
- Service names for the third positional argument (filtered by the selected server)
This requires an active authentication token in your config file. If the API is unreachable, completions silently fall back to no suggestions.
Related Docs
Section titled “Related Docs”- API Reference — REST API authentication and endpoints
- Agent Reference — Monitoring agent installation and configuration
- Plugin Reference — Service type and database type plugins (for
runcommands)