-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
Complete reference for every ScarpShield CLI command, option, and example.
python main.py <command> [options]Get help at any time:
python main.py --help
python main.py <command> --helpAdd a smart contract address to the watchlist.
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--label |
-l |
string | "" |
Friendly name for the contract |
--chain |
-c |
string | ethereum |
Blockchain network |
Supported chains: ethereum, polygon, bsc, arbitrum, base
Example:
python main.py add 0xdAC17F958D2ee523a2206206994597C13D831ec7 --label "USDT" --chain ethereumOutput:
[+] Added USDT on ethereum
The address is automatically validated and EIP-55 checksummed.
Remove a contract from the watchlist by address (case-insensitive).
Example:
python main.py remove 0xdAC17F958D2ee523a2206206994597C13D831ec7Output:
[-] Removed 0xdAC17F958D2ee523a2206206994597C13D831ec7
Display all monitored contracts in a numbered list.
Example:
python main.py listOutput:
==================================================
ScarpShield v1.0.1
Powered by CounterScarp.io
==================================================
1. [ethereum] USDT - 0xdAC17F958D2ee523a2206206994597C13D831ec7
2. [polygon] QuickSwap - 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff
Show the current status of all alert channels.
Example:
python main.py alertsOutput:
==================================================
ScarpShield v1.0.1
Powered by CounterScarp.io
==================================================
Alert Channels:
console [ON]
email [OFF]
discord [OFF]
slack [OFF]
telegram [OFF]
Enable a specific alert channel.
Valid channels: console, email, discord, slack, telegram
Example:
python main.py enable-alert discordOutput:
[+] discord alerts enabled
Disable a specific alert channel.
Valid channels: console, email, discord, slack, telegram
Example:
python main.py disable-alert emailOutput:
[-] email alerts disabled
Interactively configure SMTP email alerts. You will be prompted for each setting.
| Prompt | Default | Notes |
|---|---|---|
| SMTP host | — | e.g., smtp.gmail.com
|
| SMTP port | 587 |
Common ports: 587 (TLS), 465 (SSL), 25 |
| SMTP user | — | Usually your email address |
| SMTP password | — | Hidden input; use app passwords for Gmail |
| Recipient email(s) | — | Comma-separated for multiple recipients |
Example session:
python main.py setup-emailSMTP host: smtp.gmail.com
SMTP port [587]: 587
SMTP user: alerts@mydomain.com
SMTP password:
Recipient email(s), comma-separated: admin@mydomain.com,ops@mydomain.com
[+] Email alerts configured -> admin@mydomain.com,ops@mydomain.com
Note: You can also set credentials via
.envvariables (SCARPSHIELD_SMTP_*) for better security.
Interactively configure a Discord webhook for alerts.
Example session:
python main.py setup-discordDiscord webhook URL: https://discord.com/api/webhooks/123456789/abcdef...
[+] Discord alerts configured
Create a webhook in your Discord server: Server Settings → Integrations → Webhooks.
Interactively configure a Slack incoming webhook for alerts.
Example session:
python main.py setup-slackSlack webhook URL: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
[+] Slack alerts configured
Create a webhook in your Slack workspace: Apps → Incoming Webhooks → Add to Slack.
Interactively configure Telegram bot alerts.
| Prompt | Description |
|---|---|
| Bot token | From @BotFather |
| Chat ID | Numeric ID of the chat or channel (e.g., -1001234567890) |
Example session:
python main.py setup-telegramBot token: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
Chat ID: -1001234567890
[+] Telegram alerts configured
Note: Telegram alerts are optional. This tool is completely separate from the CounterScarp.io Telegram community channel.
Send a test alert to every enabled channel to verify connectivity and credentials.
Example:
python main.py test-alertsOutput:
[+] Test alert sent to all enabled channels.
You should receive a test message on every channel you have enabled (console, email, Discord, Slack, Telegram).
Start the monitoring loop. ScarpShield will poll the blockchain at the configured interval and dispatch alerts for any detected events.
Example:
python main.py startOutput:
==================================================
ScarpShield v1.0.1
Powered by CounterScarp.io
==================================================
Monitoring 2 contract(s) on ethereum, polygon...
(Press Ctrl+C to stop)
Press Ctrl+C to gracefully stop the monitor.
Show a summary of the current configuration.
Example:
python main.py statusOutput:
==================================================
ScarpShield v1.0.1
Powered by CounterScarp.io
==================================================
Contracts: 2
Alerts: console, discord
Poll rate: 15s
Chains: ethereum, polygon
Generate a fresh config.json with default values. Safe to run — it will not overwrite an existing config without reloading it first.
Example:
python main.py initOutput:
[+] config.json created with defaults
Edit it or use CLI commands to configure.
Launch the ScarpShield web dashboard.
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--port |
-p |
int | 8050 |
Port to bind the server |
--host |
-h |
string | 127.0.0.1 |
Host interface to bind |
--no-browser |
— | flag | False |
Do not open the browser automatically |
Example — default launch:
python main.py guiOutput:
╔══════════════════════════════════════════╗
║ ScarpShield Web Dashboard ║
║ THE OUTER WALL OF DEFENSE ║
╠══════════════════════════════════════════╣
║ Running at: http://127.0.0.1:8050 ║
║ Press Ctrl+C to stop ║
╚══════════════════════════════════════════╝
Example — custom port, no browser:
python main.py gui --port 8080 --host 0.0.0.0 --no-browserThe dashboard features: real-time event feed (SSE), contract management, alert channel toggling, inline settings editing, and log browsing with JSON export.
| Command | Purpose |
|---|---|
add <address> |
Add a contract to the watchlist |
remove <address> |
Remove a contract |
list |
Show all monitored contracts |
alerts |
Show alert channel status |
enable-alert <channel> |
Turn on an alert channel |
disable-alert <channel> |
Turn off an alert channel |
setup-email |
Configure SMTP email |
setup-discord |
Configure Discord webhook |
setup-slack |
Configure Slack webhook |
setup-telegram |
Configure Telegram bot |
test-alerts |
Send test alert to all enabled channels |
start |
Begin monitoring loop |
status |
Show config summary |
init |
Create default config.json |
gui |
Launch web dashboard |