Skip to content

jsmonhq/jsmon-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSMon CLI

The official command-line tool for JSMon. Scan URLs and domains, upload files, and explore reconnaissance data—all from your terminal.

JSMon CLI - Help


Table of Contents


Quick Start

  1. Install the CLI (see Installation).
  2. Set your API key (flag, file, or env—see Configuration).
  3. Create or pick a workspace, then start scanning.
# Create a workspace
jsmon -cw "My Project" -key YOUR_API_KEY

# Scan a URL (use the workspace ID from the previous command)
jsmon -u "https://example.com/app.js" -wksp YOUR_WORKSPACE_ID

# List reconnaissance data (e.g. emails)
jsmon -recon "field=emails page=1" -wksp YOUR_WORKSPACE_ID

Quick start - Create workspace and scan


Installation

Option 1: Install from Go (recommended)

go install github.com/jsmonhq/jsmon-cli@latest

Ensure your Go bin directory is in your PATH (e.g. $HOME/go/bin). The binary is typically named jsmon-cli; you can rename or symlink it to jsmon if you prefer.

Option 2: Build from source

git clone https://github.com/jsmonhq/jsmon-cli.git
cd jsmon-cli
go build -o jsmon .

Use -o jsmon to get a binary named jsmon.


Configuration

API key

Get your API key from JSMon. The CLI looks for it in this order:

Priority Source
1 -key YOUR_API_KEY
2 File: ~/.jsmon/credentials
3 Environment: JSMON_API_KEY

Credentials file: Create ~/.jsmon/credentials and put your API key on the first line (no label). Lines starting with # are ignored.

Workspace ID

For scanning and data commands you need a workspace ID:

  • Pass it with -wksp YOUR_WORKSPACE_ID, or
  • Set JSMON_WORKSPACE_ID in your environment.

The workspace ID is not read from the credentials file; it must be provided per command or via env.

Optional

  • -H "Header-Name: value" — Add custom HTTP headers for scan requests (can be used multiple times).
  • -silent — Hide the JSMon logo when running commands.

Configuration - Credentials and workspace


Commands Overview

Usage: jsmon-cli [OPTIONS]

Input:
  -u <input>                                  Input URL to scan
  -d <input>                                  Input domain to scan
  -f <input>                                  Input file of URLs to scan (one URL per line)
  -cw <input> | --create-workspace <input>    Create a new workspace

Configuration:
  -key <input>                                API key (or add the API key to ~/.jsmon/credentials)
  -wksp <wksp id>                             Workspace ID to scan the target
  -H <input>                                  Custom HTTP headers to send along with request to scan
  -resume                                     Resume scan using resume.config
                                              (resumes from last scan failed due to force stop or API limits)
  -silent                                     Silent the logo
  -up, --update                                Check for updates and show update command
  -duc, --disable-update-check                Disable automatic update check on startup

Scans:
  -count                                      Show the counts of reconnaissance data and secrets count
  --urls "page=<page number> limit=<number>"   Fetch all scanned URLs (default: page=1, limit=100)
  --domains "page=<page number> limit=<number>" Fetch all scanned domains (default: page=1, limit=100)
  --files "page=<page number> limit=<number>"  Fetch all scanned files (default: page=1, limit=100)

Data:
  -workspaces                                 Fetch all workspaces
  -secrets "page=<number> limit=<number>"      Fetch all secrets for a workspace (default: page=1, limit=100)
  -recon "field=<name> page=<number> limit=<number>"
                                              Fetch the reconnaissance data (default: page=1, limit=100)
                                              Example: -recon "field=emails page=3 limit=50"

Reverse Search:
  -rsearch "<field name>=<value>"             Search the source of the result where it comes from
                                              Example: -rsearch "apipaths=@azure/msal-browser"

Filter:
  -filters "<fieldname>=<keyword> page=<number> limit=<number>"
                                                    Match keywords in the field data in reconnaissance results
                                                    (default: page=1, limit=100)
                                                    Example: -filters "urls=github.com page=2 limit=50"

Help:
  -h, --help                                  Show this help message

