Krythiq CLI Commands
Complete reference for all krythiq commands and options.
Initialize krythiq in your project. Creates config file, .krythiq/ directory, and updates .gitignore.
krythiq initOptions
--skip-gitignoreDon't modify .gitignore (default: false)
What It Does
- Detects your project stack (Node.js, TypeScript, Go, etc)
- Creates krythiq.config.mjs with sensible defaults
- Creates .krythiq/ directory for custom rules and data
- Adds .krythiq/ to .gitignore to avoid committing cache
Example
$ cd my-project
$ krythiq init
→ Detecting project stack...
✓ Node.js / TypeScript detected
✓ Created krythiq.config.mjs
✓ Added .krythiq/ to .gitignore
Ready. Run: krythiq run "npm start"Wrap a process and intercept stack traces for AI analysis. Streams explanations as errors occur.
krythiq run "npm start"Options
--no-aiDisable AI analysis, just pipe output through (default: false)
--model <model>Specify Anthropic model (default: claude-sonnet-4-20250514)
--verbosePrint debug info from krythiq itself
Examples
# Wrap your dev server
krythiq run "npm start"
# Works with any process
krythiq run "python app.py"
krythiq run "go run ."
krythiq run "cargo run"
# Use a different AI model for faster analysis
krythiq run --model claude-haiku-3.5 "npm test"
# Disable AI (just pipe output through)
krythiq run --no-ai "npm start"
# Debug krythiq itself
krythiq run --verbose "npm start"Requirements
- Anthropic API key configured (run krythiq auth)
- krythiq.config.mjs present in project root
Scan a directory for security vulnerabilities and code quality issues. Supports multiple output formats and CI integration.
krythiq scan [path]Options
--fixAuto-apply safe patches where possible
--ciExit with code 1 if issues found (for CI pipelines)
--fail-on <severity>Fail when issues of this severity or higher are found: low | medium | high | critical (default: high)
--format <fmt>Output format: text | json | markdown | sarif (default: text)
--ignore <patterns...>Glob patterns to exclude from scan (can specify multiple)
--rules <path>Path to custom rules JSON (default: .krythiq/rules.json)
--watchDaemon mode: rescan on file changes
--publishPublish scan summary to Supabase scan_history table
--aiEnable AI refactoring suggestions via Mistral
--ai-model <model>Mistral model name (default: mistral-large-latest)
Examples
# Scan current directory
krythiq scan
# Scan specific path
krythiq scan ./src
# Scan and auto-fix safe issues
krythiq scan --fix
# CI/CD integration
krythiq scan --ci --fail-on high
# Export as JSON for tooling
krythiq scan --format json > scan-results.json
# Ignore certain paths
krythiq scan --ignore "**/*.test.js" --ignore "**/node_modules/**"
# Watch mode for development
krythiq scan --watch
# Get AI suggestions
krythiq scan --ai --ai-model mistral-large-latestWhat It Detects
- Hardcoded secrets and credentials
- eval() usage and code injection risks
- dangerouslySetInnerHTML and XSS vulnerabilities
- Child process execution risks
- Custom security rules (from .krythiq/rules.json)
Configure your Anthropic API key for AI-powered features. Stores credentials securely in your home directory.
krythiq authOptions
--clearRemove stored API key credentials
Examples
# Set up API key (prompts for input)
krythiq auth
# Clear stored credentials
krythiq auth --clear
# Alternative: Set via environment variable
export ANTHROPIC_API_KEY="sk-ant-..."
krythiq run "npm start"Getting Your API Key
- Visit console.anthropic.com
- Sign up or log in to your account
- Navigate to API Keys section
- Create a new API key
- Run krythiq auth and paste the key when prompted
These options work with any krythiq command:
-v, --versionPrint krythiq version
-h, --helpShow help message
krythiq --version
krythiq --help
krythiq run --help# General help
krythiq --help
# Help for specific command
krythiq init --help
krythiq run --help
krythiq scan --help
krythiq auth --help