Run Command
The cyberstrike run command executes a single prompt without entering interactive mode, ideal for automation and scripting.
📸 SCREENSHOT: run-command-output.png
Run command execution output
Basic Usage
cyberstrike run "your prompt here"Example
cyberstrike run "scan example.com for open ports"File Attachment
Single File
cyberstrike run "review this code for vulnerabilities" -f src/auth.tsMultiple Files
cyberstrike run "compare these implementations" -f src/v1/auth.ts -f src/v2/auth.tsDirectory
cyberstrike run "analyze this codebase" -f src/Model Selection
Specify Model
cyberstrike run "complex analysis task" --model anthropic/claude-opus-4-5-20251101Quick Model
cyberstrike run "simple task" --model anthropic/claude-3-5-haiku-20241022Agent Selection
Use Specific Agent
cyberstrike run "test for SQL injection" --agent web-applicationAvailable Agents
cyberstrike run "enumerate network" --agent internal-networkcyberstrike run "audit cloud config" --agent cloud-securitycyberstrike run "recon target.com" --agent bug-hunterOutput Control
Plain Text
cyberstrike run "list vulnerabilities" --output textJSON Output
cyberstrike run "scan results" --output jsonMarkdown
cyberstrike run "generate report" --output markdownSave to File
cyberstrike run "scan target" > results.txtPermission Modes
Default (Interactive)
cyberstrike run "scan target" --permission defaultPrompts for permission on dangerous operations.
Auto-Approve
cyberstrike run "scan target" --permission autoDanger
Auto-approve mode executes all operations without confirmation. Use with caution.
Plan Mode
cyberstrike run "analyze attack surface" --permission planResearch only, no modifications.
Environment Variables
Pass Variables
TARGET=192.168.1.1 cyberstrike run "scan \$TARGET"From File
source .env && cyberstrike run "scan \$TARGET"Timeout
Set Timeout
cyberstrike run "long scan" --timeout 600000Timeout in milliseconds (default: 300000 = 5 minutes).
CI/CD Integration
GitHub Actions
- name: Security Scan run: | cyberstrike run "scan for vulnerabilities" \ --permission auto \ --output json > results.json env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}GitLab CI
security_scan: script: - cyberstrike run "analyze code for security issues" -f src/ --permission auto artifacts: paths: - security-report.txtJenkins
stage('Security Scan') { steps { sh ''' cyberstrike run "scan application" \ --agent web-application \ --permission auto ''' }}Piping Input
From Stdin
echo "scan 192.168.1.1" | cyberstrike run -From File
cat prompts.txt | cyberstrike run -Command Output
nmap -sV target | cyberstrike run "analyze this scan"Chaining Commands
Sequential
cyberstrike run "enumerate subdomains" && cyberstrike run "scan discovered hosts"With Variables
RESULT=$(cyberstrike run "find target IP" --output text)cyberstrike run "scan $RESULT for vulnerabilities"Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Permission denied |
| 3 | Timeout |
| 4 | Authentication error |
Check Exit Code
cyberstrike run "scan target"if [ $? -eq 0 ]; then echo "Scan completed successfully"else echo "Scan failed"fiVerbose Output
Debug Mode
cyberstrike run "scan target" --verboseQuiet Mode
cyberstrike run "scan target" --quietExamples
Quick Port Scan
cyberstrike run "scan 192.168.1.1 for common ports"Code Review
cyberstrike run "review auth.ts for security vulnerabilities" -f src/auth.tsGenerate Report
cyberstrike run "generate security report for findings" \ -f findings.json \ --output markdown > report.mdAutomated Scanning
#!/bin/bashfor host in $(cat hosts.txt); do cyberstrike run "scan $host for vulnerabilities" \ --agent web-application \ --permission auto \ >> scan-results.txtdonePre-commit Hook
#!/bin/bashcyberstrike run "check staged files for secrets" \ -f $(git diff --cached --name-only) \ --permission planBest Practices
- Use specific prompts - Be clear about what you want
- Set timeouts - Prevent hanging on long operations
- Check exit codes - Handle errors in scripts
- Use appropriate permissions - Minimize auto-approve usage
- Capture output - Save results for later analysis
Tip
Use --output json for machine-readable output in automation scripts.
Related Documentation
- CLI Overview - All CLI commands
- Permissions - Permission modes
- Configuration - Config options