Field Names:
  -recon, -rsearch:
    apiPaths, urls, extractedDomains, ip, emails, s3Buckets, s3takeovers,gqlQueries, gqlMutaions, gqlFragments, param (extracted parameter),
    npmPackages, npmConfusion, guids, localhost, activeDomains,inactiveDomains, allAwsAssets, queryparams, socialUrls,
    portUrls, extensionUrls

  -filters:
    jsurls, apiPaths, urls, emails, gqlQueries, gqlMutaions,sqlFragments, param (extracted parameter)

Scanning

Upload a single URL

jsmon -u "https://example.com/script.js" -wksp YOUR_WORKSPACE_ID

Scan a domain

jsmon -d "example.com" -wksp YOUR_WORKSPACE_ID

Upload multiple URLs from a file

Put one URL per line in a file, then:

jsmon -f urls.txt -wksp YOUR_WORKSPACE_ID

Resume a previous scan

If a scan was interrupted (e.g. API limits), you can resume using the saved config:

jsmon -resume resume.cfg -wksp YOUR_WORKSPACE_ID

Scanning - URL or domain


Viewing Data

Workspaces

jsmon -workspaces -key YOUR_API_KEY

Scanned URLs, domains, and files

jsmon --urls "page=1 limit=50" -wksp YOUR_WORKSPACE_ID
jsmon --domains "page=1 limit=50" -wksp YOUR_WORKSPACE_ID
jsmon --files "page=1 limit=50" -wksp YOUR_WORKSPACE_ID

Default is page=1 and limit=100 if omitted. (Max limit: 5000 per page)

Secrets

jsmon -secrets "page=1 limit=100" -wksp YOUR_WORKSPACE_ID

Count summary

jsmon -count -wksp YOUR_WORKSPACE_ID

Optional: add -runId RUN_ID for a specific run.


Reconnaissance & Filters

Fetch reconnaissance data (-recon)

Get extracted intelligence for a field and optional pagination:

jsmon -recon "field=emails page=1 limit=50" -wksp YOUR_WORKSPACE_ID

Common fields: apiPaths, urls, extractedDomains, ip, emails, s3Buckets, gqlQueries, gqlFragments, param, queryparams, allAwsAssets, npmPackages, socialUrls, portUrls, extensionUrls, and others (see jsmon -h).

Filter by keyword (-filters)

Search within a field (e.g. only URLs containing "github"):

jsmon -filters "urls=github.com page=1" -wksp YOUR_WORKSPACE_ID
jsmon -filters "param=github page=1" -wksp YOUR_WORKSPACE_ID

Format: "fieldname=keyword page=N limit=N". Defaults: page=1, limit=100.

Reconnaissance and filters


Reverse Search

Find where a value came from (e.g. which script exposes an API path):

jsmon -rsearch "apipaths=@azure/msal-browser" -wksp YOUR_WORKSPACE_ID
jsmon -rsearch "extractedDomains=blogs.jsmon.sh" -wksp YOUR_WORKSPACE_ID

Format: "fieldname=value". Use extractedDomains (not domains) for domain reverse search.


Updates

  • Automatic: On startup the CLI checks for a newer release and prints a message if one exists (no auto-download).
  • Manual check: jsmon -up or jsmon --update to check and see the install command.
  • Disable startup check: jsmon -duc or jsmon --disable-update-check.

To upgrade after a new release:

go install github.com/jsmonhq/jsmon-cli@latest

Examples

# Create workspace
jsmon -cw "My Project" -key YOUR_API_KEY

# Scan targets
jsmon -u "https://example.com/script.js" -wksp YOUR_WORKSPACE_ID
jsmon -d "example.com" -wksp YOUR_WORKSPACE_ID
jsmon -f urls.txt -wksp YOUR_WORKSPACE_ID

# Use credentials file (no -key needed)
jsmon -u "https://example.com/script.js" -wksp YOUR_WORKSPACE_ID

# Reconnaissance
jsmon -recon "field=emails page=1" -wksp YOUR_WORKSPACE_ID
jsmon -recon "field=allAwsAssets page=1" -wksp YOUR_WORKSPACE_ID

# Filter and reverse search
jsmon -filters "urls=api page=1" -wksp YOUR_WORKSPACE_ID
jsmon -rsearch "apipaths=/auth/login" -wksp YOUR_WORKSPACE_ID

License & Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages