Mastering the CaptureGem CLI guide illustration

Mastering the CaptureGem CLI


While the CaptureGem UI is great for casual use, power users often need more control. The Command-Line Interface (CLI) allows you to automate recordings, switch profiles via scripts, and run the app on headless Linux servers.

1. Getting Started

The CaptureGem binary can be called directly from your terminal. On Windows, locate `CaptureGem.exe`. On Linux/macOS, ensure the binary is in your `$PATH`.

# Basic version check
capturegem --version

2. Headless Background Execution

For 24/7 recording servers, running without a GUI is essential. Use the `--headless` flag to start CaptureGem as a background process.

capturegem --headless --config ./config.json
Pro Tip: Combine this with tmux or screen on Linux to keep the process alive after your SSH session closes.

3. Profile & Config Switching

You can maintain different configurations for different types of recording (e.g., 4K specific vs. mass archiving) and switch between them instantly.

# Start with a specific high-quality profile
capturegem --config profiles/4k-optimized.json

# Start with a low-bandwidth proxy profile
capturegem --config profiles/proxy-only.json

4. Automation Scripting

Integrate CaptureGem into your workflow with simple scripts.

Bash Example (Linux/macOS)

#!/bin/bash
# Check if CaptureGem is already running
if ! pgrep -x "capturegem" > /dev/null
then
    echo "Starting CaptureGem in headless mode..."
    capturegem --headless --config /etc/capturegem/default.json &
fi

PowerShell Example (Windows)

# Auto-restart if the process crashes
while ($true) {
    if (!(Get-Process "CaptureGem" -ErrorAction SilentlyContinue)) {
        Write-Host "Restarting CaptureGem..."
        Start-Process "C:\Apps\CaptureGem.exe" -ArgumentList "--headless"
    }
    Start-Sleep -Seconds 60
}

5. CLI Argument Reference

Argument Description
--headless Starts the app without the GUI.
--config [path] Uses a specific JSON configuration file.
--log-level [level] Set verbosity: debug, info, warn, error.
--export-metadata Export current session metadata to a JSON file and exit.
--port [n] Set the local API port for the Monitor service.

💾 Power User Resources

Get the most out of your rig with our CLI cheat sheet.

Download CLI Cheat Sheet (PDF)

Rate this guide

Loading ratings...

Was this guide helpful?

Comments