CLI & SDK
Run security scans from your terminal. No installation required.
INSTALLATION
No global install needed. Run directly with npx:
npx wardek scan https://example.comOr install globally for repeated use:
npm install -g wardekAPI KEY CONFIGURATION
Set your API key as an environment variable. The CLI reads from WARDEK_API_KEY automatically.
# Set for current session
export WARDEK_API_KEY="ssk_live_your_api_key_here"
# Or pass inline
WARDEK_API_KEY="ssk_live_..." npx wardek scan https://example.com
# Or add to .env
echo 'WARDEK_API_KEY=ssk_live_...' >> .envWithout an API key, scans run in anonymous mode with reduced capabilities (no history, no export).
USAGE
Basic scan
npx wardek scan https://example.com
# Output:
# WARDEK SECURITY SCAN
# Target: https://example.com
# Score: 87/100 [B+]
# ─────────────────────
# Headers ██████████░░ 82%
# SSL ████████████ 100%
# Cookies ████████░░░░ 67%
# CORS ████████████ 100%
# ...View scan history
npx wardek scans --limit 10Export results
# JSON export
npx wardek export <scan-id> --format json > report.json
# YAML export
npx wardek export <scan-id> --format yaml > report.yamlFail on threshold (CI/CD)
# Exit code 1 if score < 75
npx wardek scan https://example.com --min-score 75
# Fail on any critical finding
npx wardek scan https://example.com --fail-on-criticalCLI OPTIONS
TYPESCRIPT SDK
COMING SOONA typed client library for seamless integration into Node.js and TypeScript projects. Subscribe to the changelog for release announcements.
Preview
import { WarDek } from '@wardek/sdk';
const client = new WarDek({
apiKey: process.env.WARDEK_API_KEY!,
});
// Launch a scan
const scan = await client.scan('https://myapp.com');
logger.info(scan.score); // 87
logger.info(scan.grade); // "B+"
// List recent scans
const { scans } = await client.listScans({ limit: 5 });
// Export results
const json = await client.export(scan.id, 'json');
const yaml = await client.export(scan.id, 'yaml');
// CI/CD helper
const passed = scan.score >= 75 && !scan.hasCritical;
process.exit(passed ? 0 : 1);The SDK will be published on npm as
@wardek/sdk. It will include full TypeScript types, automatic retry logic, and streaming support for real-time scan progress.