Getting Started
SCW-AI is a CLI tool that uses Puppeteer to scrape Secure Code Warrior challenges and format them as prompt-friendly output for AI-powered code analysis workflows.
Prerequisites
Installation
From source
git clone https://github.com/catesandrew/scw-ai.git
cd scw-ai
pnpm install
As a standalone binary
If you have Bun installed, you can compile a self-contained executable:
pnpm build
This produces bin/scw-ai which can be copied anywhere on your system.
Configuration
Copy the example environment file and add your Secure Code Warrior session ID:
cp .env.example .env
Edit .env and set:
SCW_SESSION_ID=your-session-id-here
SCW_CHALLENGE_URL=https://portal.securecodewarrior.com/#/assessments/take/...
Finding your session ID
- Open your browser and navigate to Secure Code Warrior.
- Log in to your account.
- Open the browser Developer Tools (
F12orCmd+Option+I). - Go to Application > Local Storage >
https://portal.securecodewarrior.com. - Find the
sessionIdkey and copy its value.
Quick start
# Interactive mode (prompts for URL and settings)
pnpm start
# Direct mode with flags
node src/index.js --url "https://portal.securecodewarrior.com/#/assessments/take/..." --session YOUR_SESSION_ID
# Using the compiled binary
./bin/scw-ai --url "..." --session "..."
The CLI prints a formatted prompt and copies it to your clipboard (macOS only).