> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybedefend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Windows Setup for Local Code Scanning

> Install and run the CybeDefend CLI on Windows for straightforward local code scanning.

If you’re on Windows, you can install the **CybeDefend CLI** as an `.exe` file. Quickly run security scans from PowerShell, Command Prompt, or within CI runners like GitHub Actions (Windows-based).

## Requirements

* **Windows 10 or 11** (32-bit or 64-bit).
* [Personal Access Token (PAT)](/latest/code-scanning/local-code-scanning/introduction-api-key) from your CybeDefend account.
* Optional: Integration with your CI pipeline.

***

## Installation Steps

1. **Download**\
   Grab `cybedefend-windows-amd64.exe` (64-bit) or `cybedefend-windows-386.exe` (32-bit) from [Releases](https://github.com/CybeDefend/cybedefend-cli/releases).
2. **Rename (Optional)**\
   Rename to `cybedefend.exe` for easier usage.
3. **Add to PATH**\
   Place it in a folder included in your PATH, or just call it from its current location.

<Note>
  On Windows, some security tools may flag new executables. Ensure <strong>cybedefend.exe</strong> is unblocked in your antivirus or firewall settings.
</Note>

***

## Running a Scan

1. **Open PowerShell or CMD**\
   Navigate to your project directory:
   ```powershell theme={null}
   cd C:\Users\YourName\Projects\my-app
   ```
2. **Authenticate (one-time setup)**
   ```powershell theme={null}
   cybedefend.exe login --pat YOUR_PAT --region eu
   ```
3. **Initiate Scan**
   ```powershell theme={null}
   cybedefend.exe scan --dir . --project-id YOUR_PROJECT_ID
   ```
4. **View Results**
   ```powershell theme={null}
   cybedefend.exe results --project-id YOUR_PROJECT_ID --output sarif
   ```

<Warning>
  If you see a SmartScreen prompt, confirm the binary’s source to proceed with the installation.
</Warning>

<Tip>
  You can also store your PAT in the **CYBEDEFEND\_PAT** environment variable:

  ```powershell theme={null}
  $env:CYBEDEFEND_PAT = "your_pat_here"
  ```

  Using **--ci** can simplify output if you're parsing logs in a Windows-based CI system.
</Tip>
