Skip to main content

CLI Reference

Synopsis​

scw-ai [options] [url]

The CLI can be invoked via node src/index.js, pnpm start, or the compiled bin/scw-ai binary.

Options​

FlagDescriptionDefault
--url <value>Challenge URLPrompts interactively
--session <value>sessionId from SCW localStorageSCW_SESSION_ID env var
--tab-delay <ms>Delay in milliseconds between tab clicks600
--headless / --no-headlessToggle Puppeteer headless modetrue
--newUse the vulnerability discovery collectorfalse
--fixUse the diff/solution comparison collectorfalse

Positional arguments​

The first positional argument is treated as the challenge URL if --url is not provided:

node src/index.js https://portal.securecodewarrior.com/#/assessments/take/...

Environment variables​

VariableDescription
SCW_SESSION_IDDefault session ID (loaded from .env or shell environment)
SCW_CHALLENGE_URLDefault challenge URL when none is provided

Examples​

Default mode (interactive)​

pnpm start

Prompts for the challenge URL, headless preference, and tab delay.

Specify all options​

node src/index.js \
--url "https://portal.securecodewarrior.com/#/assessments/take/ABC/XYZ" \
--session YOUR_SESSION_ID \
--tab-delay 800 \
--no-headless

Vulnerability discovery mode​

node src/index.js --new --url "..."

Solution comparison mode​

node src/index.js --fix --url "..."

Exit codes​

CodeMeaning
0Success
1Error (missing arguments, browser failure, iframe not found, etc.)