A command-line tool for interacting with the JSMon API to scan URLs, domains, and upload files.
Install directly from the repository:
go install github.com/jsmonhq/jsmon-cli@latestAfter installation, make sure $GOPATH/bin (or $HOME/go/bin by default) is in your PATH. The binary will be available as jsmon-cli.
For development or custom builds:
git clone https://github.com/jsmonhq/jsmon-cli.git
cd jsmon-cli
go build -o jsmon-cliYou need a JSMon API key. The priority order is:
-keyflag (highest priority)~/.jsmon/credentialsfileJSMON_API_KEYenvironment variable
For scanning operations, you also need a workspace ID (must be provided via command or env var):
- Pass it via the
-wkspflag - Set it as an environment variable:
JSMON_WORKSPACE_ID
Note: Workspace ID is NOT read from the credentials file and must be provided in the command.
Create ~/.jsmon/credentials with your API key written directly in the file:
your-api-key-here
The file should contain only the API key (first non-empty, non-comment line). Lines starting with # are treated as comments and empty lines are ignored.
Note: Only the API key is stored in the credentials file. Workspace ID must be provided via -wksp flag or environment variable.
jsmon-cli -cw "My Workspace" -key <your-api-key>
# or
jsmon-cli --create-workspace "My Workspace" -key <your-api-key>jsmon-cli -u "https://example.com/app.js" -wksp <workspace-id> -key <your-api-key>jsmon-cli -d "example.com" -wksp <workspace-id> -key <your-api-key>The file should contain one URL per line:
jsmon-cli -f urls.txt -wksp <workspace-id> -key <your-api-key>You can set the API key via environment variable (lowest priority after flag and credentials file):
export JSMON_API_KEY="your-api-key"For workspace ID, you can set it via environment variable:
export JSMON_WORKSPACE_ID="your-workspace-id"Then you can use the tool without the -wksp flag (API key will be read from credentials file if set):
jsmon-cli -u "https://example.com/app.js"
jsmon-cli -d "example.com"
jsmon-cli -f urls.txt# Create a workspace
jsmon-cli -cw "My Project" -key abc123
# Upload a single URL
jsmon-cli -u "https://example.com/script.js" -wksp 30319f3d-8d35-42db-afb7-e2bd7f8f7fb1 -key abc123
# Scan a domain
jsmon-cli -d "example.com" -wksp 30319f3d-8d35-42db-afb7-e2bd7f8f7fb1 -key abc123
# Upload multiple URLs from a file
jsmon-cli -f urls.txt -wksp 30319f3d-8d35-42db-afb7-e2bd7f8f7fb1 -key abc123
# Using credentials file (create ~/.jsmon/credentials first)
jsmon-cli -u "https://example.com/script.js"
jsmon-cli -d "example.com"
jsmon-cli -f urls.txt