Claude CLI
Use Claude CLI when you want strong reasoning and structured output from Anthropic models.
Requirements
claudeCLI installed.Authentication completed (
ANTHROPIC_API_KEYorclaude login).
Setup
Install CLI:
npm install -g @anthropic-ai/claude-codeAuthenticate:
export ANTHROPIC_API_KEY="sk-ant-..."
# or
claude loginVerify locally:
claude "hello"Configure in AI Backend settings tab.
Configuration
Preferred Backend
Claude CLI
Claude CLI Command
claude or full path
Model example:
Notes
Large Prompt Fallback
For prompts above 32_000 characters (the internal LARGE_PROMPT_THRESHOLD), the extension avoids passing the full text on the command line. Instead it:
Writes the combined prompt to a temp file named
burp_uv_prompt_*.txtwith POSIX permissions0600where supported.Invokes Claude with an instruction such as "Please process the instructions and data provided in the following file: <path>", passing the path as an argument.
Deletes the temp file in a
finallyblock after the response is consumed.
This avoids OS-level argv/stdin length limits on long contexts while keeping the prompt on-host.
Session Resume
Claude CLI sessions are kept sticky across turns:
The first turn is launched with
--session-id <uuid>.Subsequent turns on the same chat session use
--resume <uuid>so conversation history is reconstructed inside Claude rather than replayed by the extension. The session ID is held in a thread-safeAtomicReferencewith CAS updates.
If the process is killed or Clear Chat is used, the session ID is released and a new --session-id is minted on the next turn.
Windows
npm-installed CLI shims are resolved automatically on Windows. The extension detects .cmd siblings and uses them instead of shell script shims that Java cannot execute directly.
Windows + WSL bridge
If Burp runs on Windows and Claude CLI is installed inside WSL, the simplest setup is to point Claude CLI Command at a one-liner that invokes WSL with an interactive shell so PATH and auth env vars from ~/.bashrc / ~/.profile are loaded:
Notes:
Replace
Debianwith the name of your distro (wsl -l -vlists installed ones) and<username>with your WSL user.bash -icruns an interactive shell that sources rc files, soANTHROPIC_API_KEY(or whateverclaude loginwrote) is picked up;-cthen executes the binary.Use the absolute path to the
claudebinary inside WSL (which claudefrom WSL prints it). Relying on bareclaudecan fail if the rc files don't put~/.local/binonPATHfor non-login shells.No
.cmdwrapper file is required — the extension passes its CLI args through the same way it does for native commands.
If you prefer a wrapper script instead of a single command (e.g. to filter banner output, switch distros, or share the config across machines), the .cmd pattern documented for Codex CLI works the same way for Claude.
Troubleshooting
command not found: use full binary path.Windows: npm shim paths are resolved automatically. If auto-resolution fails, use the full
.cmdpath:C:\\Users\\<you>\\AppData\\Roaming\\npm\\claude.cmd.Auth issues: re-run
claude loginor verifyANTHROPIC_API_KEY.Empty output: check Burp extension output/errors tabs and model flag validity.
Related Pages
Last updated
