CLI Command Reference

The loginalertx command-line interface provides full headless management for configuration, channels, service control, licensing, diagnostics, and testing.

Quick Start Examples

# Check background service status
loginalertx service status

# View live dashboard and statistics
loginalertx stats

# Show active configuration
loginalertx config show

# Send a test alert
loginalertx test send email
loginalertx test send slack

1. Service Management (service)

Manage the Login AlertX background monitoring engine.

Command Description Example
loginalertx service status Show service running state, PID, uptime, and last event processed loginalertx service status
loginalertx service reload Signal background service via IPC to reload configuration and plugins immediately loginalertx service reload

2. Licensing (license)

Inspect, activate, and manage application license state.

Command Description Example
loginalertx license info Show license tier, activation status, expiry, and channel quotas loginalertx license info
loginalertx license activate <email> <key> Activate license key against the licensing server loginalertx license activate [email protected] ABC-123-XYZ
loginalertx license revoke Remove local license data and return to default state loginalertx license revoke

3. Configuration Management (config)

General Configuration

Command Description Example
loginalertx config show Display formatted summary table of all current settings loginalertx config show
loginalertx config export <path> Export configuration to a portable JSON template loginalertx config export /path/to/template.json
loginalertx config import <path> Import settings from a JSON template and apply loginalertx config import /path/to/template.json

Email & SMTP (config email)

Command Description Example
loginalertx config email set Update SMTP host, port, credentials, and recipients (supports partial updates) loginalertx config email set --host smtp.gmail.com --port 587 --user [email protected] --to [email protected]
loginalertx config email oauth login Authenticate Google OAuth via Device Flow (headless-friendly) loginalertx config email oauth login --provider google
loginalertx config email oauth status Display OAuth token storage status and expiry loginalertx config email oauth status
loginalertx config email oauth logout Clear stored OAuth token loginalertx config email oauth logout

Notification Channels (config channel)

Command Description Example
loginalertx config channel list List all available channels and their current enabled/disabled state loginalertx config channel list
loginalertx config channel enable <name> Enable a channel (email, push, whatsapp, slack, teams, discord, telegram, googlechat) loginalertx config channel enable slack
loginalertx config channel disable <name> Disable a channel loginalertx config channel disable discord

Plugin Channels & Webhooks (config plugin)

Command Description Example
loginalertx config plugin set slack Configure Slack webhook URL loginalertx config plugin set slack --webhook https://hooks.slack.com/...
loginalertx config plugin set teams Configure Microsoft Teams webhook URL loginalertx config plugin set teams --webhook https://outlook.office.com/...
loginalertx config plugin set discord Configure Discord webhook URL loginalertx config plugin set discord --webhook https://discord.com/api/webhooks/...
loginalertx config plugin set telegram Configure Telegram Bot Token and Chat ID loginalertx config plugin set telegram --token BOT_TOKEN --chat-id CHAT_ID
loginalertx config plugin set googlechat Configure Google Chat webhook URL loginalertx config plugin set googlechat --webhook https://chat.googleapis.com/...

WhatsApp (config whatsapp)

Command Description Example
loginalertx config whatsapp set Set the WhatsApp recipient phone number loginalertx config whatsapp set --number +1234567890

Scheduling & Quiet Hours (config schedule)

Command Description Example
loginalertx config schedule show View current scheduling window settings loginalertx config schedule show
loginalertx config schedule set Set active notification window (setting start == end disables filtering) loginalertx config schedule set --enable true --start 08:00 --end 22:00

Brute-Force Detection (config bruteforce)

Command Description Example
loginalertx config bruteforce set Configure failed attempt count threshold and time window loginalertx config bruteforce set --count 5 --window-minutes 1

Event Filtering (config events)

Command Description Example
loginalertx config events list List all system event types and their alert trigger status loginalertx config events list
loginalertx config events enable <type> Enable alerts for a specific event type loginalertx config events enable FailedLogon
loginalertx config events disable <type> Disable alerts for a specific event type loginalertx config events disable SessionLogoff
loginalertx config events enable-all Remove filters and alert on all detected events loginalertx config events enable-all

Scheduled Reports (config reports)

Command Description Example
loginalertx config reports set Configure periodic security summary reports loginalertx config reports set --enable true --frequency Weekly --email [email protected]

4. Trusted Accounts Whitelist (trusted)

Manage the whitelist of accounts whose normal logins do not trigger alerts.

Command Description Example
loginalertx trusted list List all whitelisted accounts loginalertx trusted list
loginalertx trusted add <account> Whitelist an account loginalertx trusted add admin
loginalertx trusted add "DOMAIN\User"
loginalertx trusted remove <account> Remove an account from whitelist loginalertx trusted remove admin

5. Notification Testing (test)

Verify notification dispatch and credential setup immediately without triggering actual login events.

Command Description Example
loginalertx test send <channel> Send a test alert through a specific channel loginalertx test send email
loginalertx test send slack
loginalertx test send telegram

6. Historical Events (Database)

View the most recent login and security events processed by the service without reading raw log files.

Command Description Example
loginalertx events show Show recent 50 events in a table loginalertx events show
loginalertx events show -l <N> Show recent N events loginalertx events show -l 10

7. Service Logs & Diagnostics (logs)

Command Description Example
loginalertx logs show Print the last N lines of the service log (default: 50) loginalertx logs show --last 100
loginalertx logs tail Follow / stream the service log in real-time (Ctrl+C to exit) loginalertx logs tail
loginalertx logs path Print the absolute filesystem path to the current service log file loginalertx logs path

8. Metrics & Dashboard (stats)

Command Description Example
loginalertx stats Display live dashboard: login counts, alerts sent by channel, brute-force triggers, and service uptime loginalertx stats
On This Page
Scroll to Top