Skip to main content

EntryGuard CLI (eg)

The EntryGuard CLI lets you start, stop, and manage IP whitelisting sessions directly from your terminal — no browser required.

Why Use the CLI?

  • Speed — Start a session in one command: eg session start
  • Automation — Script session management in CI/CD pipelines and shell scripts
  • Multiple organizations — Switch between profiles like the AWS CLI (--profile)
  • JSON output — Pipe structured data to jq or other tools with --output json

Quick Example

# Start a session (auto-detects your IP)
eg session start

# Check your status
eg status

# Stop your active session
eg session stop

Prerequisites

  • An EntryGuard account with resources assigned to your user
  • An API key for authentication — see Create & Manage API Keys

Commands

CommandDescription
eg profile add <name>Add a new profile with API key
eg profile listList configured profiles
eg profile use <name>Set default profile
eg profile remove <name>Remove a profile
eg session startStart a new session
eg session stop [id]Stop a session
eg session listList your sessions
eg session get <id>Get session details
eg session extend <id>Extend a session
eg ipDetect your public IP
eg statusCombined overview

Global Flags

FlagDescriptionDefault
--profile <name>Use a specific profile instead of the defaultDefault profile
--output <format>Output format: table or jsontable

Next Steps


API Reference: The CLI uses the same API as the web dashboard. See API Overview.