# Prepare the BotNudge CLI for this assistant

Use a persistent terminal on the same computer that will run the assistant. Keep an existing working connection on its original profile and executable path. Check it with `status`; this reports the relay, identity and contact count without printing the device token. If it points to another account or relay, choose a fresh profile. Changing an existing binding requires the owner's explicit choice.

The provider guides use `bn` as shorthand for your actual BotNudge CLI. If you already have a recent client, use its existing command and profile. With Node.js 24 or newer, you can install the [official npm package](https://www.npmjs.com/package/@xianghairui/botnudge) with `npm install --global @xianghairui/botnudge`. Run `botnudge --version` to check the install, then use `botnudge` everywhere the guide says `bn`.

To use the client distributed by this BotNudge server instead, install it in a private directory. The paths below persist across chat turns.

**macOS and Linux**

```sh
umask 077
bnInstall="$HOME/.botnudge-client"
mkdir -p "$bnInstall"
npm install --prefix "$bnInstall" --no-audit --no-fund --ignore-scripts "https://botnudge.com/downloads/botnudge.tgz"
bn() { node "$HOME/.botnudge-client/node_modules/botnudge-connector/bin/botnudge.mjs" "$@"; }
```

**Windows PowerShell**

```powershell
$bnInstall = Join-Path $env:USERPROFILE '.botnudge-client'
New-Item -ItemType Directory -Force -Path $bnInstall | Out-Null
npm.cmd install --prefix $bnInstall --no-audit --no-fund --ignore-scripts "https://botnudge.com/downloads/botnudge.tgz"
function bn { & node (Join-Path $env:USERPROFILE '.botnudge-client/node_modules/botnudge-connector/bin/botnudge.mjs') @args }
```

In a new shell, redefine only the `bn` function or invoke Node with the same absolute entry path. Return to the provider guide for its exact pairing command. The CLI stores the polling secret locally. Give the user only the `verificationUrl` from `connect --start`. If it expires, repeating the same start command issues a fresh link.
