A command-line tool to extract JavaScript file paths and build manifest information from Next.js applications using headless Chrome automation.
showmethenext is a Go-based tool that uses Chrome DevTools Protocol (via chromedp) to extract JavaScript file information from Next.js applications. It can retrieve page routes, JavaScript file paths, and build manifest data from websites by analyzing the __BUILD_MANIFEST object in the browser.
- Extract page routes from Next.js applications
- Get complete build manifest with all JavaScript and CSS file paths
- Generate full URLs for JavaScript files (with
-full-urlflag) - Output results in JSON format or plain text (one per line)
- Save results to a file
- Process multiple URLs concurrently with configurable thread count
- Filter and extract only JavaScript files
- Go 1.25.4 or later
- Chrome or Chromium browser installed
git clone https://github.com/Jhounx/showmethenext.git
cd showmethenext
go build -o showmejs main.godocker build -t showmethenext .# Basic usage
echo "https://example.com" | docker run -i showmethenext
# Get complete build manifest
echo "https://example.com" | docker run -i showmethenext -js
# Extract JavaScript files with full URLs
echo "https://example.com" | docker run -i showmethenext -js -jj -full-url
# Save output to a file (using volume mount)
echo "https://example.com" | docker run -i -v $(pwd):/output showmethenext -js -full-url -o /output/results.json
# Process multiple URLs
cat urls.txt | docker run -i showmethenext -js -threads 10You can also create a docker-compose.yml file:
version: '3.8'
services:
showmethenext:
build: .
stdin_open: true
tty: true
volumes:
- ./output:/outputThen use it:
echo "https://example.com" | docker-compose run --rm showmethenext -js -full-url -o /output/results.jsonThe tool reads URLs from standard input (stdin) and processes them concurrently.
# Get page routes
echo "https://example.com" | ./showmejs
# Get complete build manifest
echo "https://example.com" | ./showmejs -js| Flag | Description | Default |
|---|---|---|
-threads |
Number of concurrent workers (threads) | 5 |
-js |
Enable full __BUILD_MANIFEST extraction |
false |
-o |
Output file path to save results | (stdout) |
-full-url |
Return full URLs for .js files in format: url/_next/js_path |
false |
-jj |
Just JS: return only .js file URLs, one per line | false |
echo "https://www.ifood.com.br/" | ./showmejsOutput:
{
"pages": ["/", "/404", "/about"],
"url": "https://www.ifood.com.br/"
}echo "https://www.ifood.com.br/" | ./showmejs -js | jqOutput:
{
"urls": {
"/": [
"static/chunks/7d0bf13e-822f25f772721f80.js",
"static/chunks/7235-7d3a858c47582b51.js",
"static/css/c87183fbe96e3d28.css"
],
"/404": [
"static/chunks/pages/404-ee7066db01dc9ae9.js"
]
},
"url": "https://www.ifood.com.br/",
"files": [
"static/chunks/7d0bf13e-822f25f772721f80.js",
"static/chunks/7235-7d3a858c47582b51.js",
"static/chunks/pages/404-ee7066db01dc9ae9.js"
]
}echo "https://www.ifood.com.br/" | ./showmejs -js -full-url | jqOutput:
{
"urls": {
"/": [
"https://www.ifood.com.br/_next/static/chunks/7d0bf13e-822f25f772721f80.js",
"https://www.ifood.com.br/_next/static/chunks/7235-7d3a858c47582b51.js"
],
"/404": [
"https://www.ifood.com.br/_next/static/chunks/pages/404-ee7066db01dc9ae9.js"
]
},
"url": "https://www.ifood.com.br/",
"files": [
"https://www.ifood.com.br/_next/static/chunks/7d0bf13e-822f25f772721f80.js",
"https://www.ifood.com.br/_next/static/chunks/7235-7d3a858c47582b51.js",
"https://www.ifood.com.br/_next/static/chunks/pages/404-ee7066db01dc9ae9.js"
]
}echo "https://www.ifood.com.br/" | ./showmejs -js -jjOutput:
static/chunks/7d0bf13e-822f25f772721f80.js
static/chunks/7235-7d3a858c47582b51.js
static/chunks/pages/index-dcb950bd626bb71e.js
echo "https://www.ifood.com.br/" | ./showmejs -js -jj -full-urlOutput:
https://www.ifood.com.br/_next/static/chunks/7d0bf13e-822f25f772721f80.js
https://www.ifood.com.br/_next/static/chunks/7235-7d3a858c47582b51.js
https://www.ifood.com.br/_next/static/chunks/pages/index-dcb950bd626bb71e.js
echo "https://www.ifood.com.br/" | ./showmejs -js -full-url -o results.jsoncat urls.txt | ./showmejs -js -threads 10Where urls.txt contains:
https://example.com
https://another-site.com
https://third-site.com
# Extract JS files and download them
echo "https://www.ifood.com.br/" | ./showmejs -js -jj -full-url | xargs -I {} wget {}
# Filter specific files
echo "https://www.ifood.com.br/" | ./showmejs -js -jj -full-url | grep "pages"Returns a JSON object with:
pages: Array of page routesurl: The processed URL
Returns a JSON object with:
urls: Map of routes to their associated filesurl: The processed URLfiles: Array of all unique JavaScript files found
Returns plain text, one JavaScript file URL per line (no JSON formatting).
When combined with -js, all JavaScript file paths are converted to full URLs in the format:
{base_url}/_next/{js_path}
CSS files are filtered out when -full-url is active.
- The tool uses headless Chrome to navigate to websites and extract build manifest data
- Each URL has a timeout of 90 seconds
- The overall process has a timeout of 10 minutes
- Results are written thread-safely when using the
-oflag - When
-full-urlis active, CSS files are excluded from the output - The
-jjflag returns only JavaScript files, one per line, making it easy to pipe to other tools
- Go 1.25.4+
- Chrome/Chromium browser
- Network access to target URLs
- Docker installed
- Network access to target URLs (Docker will handle Chrome/Chromium automatically)