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

# Advanced Integration Recipes for Windows

> Copy-and-paste Windows commands (PowerShell and Command Prompt) to trigger a Proximate cursor icon from Docker, pytest, n8n, Claude Code, and more.

Once you've created an integration, you get a hook command you can drop into any tool that runs a command when it finishes. This page has a ready-to-use recipe for each tool in the integration library, in both **PowerShell** and **Command Prompt**.

<Note>
  This page covers **Windows**. Running Proximate on a Mac? See [Advanced Integration Recipes for macOS](/advanced-integrations/recipes-macos) — the commands are different.
</Note>

## Before You Start

Create an integration in Proximate first (see the [Setup guide](/advanced-integrations/setup)). With the platform toggle set to **Windows**, copy the **Success** command and note its ID. Everywhere you see `YOUR_ID` below, use that ID. The status at the end of the URL (`success`, `warning`, `error`, or none) sets the badge color.

<Note>
  **A quick note on quoting.** The recipes below wrap the URL in quotes — `start "" "…"` for Command Prompt — because the `&` in `&status=success` is a special character there. The empty `""` is the (blank) window title that `start` expects before a quoted argument. PowerShell uses `Start-Process "…"`, which handles the URL cleanly.
</Note>

## Two Patterns You'll Reuse

Most command-line tools don't have a built-in "when I'm done" hook, so you run the Proximate command right after them. Pick PowerShell **or** Command Prompt depending on the shell you use.

**Just tell me when it's done:**

<CodeGroup>
  ```powershell PowerShell theme={null}
  your-command
  if ($?) { Start-Process "proximate://notify?source=YOUR_ID&status=success" }
  ```

  ```bat Command Prompt theme={null}
  your-command && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

**Tell me whether it passed or failed:**

<CodeGroup>
  ```powershell PowerShell theme={null}
  your-command
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  your-command
  if %ERRORLEVEL%==0 (
    start "" "proximate://notify?source=YOUR_ID&status=success"
  ) else (
    start "" "proximate://notify?source=YOUR_ID&status=error"
  )
  ```
</CodeGroup>

The recipes below plug each tool into one of these patterns. A few tools have a smarter, native hook — those are called out individually.

## Claude Code CLI

Claude Code has a native **Stop** hook that fires whenever Claude finishes responding. Add this to `%USERPROFILE%\.claude\settings.json`. On Windows, Claude Code runs hook commands through Git Bash, so this calls PowerShell explicitly to launch the URL reliably:

```json settings.json theme={null}
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "powershell -NoProfile -Command \"Start-Process 'proximate://notify?source=YOUR_ID&status=success'\"",
            "async": true
          }
        ]
      }
    ]
  }
}
```

<Card title="Full Claude Code walkthrough" icon="code" href="/advanced-integrations/claude-code-example">
  See the complete step-by-step guide, including how to verify the hook with `/hooks`.
</Card>

## Docker CLI

Docker has no completion hook, so chain the command after a long `build` or `compose up`:

<CodeGroup>
  ```powershell PowerShell theme={null}
  docker build -t myapp .
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  docker build -t myapp . && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

## FFmpeg

Get an icon the moment a long encode finishes:

<CodeGroup>
  ```powershell PowerShell theme={null}
  ffmpeg -i input.mov -c:v libx264 output.mp4
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  ffmpeg -i input.mov -c:v libx264 output.mp4 && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

## Gradle

Chain the command after your Gradle task (the Windows wrapper is `gradlew.bat`):

<CodeGroup>
  ```powershell PowerShell theme={null}
  .\gradlew.bat build
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  gradlew.bat build && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

<Warning>
  Avoid the old `gradle.buildFinished { … }` listener — it's deprecated (since Gradle 7.4) and doesn't work with the configuration cache. Chaining in the shell is simpler and future-proof.
</Warning>

## Homebrew → winget, Chocolatey, or Scoop

Homebrew is macOS/Linux only, so it doesn't apply on Windows. The same idea works with a Windows package manager — chain the icon after the upgrade. Using **winget**:

<CodeGroup>
  ```powershell PowerShell theme={null}
  winget upgrade --all
  if ($LASTEXITCODE -eq 0) { Start-Process "proximate://notify?source=YOUR_ID&status=success" }
  ```

  ```bat Command Prompt theme={null}
  winget upgrade --all && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

The same pattern works with `choco upgrade all` (Chocolatey) or `scoop update *` (Scoop).

## Jest

The quick way is to chain it after your test command:

<CodeGroup>
  ```powershell PowerShell theme={null}
  jest
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  jest && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

