Source: https://swgbar.com/en/cli/
Language: en

# SWG bar CLI Guide

Use the swgbar command-line tool on macOS to check HTTPS inspection status, view domains and certificates, and manage SWG bypass directly from Terminal.

SWG bar · Updated October 31, 2026

SWG bar includes a native command-line interface (`swgbar`) bundled inside `/Applications/SWGBar.app`. It exposes the same real-time monitoring and inspection capabilities as the macOS menu bar app, allowing you to audit TLS certificates, evaluate HTTPS interception, and manage domain-level SWG bypass directly from Terminal or automated scripts.

## Set up the CLI

After [installing SWG bar](<https://swgbar.com/en/install/>), the binary is located inside the application bundle. You can invoke it directly, define an alias in your shell configuration (`~/.zshrc` or `~/.bashrc`), or create a symbolic link in your `PATH`:

```
# Option 1: Run directly from the application bundle
/Applications/SWGBar.app/Contents/MacOS/swgbar --help

# Option 2: Add an alias to your shell profile (~/.zshrc or ~/.bashrc)
alias swgbar="/Applications/SWGBar.app/Contents/MacOS/swgbar"

# Option 3: Create a symbolic link in /usr/local/bin (recommended for system-wide access)
sudo ln -s /Applications/SWGBar.app/Contents/MacOS/swgbar /usr/local/bin/swgbar

# Verify the CLI installation
swgbar version
```

Append `--json` to any command to receive structured JSON output, ideal for piping into `jq` or integrating into custom automation workflows.

## Inspect overview metrics, domains, and certificates

Retrieve the live inspection telemetry and certificate evidence collected by SWG bar:

```
# View overall HTTPS inspection rate, status breakdown, and top intercepting certificates
swgbar overview

# List observed domains with optional filtering and pagination
swgbar domains list
swgbar domains list --status confirmed --page 1 --page-size 20
swgbar domains list --search <keyword> --bypass active

# View detailed TLS connection and certificate evidence for a specific domain
swgbar domains detail <domain>

# List observed certificate clusters and inspect individual certificate details
swgbar certificates list
swgbar certificates list --status suspected
swgbar certificates detail "<certificate-name>"
```

## Probe domains and manage SWG bypass

Trigger real-time TLS evaluations for any target hostname or control domain-level SWG bypass rules on demand:

```
# Probe a domain on demand to check certificate trust and TLS inspection
swgbar probe <domain>

# Check current SWG bypass status and active domain rules
swgbar bypass status

# Enable, toggle, disable, or clear SWG bypass for a domain
swgbar bypass enable <domain>
swgbar bypass toggle <domain>
swgbar bypass disable <domain>
swgbar bypass clear
```

## Browser companion and application preferences

Verify browser extension connectivity, pause or resume background monitoring, and configure app preferences:

```
# Check Chrome extension companion connectivity
swgbar plugins status
swgbar plugins check

# Pause or resume background network monitoring
swgbar monitoring status
swgbar monitoring pause
swgbar monitoring resume

# Manage license activation, check for updates, and adjust display preferences
swgbar license status
swgbar updates check
swgbar language get
swgbar language set <en|zh-Hans|zh-Hant|ja|ko>
swgbar appearance get
swgbar appearance set <system|light|dark>
```

## Common commands

| Command | Description |
| --- | --- |
| `swgbar overview` | Display overall HTTPS inspection percentage, classification counts, and top intercepting certificates |
| `swgbar domains list` | List observed domains with optional `--search`, `--status`, `--bypass`, `--page`, and `--page-size` filters |
| `swgbar domains detail <domain>` | Show connection metadata, certificate chain evidence, and bypass status for a domain |
| `swgbar certificates list` | List certificate clusters with optional `--search` and `--status` filters |
| `swgbar certificates detail "<certificate-name>"` | Display issuer information, validity period, SHA-256 fingerprint, and associated domains |
| `swgbar bypass <status|enable|disable|toggle|clear>` | Query or manage domain-level SWG bypass rules |
| `swgbar probe <domain>` | Perform an on-demand TLS probe and certificate evaluation for a domain |
| `swgbar plugins <status|check>` | Verify connectivity with the browser extension companion |
| `swgbar monitoring <status|pause|resume>` | Check, pause, or resume background network monitoring |
| `swgbar license <status|activate|deactivate>` | View license activation status or manage license keys |
| `swgbar updates check` | Check for available software updates |
| `swgbar language <get|set>` | View or set display language (`en`, `zh-Hans`, `zh-Hant`, `ja`, `ko`) |
| `swgbar appearance <get|set>` | View or set appearance theme (`system`, `light`, `dark`) |

To integrate SWG bar with AI desktop clients, see the [MCP guide](<https://swgbar.com/en/mcp/>). To learn how certificate evidence is evaluated, read [how SWG bar works](<https://swgbar.com/en/how-it-works/>).

## Keep reading

*   [How to bypass SWG on a Mac](<https://swgbar.com/en/guides/how-to-bypass-swg/>)
*   [How to detect HTTPS inspection on a Mac](<https://swgbar.com/en/guides/detect-https-inspection/>)
*   [SWG bypass vs. a TLS inspection exception](<https://swgbar.com/en/guides/swg-bypass-vs-tls-exception/>)
*   [How SWG bar checks HTTPS inspection](<https://swgbar.com/en/how-it-works/>)
*   [Install SWG bar on your Mac](<https://swgbar.com/en/install/>)
*   [Connect the SWG bar Chrome extension](<https://swgbar.com/en/chrome-extension/>)
*   [SWG bar MCP Guide](<https://swgbar.com/en/mcp/>)
*   [SWG bar release information](<https://swgbar.com/en/releases/>)
*   [About SWG bar](<https://swgbar.com/en/about/>)
