Skip to main content
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.
This page covers Windows. Running Proximate on a Mac? See Advanced Integration Recipes for macOS — the commands are different.

Before You Start

Create an integration in Proximate first (see the Setup guide). 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.
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.

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:
your-command
if ($?) { Start-Process "proximate://notify?source=YOUR_ID&status=success" }
Tell me whether it passed or failed:
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"
}
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:
settings.json
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "powershell -NoProfile -Command \"Start-Process 'proximate://notify?source=YOUR_ID&status=success'\""
          }
        ]
      }
    ]
  }
}

Full Claude Code walkthrough

See the complete step-by-step guide, including how to verify the hook with /hooks.

Docker CLI

Docker has no completion hook, so chain the command after a long build or compose up:
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"
}

FFmpeg

Get a badge the moment a long encode finishes:
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"
}

Gradle

Chain the command after your Gradle task (the Windows wrapper is gradlew.bat):
.\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"
}
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.

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 badge after the upgrade. Using winget:
winget upgrade --all
if ($LASTEXITCODE -eq 0) { Start-Process "proximate://notify?source=YOUR_ID&status=success" }
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:
jest
if ($LASTEXITCODE -eq 0) {
  Start-Process "proximate://notify?source=YOUR_ID&status=success"
} else {
  Start-Process "proximate://notify?source=YOUR_ID&status=error"
}
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:
proximate-reporter.js
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:
jest.config.js
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 (swap open for the Windows launcher). For native Make whose recipes run in Command Prompt, chain or add a target:
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.
1

Add an Execute Command node

Add a node and search for Execute Command.
2

Enter the command

In the Command field, enter:
start "" "proximate://notify?source=YOUR_ID&status=success"
3

Connect it last

Wire it in as the final node in the workflow.
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.

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:
conftest.py
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 badge on pass, red on failure — no shell chaining needed.

Rust

Chain the command after cargo build, cargo test, or cargo run:
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"
}

Terraform

Get a badge when a long apply completes:
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"
}

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.

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 a badge isn’t showing up, see Troubleshooting.