CLI Installation
Install and set up the msgs.global command-line interface
Overview
The msgsg CLI is a powerful command-line tool for managing the msgs.global mail platform. It provides an interactive shell and single-command execution mode for domain management, mail queue operations, analytics, and platform configuration.
System Requirements
- Linux (amd64) or macOS
- Network access to your msgs.global instance
- Valid msgs.global account credentials
Installation Methods
Method 1: Download Pre-built Binary
Download the latest release for your platform:
# Linux (amd64)
curl -L https://msgs.global/downloads/msgsg-linux-amd64 -o msgsg
chmod +x msgsg
sudo mv msgsg /usr/local/bin/
# macOS
curl -L https://msgs.global/downloads/msgsg-darwin-amd64 -o msgsg
chmod +x msgsg
sudo mv msgsg /usr/local/bin/
Method 2: Build from Source
If you prefer to build from source:
# Clone the repository
git clone https://github.com/afterdarksys/msgs.global.git
cd msgs.global/cli/msgsg
# Build the binary
go build -o msgsg .
# Install to your PATH
sudo mv msgsg /usr/local/bin/
Method 3: Package Manager (Coming Soon)
Verify Installation
Confirm the CLI is installed correctly:
$ msgsg --version
msgsg version 0.1.0
Configuration
The CLI stores configuration and authentication tokens in your home directory:
- ~/.msgsg_token - Authentication session token (created on login)
- ~/.msgsg_history - Command history for interactive shell
First-Time Setup
After installation, authenticate with your msgs.global account:
$ msgsg login
Username: your-username
Password: ********
Authenticated as your-username
Your authentication token is now stored in ~/.msgsg_token and will be used for all subsequent commands.
Usage Modes
Interactive Shell
Launch the interactive shell for exploratory work and multiple commands:
$ msgsg
╔╦╗╔═╗╔═╗╔═╗ ╔═╗╦ ╔═╗╔╗ ╔═╗╦
║║║╚═╗║ ╦╚═╗ ║ ╦║ ║ ║╠╩╗╠═╣║
╩ ╩╚═╝╚═╝╚═╝ ╚═╝╩═╝╚═╝╚═╝╩ ╩╩═╝
msgs.global mail platform CLI v0.1.0
Type 'help' for available commands, 'exit' to quit.
msgsg@relay-a>
Single-Command Mode
Execute a single command and exit (useful for scripts and automation):
# List all domains
msgsg domain list
# Trace a message
msgsg trace alice@example.com
# Show quarantine
msgsg quarantine list --limit 50
Troubleshooting
Permission Denied
If you see "permission denied" errors, ensure the binary is executable:
chmod +x /usr/local/bin/msgsg
Command Not Found
If the shell can't find msgsg, ensure /usr/local/bin is in your PATH:
echo $PATH
# Add to ~/.bashrc or ~/.zshrc if needed:
export PATH="/usr/local/bin:$PATH"
Authentication Failures
If authentication fails, verify your credentials and try logging in again:
msgsg logout
msgsg login