Skip to main content
Blnk Watch is currently in beta. Send us a message
Blnk Watch exposes a small set of CLI commands for running the service and syncing transactions from Blnk Core.
The make targets run the default command shape only.If you need to change flags such as -port, -sync-interval, or -batch-size, use the blnk-watch binary directly.

start

Use start to run Watch in continuous mode. It starts the Watch HTTP service and, when DB_URL is set, starts the watermark syncer in the same process. This is the simplest way to run Watch against Blnk Core in one process. New transactions are continuously pulled from Blnk Core on a schedule, written into Watch, and evaluated against your active rules as they flow in. Use start when you want the API and automatic Core ingestion together. If you only need the API (e.g. you send transactions via the inject API), use watch. If you only need to sync from Core without the API, use sync or sync-once.
When blnk-watch is on your PATH (for example after direct download or make install):

install

Use install to build and install the blnk-watch binary in your system. This is useful when you want to run blnk-watch directly from your shell instead of invoking it from the project directory.
Builds the binary and installs it into $(go env GOPATH)/bin.
To make sure you can run blnk-watch, add the Go bin directory to your PATH. Follow the steps below for your OS:
Add to PATH for the current session:
Confirm the binary is available:

watch

Use watch to run only the Watch service. This starts the HTTP API used to inject transactions, retrieve evaluation results, and serve the endpoints used during transaction evaluation. Use watch when you only need the HTTP API (e.g. you inject transactions) and do not need to pull from Blnk Core. To run both the API and Core ingestion, use start instead.
When blnk-watch is on your PATH:

sync

sync requires DB_URL so Watch can connect to the Blnk Core database.
Use sync to run the watermark sync service continuously. This command reads transactions from Blnk Core in batches, stores them in Watch, and keeps moving forward from the current watermark. In practice, sync is useful for backfills, historical evaluation, or when you only need to pull transactions from Core (no HTTP API). On a fresh setup, it can process older transactions from the configured sync start point. After that, it continues syncing new transactions as they appear. sync does not start the Watch HTTP server. To run both the API and sync from Core, use start instead.
When blnk-watch is on your PATH:

sync-once

sync-once requires DB_URL so Watch can connect to the Blnk Core database.
Use sync-once to run a single watermark synchronization pass and then exit. It processes available historical transactions from Blnk Core up to the current watermark and stops when that run completes. This is useful for backfills, one-off reprocessing, CI or maintenance jobs, and scheduled tasks such as cron jobs where you do not want a long-running process. Unlike sync, this command does not keep polling for new transactions.
When blnk-watch is on your PATH:

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.