CLI Reference
TK-TIS provides 5 command-line tools that run locally or in CI/CD pipelines. Each tool is a standalone npm package with zero or minimal dependencies.
The Five Tools
tk-scan Free
HTTP health checker. Validates status codes, response times, security headers, stale URLs, SEO, and CORS configuration.
tk-guard Free
Security scanner with 7 modules: headers, CORS, SSL/TLS, XSS, SQL injection, information disclosure, and auth endpoint analysis.
tk-pulse Free
Performance measurement tool. Measures TTFB, load time, response size, API latency, and calculates a speed grade.
tk-flow Pro
JSON-defined E2E test runner powered by Playwright. Define user journeys as simple JSON files, no code required.
tk-eye Pro
Visual regression testing. Captures baseline screenshots, compares pixel-by-pixel, and generates diff images.
Common Flags
All CLI tools share these common flags:
| Flag | Description |
|---|---|
--json |
Output results as JSON instead of formatted console output |
--no-color |
Disable ANSI color codes (useful for log files and CI systems) |
--help, -h |
Show help message with all available options |
--version, -v |
Show the tool version |
Exit Codes
All tools follow a consistent exit code convention for CI/CD integration:
| Code | Meaning | Tools |
|---|---|---|
0 |
Success / All checks passed | All |
1 |
Failure / Issues detected | All |
2 |
Fatal error (scan could not complete) | tk-guard |
Zero Dependencies
Three of the five tools (tk-scan, tk-guard, tk-pulse) have zero external dependencies. They use only Node.js built-in modules (https, http, tls, url), which means:
- Instant
npxexecution with no install wait - No supply chain risk from third-party packages
- Tiny package size (under 50 KB each)
- Works offline after first download
tk-flow and tk-eye require Playwright for browser automation and screenshot capture.
HTK-Cloud Integration
All tools can report results to the TK-TIS cloud backend for centralized monitoring and alerting. Use the --report flag or set environment variables:
# Via flag
tk-scan https://myapp.com --report https://htk-cloud-v4.enzu-agent.workers.dev/api/test-engine/external-report
# Via environment variables
export HTK_CLOUD_URL=https://htk-cloud-v4.enzu-agent.workers.dev
export HTK_CLOUD_TOKEN=your-api-key
export HTK_PROJECT=my-project
tk-guard https://myapp.com --deep
Programmatic Usage
Every tool exports a JavaScript API for use in custom scripts, test frameworks, or applications:
// tk-scan
const { scan } = require('@tk-tis/tk-scan');
const result = await scan('https://myapp.com', { threshold: 80 });
// tk-guard
import { guard } from '@tk-tis/tk-guard';
const findings = await guard('https://myapp.com', { deep: true });
// tk-pulse
const { measure } = require('@tk-tis/tk-pulse');
const perf = await measure('https://myapp.com');
// tk-flow
const { runFlow } = require('@tk-tis/tk-flow');
const results = await runFlow('tests/login.json');
// tk-eye
const { captureBaseline, compare } = require('@tk-tis/tk-eye');
await captureBaseline('https://myapp.com', ['/', '/about']);