Skip to content

Configuration

Pass options to the WhatsApp constructor:

ts
const wa = new WhatsApp({
  sessionDir: "./session",
  dbName: "whatspurr.db",
  logLevel: "info",
  binaryPath: "/path/to/bridge",
  binaryRepo: "ArnabXD/whatspurr",
  binaryVersion: "v0.1.0",
  autoPresence: true,
  subscribeOutgoing: false,
  downloadDir: "./downloads",
});

Options

OptionTypeDefaultDescription
sessionDirstring"./session"Directory for session/auth data
dbNamestring"whatspurr.db"SQLite database filename
logLevelstringGo sidecar log level: "debug", "info", "warn", "error"
binaryPathstringauto-detectPath to Go bridge binary. Skips auto-download
binaryRepostring"ArnabXD/whatspurr"GitHub repo for binary downloads
binaryVersionstring"latest"Pin a specific release version
autoPresencebooleantrueSend "available" presence on connect
subscribeOutgoingbooleanfalseReceive outgoing messages (sent by us) in event updates
downloadDirstring"./downloads"Directory for downloaded media files

Binary Management

By default, whatspurr automatically downloads the correct Go bridge binary for your platform on first wa.start(). Supported platforms:

  • macOS (arm64, amd64)
  • Linux (amd64, arm64)
  • Windows (amd64)

To use a custom binary:

ts
const wa = new WhatsApp({
  binaryPath: "./my-custom-bridge",
});

To build from source:

bash
cd go && go build -o ../bin/bridge

Released under the GPL-3.0 License.