Skip to main content

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

Run Command

cyberstrike run executes a single prompt non-interactively — ideal for automation and scripting. In this mode there is nobody to answer permission prompts, so any tool that would prompt is auto-rejected (see Automation).

📸 SCREENSHOT: run-command-output.png

Run command execution output

Basic Usage

Terminal window
cyberstrike run "your prompt here"

The prompt is also read from stdin when the input is piped:

Terminal window
echo "summarize the findings in report.json" | cyberstrike run

Options

FlagAliasDescription
--model-mModel to use, as provider/model
--agentPrimary agent to use (only cyberstrike ships built-in)
--formatOutput format: default or json (default: default)
--file-fFile(s) to attach to the message (repeatable)
--continue-cContinue the last session
--session-sSession id to continue
--forkFork the session before continuing (needs --continue/--session)
--shareShare the session
--titleTitle for the session
--variantModel variant / reasoning effort (e.g. high, max, minimal)
--thinkingShow thinking blocks
--attachAttach to a running server (e.g. http://localhost:4096)
--dirDirectory to run in (remote path when attaching)
--portPort for the local server
--commandRun a named command; use the message for its arguments

Caution

There is no --output, --permission, --timeout, --verbose, or --quiet flag. Output control is --format (default | json); reasoning display is --thinking.

Examples

JSON output for scripting

Terminal window
cyberstrike run "scan example.com for OWASP Top 10 issues" --format json > report.json

Pick a model and attach files

Terminal window
cyberstrike run "review this code for auth bugs" \
-m anthropic/claude-sonnet-4-20250514 \
-f src/auth.ts -f src/session.ts

Continue or fork a session

Terminal window
cyberstrike run "now test the admin endpoints" --continue
cyberstrike run "try a different payload" --session <id> --fork

Permissions in run

Because prompts can’t be answered non-interactively, pre-approve the tools a script needs with the CYBERSTRIKE_PERMISSION env var or the config permission field:

Terminal window
CYBERSTRIKE_PERMISSION='{"bash":"allow","read":"allow"}' \
cyberstrike run "enumerate services on the host" --format json

See Automation for CI patterns.

Exit Codes

cyberstrike run returns 0 on success and a non-zero code on error (e.g. invalid arguments) or interruption.