For a cleaner setup that always reports the right color, add a small **custom reporter** (Node runs the command through Command Prompt on Windows, so `start` works). Save this as `proximate-reporter.js`:

```javascript proximate-reporter.js theme={null}
const { execSync } = require('child_process');

class ProximateReporter {
  onRunComplete(contexts, results) {
    const status = results.success ? 'success' : 'error';
    execSync(`start "" "proximate://notify?source=YOUR_ID&status=${status}"`);
  }
}

module.exports = ProximateReporter;
```

Then register it in `jest.config.js`:

```javascript jest.config.js theme={null}
module.exports = {
  reporters: ['default', '<rootDir>/proximate-reporter.js'],
};
```

## make

GNU Make on Windows usually comes from MSYS2, Chocolatey, or WSL. If you run it under WSL or Git Bash, follow the bash recipes in the [macOS guide](/advanced-integrations/recipes-macos) (swap `open` for the Windows launcher). For native Make whose recipes run in Command Prompt, chain or add a target:

```makefile theme={null}
build:
	# ... your build steps ...
	@start "" "proximate://notify?source=YOUR_ID&status=success"
```

## n8n (Local)

In a self-hosted n8n, add an **Execute Command** node as the last step of your workflow, so it fires when the workflow finishes.

<Steps>
  <Step title="Add an Execute Command node">
    Add a node and search for **Execute Command**.
  </Step>

  <Step title="Enter the command">
    In the **Command** field, enter:

    ```bat theme={null}
    start "" "proximate://notify?source=YOUR_ID&status=success"
    ```
  </Step>

  <Step title="Connect it last">
    Wire it in as the final node in the workflow.
  </Step>
</Steps>

<Note>
  The Execute Command node runs in the host's default shell (Command Prompt on Windows), but it's **disabled by default** in n8n v2.0+ and isn't available on n8n Cloud. If you run n8n in Docker, the command executes inside the container, not on your PC — run n8n directly on the machine where Proximate is installed.
</Note>

## pytest

Add a `conftest.py` to your project (or extend an existing one) using pytest's native **`pytest_sessionfinish`** hook, which runs after the whole test session and receives the exit status (`0` means everything passed). On Windows, `os.startfile` launches the URL through the registered handler:

```python conftest.py theme={null}
import os

def pytest_sessionfinish(session, exitstatus):
    status = "success" if exitstatus == 0 else "error"
    os.startfile(f"proximate://notify?source=YOUR_ID&status={status}")
```

Now every `pytest` run ends with a green icon on pass, red on failure — no shell chaining needed.

## Rust

Chain the command after `cargo build`, `cargo test`, or `cargo run`:

<CodeGroup>
  ```powershell PowerShell theme={null}
  cargo build --release
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  cargo build --release && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

## Terraform

Get an icon when a long `apply` completes:

<CodeGroup>
  ```powershell PowerShell theme={null}
  terraform apply -auto-approve
  if ($LASTEXITCODE -eq 0) {
    Start-Process "proximate://notify?source=YOUR_ID&status=success"
  } else {
    Start-Process "proximate://notify?source=YOUR_ID&status=error"
  }
  ```

  ```bat Command Prompt theme={null}
  terraform apply -auto-approve && start "" "proximate://notify?source=YOUR_ID&status=success"
  ```
</CodeGroup>

## Xcode CLI — macOS only

Xcode and `xcodebuild` only run on macOS, so there's no Windows recipe. If you build Apple platforms on a Mac, see the [macOS guide](/advanced-integrations/recipes-macos).

## A Couple of Edge Cases

* **Keep the quotes (Command Prompt).** The `&` in the URL is a command separator in Command Prompt, so the URL must stay in quotes and `start` needs the empty `""` title in front of it: `start "" "…"`. PowerShell's `Start-Process "…"` doesn't need the extra title.
* **`&& … || …` can mislead.** In the one-line Command Prompt form, if the `start success` step itself fails, an `|| start error` part can run too. When pass/fail really matters, prefer the `if %ERRORLEVEL%==0 ( … ) else ( … )` block (or the PowerShell `if`/`else`) shown in the two patterns above.

Don't see your tool? Any tool that can run a command on completion works — use one of the two patterns at the top. If an icon isn't showing up, see [Troubleshooting](/advanced-integrations/troubleshooting).
