Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

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

Terminal window
cyberstrike run "your prompt here"

Example

Terminal window
cyberstrike run "scan example.com for open ports"

File Attachment

Single File

Terminal window
cyberstrike run "review this code for vulnerabilities" -f src/auth.ts

Multiple Files

Terminal window
cyberstrike run "compare these implementations" -f src/v1/auth.ts -f src/v2/auth.ts

Directory

Terminal window
cyberstrike run "analyze this codebase" -f src/

Model Selection

Specify Model

Terminal window
cyberstrike run "complex analysis task" --model anthropic/claude-opus-4-5-20251101

Quick Model

Terminal window
cyberstrike run "simple task" --model anthropic/claude-3-5-haiku-20241022

Agent Selection

Use Specific Agent

Terminal window
cyberstrike run "test for SQL injection" --agent web-application

Available Agents

Terminal window
cyberstrike run "enumerate network" --agent internal-network
cyberstrike run "audit cloud config" --agent cloud-security
cyberstrike run "recon target.com" --agent bug-hunter

Output Control

Plain Text

Terminal window
cyberstrike run "list vulnerabilities" --output text

JSON Output

Terminal window
cyberstrike run "scan results" --output json

Markdown

Terminal window
cyberstrike run "generate report" --output markdown

Save to File

Terminal window
cyberstrike run "scan target" > results.txt

Permission Modes

Default (Interactive)

Terminal window
cyberstrike run "scan target" --permission default

Prompts for permission on dangerous operations.

Auto-Approve

Terminal window
cyberstrike run "scan target" --permission auto

Danger

Auto-approve mode executes all operations without confirmation. Use with caution.

Plan Mode

Terminal window
cyberstrike run "analyze attack surface" --permission plan

Research only, no modifications.

Environment Variables

Pass Variables

Terminal window
TARGET=192.168.1.1 cyberstrike run "scan \$TARGET"

From File

Terminal window
source .env && cyberstrike run "scan \$TARGET"

Timeout

Set Timeout

Terminal window
cyberstrike run "long scan" --timeout 600000

Timeout 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.txt

Jenkins

stage('Security Scan') {
steps {
sh '''
cyberstrike run "scan application" \
--agent web-application \
--permission auto
'''
}
}

Piping Input

From Stdin

Terminal window
echo "scan 192.168.1.1" | cyberstrike run -

From File

Terminal window
cat prompts.txt | cyberstrike run -

Command Output

Terminal window
nmap -sV target | cyberstrike run "analyze this scan"

Chaining Commands

Sequential

Terminal window
cyberstrike run "enumerate subdomains" && cyberstrike run "scan discovered hosts"

With Variables

Terminal window
RESULT=$(cyberstrike run "find target IP" --output text)
cyberstrike run "scan $RESULT for vulnerabilities"

Exit Codes

CodeMeaning
0Success
1General error
2Permission denied
3Timeout
4Authentication error

Check Exit Code

Terminal window
cyberstrike run "scan target"
if [ $? -eq 0 ]; then
echo "Scan completed successfully"
else
echo "Scan failed"
fi

Verbose Output

Debug Mode

Terminal window
cyberstrike run "scan target" --verbose

Quiet Mode

Terminal window
cyberstrike run "scan target" --quiet

Examples

Quick Port Scan

Terminal window
cyberstrike run "scan 192.168.1.1 for common ports"

Code Review

Terminal window
cyberstrike run "review auth.ts for security vulnerabilities" -f src/auth.ts

Generate Report

Terminal window
cyberstrike run "generate security report for findings" \
-f findings.json \
--output markdown > report.md

Automated Scanning

#!/bin/bash
for host in $(cat hosts.txt); do
cyberstrike run "scan $host for vulnerabilities" \
--agent web-application \
--permission auto \
>> scan-results.txt
done

Pre-commit Hook

#!/bin/bash
cyberstrike run "check staged files for secrets" \
-f $(git diff --cached --name-only) \
--permission plan

Best Practices

  1. Use specific prompts - Be clear about what you want
  2. Set timeouts - Prevent hanging on long operations
  3. Check exit codes - Handle errors in scripts
  4. Use appropriate permissions - Minimize auto-approve usage
  5. Capture output - Save results for later analysis

Tip

Use --output json for machine-readable output in automation scripts.