Skip to main content

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

CLI

CyberStrike CLI defaults to launching the TUI when run without arguments. It also accepts commands for non-interactive and programmatic use.

Terminal window
cyberstrike [global-options] <command> [command-options] [arguments]

Global Flags

FlagAliasDescription
--help-hDisplay help information
--version-vPrint version
--print-logsOutput logs to stderr
--log-levelSet level: DEBUG, INFO, WARN, ERROR

Commands

CommandDescription
runNon-interactive mode with a direct prompt
serveHeadless HTTP server for API access
webHeadless server with web interface
attachConnect TUI to a running server
authManage credentials and provider login
agentManage security agents
mcpManage MCP servers
modelsList available models from providers
sessionManage sessions
statsDisplay token usage and cost statistics
exportExport session data as JSON
importImport from JSON file or share URL
githubGitHub App integration
prReview a pull request by number
upgradeUpdate to latest or specific version
uninstallRemove CyberStrike and related files
completionGenerate shell completion scripts

Interactive Mode

Terminal window
# Launch TUI
cyberstrike
# Start with specific model
cyberstrike --model anthropic/claude-sonnet-4-20250514
# Continue previous session
cyberstrike --continue
OptionAliasDescription
--model <model>-mModel in format provider/model
--agent <name>Security agent to use
--continue-cContinue last session
--session <id>-sResume specific session

run

Execute a single prompt without entering interactive mode. In this mode there is nobody to answer permission prompts, so any tool that would prompt is auto-rejected (see Automation).

Terminal window
cyberstrike run [message..] [options]

Options

OptionAliasDescription
--model <model>-mModel in format provider/model
--agent <name>Security agent to use
--continue-cContinue last session
--session <id>-sResume specific session
--forkFork the session before continuing (needs --continue/--session)
--file <path>-fAttach file(s) to message (repeatable)
--format <type>Output format: default or json
--shareShare the session
--title <text>Set session title
--variant <type>Model variant (high, max, minimal)
--thinkingShow thinking blocks
--attach <url>Attach to a running server
--dir <path>Directory to run in (remote path when attaching)
--port <number>Port for the local server
--command <name>Run 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

Terminal window
# Run a security scan
cyberstrike run "scan example.com for XSS vulnerabilities"
# Attach files for review
cyberstrike run "analyze this config for misconfigurations" -f nginx.conf
# JSON output for scripting
cyberstrike run "list all open ports" --format json > report.json
# Continue or fork a session
cyberstrike run "now check for SQLi" --continue
cyberstrike run "try a different payload" --session <id> --fork

Piping Input

Terminal window
echo "analyze this code for vulnerabilities" | cyberstrike run
nmap -sV target.local | cyberstrike run "analyze these scan results"

Permissions in run

Pre-approve tools for non-interactive use with the CYBERSTRIKE_PERMISSION env var:

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

See Automation for CI patterns.


serve

Start a headless HTTP API server without a UI.

Terminal window
cyberstrike serve [options]
OptionDescription
--port <number>Server port (default: 4096)
--hostname <address>Bind address (default: 127.0.0.1)
--cors <origin>Allowed CORS origin
--mdnsAdvertise the server over mDNS

Caution

Authentication: Set CYBERSTRIKE_SERVER_PASSWORD when exposing the server on a network. Without it, the server is unsecured.

Terminal window
CYBERSTRIKE_SERVER_PASSWORD=secret cyberstrike serve --port 4096

attach

Connect a TUI to an already-running CyberStrike server.

Terminal window
cyberstrike attach <url>
Terminal window
# Start server in one terminal
cyberstrike web --port 4096
# Attach from another terminal
cyberstrike attach http://localhost:4096

auth

Manage authentication credentials for AI providers. Three subcommands — login, logout, list — all interactive (no flags).

auth login

Terminal window
cyberstrike auth login [url]

Shows a provider list and prompts for an API key or OAuth flow. The optional url pre-selects a well-known provider URL. Credentials are stored in ~/.local/share/cyberstrike/auth.json.

auth list

Terminal window
cyberstrike auth list # alias: ls

auth logout

Terminal window
cyberstrike auth logout

Interactively select a stored credential to remove.

Caution

There is no auth status, auth verify, auth refresh, or auth switch command. Login is always the interactive auth login flow. You can also set provider keys via environment variables — see AI Providers.


mcp

Manage Model Context Protocol servers. Five subcommands: list, add, auth, logout, debug.

Caution

Server config lives in cyberstrike.json (see MCP), and servers are managed interactively in the /mcps TUI dialog. There are no mcp status, health, start/stop/restart, remove, config, or tools commands.

mcp list

Terminal window
cyberstrike mcp list # alias: ls

mcp add

Terminal window
cyberstrike mcp add

Fully interactive — prompts for local vs remote, command or URL, and name. Tests the connection before saving. No positional args or flags; to script server setup, write the entry into cyberstrike.json directly.

mcp auth

Terminal window
cyberstrike mcp auth [name] # authorize an OAuth server
cyberstrike mcp auth list # list OAuth-authorized servers

Authorizes a remote server that uses OAuth. See OAuth.

mcp logout

Terminal window
cyberstrike mcp logout [name]

mcp debug

Terminal window
cyberstrike mcp debug <name>

Inspects a server’s connection — useful when a server fails to load or tools don’t appear.


session

Manage conversation sessions.

Terminal window
cyberstrike session list [options]
OptionAliasDescription
--max-count <n>-nLimit to N recent sessions
--format <type>Output: table or json

agent

Terminal window
cyberstrike agent [name]

Without a name, lists available agents. With a name, shows agent details and prompt.


models

Terminal window
cyberstrike models

Lists all available models organized by provider.


github

github install

Terminal window
cyberstrike github install

Install the Cyberstrike GitHub App into a repository.

github run

Terminal window
cyberstrike github run

Run Cyberstrike against a GitHub event (used by the CI workflow).


pr

Terminal window
cyberstrike pr <number>

Review a pull request by number.


export / import

Terminal window
cyberstrike export [sessionID] # export session as JSON to stdout
cyberstrike import <file> # import session data

stats

Terminal window
cyberstrike stats

Shows token usage, session counts, and cost estimates.


upgrade

Terminal window
cyberstrike upgrade [version]

Update to the latest stable version or a specific target. Supported methods: curl, npm, pnpm, bun, brew, choco, scoop.


completion

Terminal window
cyberstrike completion >> ~/.bashrc # Bash
cyberstrike completion >> ~/.zshrc # Zsh
cyberstrike completion | source # Fish

Environment Variables

VariableDescription
CYBERSTRIKE_PROVIDERDefault AI provider
CYBERSTRIKE_MODELDefault model
CYBERSTRIKE_AGENTDefault security agent
CYBERSTRIKE_SERVER_PASSWORDServer authentication password
CYBERSTRIKE_SERVER_USERNAMEServer username (default: cyberstrike)
CYBERSTRIKE_PERMISSIONJSON permission override for non-interactive use
CYBERSTRIKE_CONFIGPath to a custom config file
CYBERSTRIKE_AUTO_SHAREAuto-share sessions
CYBERSTRIKE_DISABLE_AUTOUPDATEDisable automatic update checks
ANTHROPIC_API_KEYAnthropic API key
OPENAI_API_KEYOpenAI API key
GOOGLE_GENERATIVE_AI_API_KEYGoogle AI (Gemini) API key
OPENROUTER_API_KEYOpenRouter API key

Exit Codes

CodeMeaning
0Success
1Error — invalid/unknown arguments, or a fatal error
130Interrupted (Ctrl+C)