Super simple CLI to bootstrap and manage NATS clusters.
Project description
nats-bootstrap 🌟
Bootstraps NATS clusters with almost zero config.
Start one node, add others with --seed, and use the same commands on every machine.
A CLI/library to run NATS (JetStream/KV) clusters with the same commands everywhere. The real value is Day‑2 ops (join/leave/backup/restore/service) made safe and repeatable.
日本語 README: README_ja.md
What is it?
- Same commands on any machine; no per-node differences.
status/doctorshow facts fast.- Windows service support avoids venv breakage (fixed path option).
- Bootstrap mode: build a cluster with
--cluster+--seed, no config files needed.
Install
uv pip install nats-bootstrap
Include nats-server binary:
uv pip install "nats-bootstrap[server]"
Note: nats CLI is required for backup/restore.
Install guide: docs/nats_cli_install.md
Note: nats.exe (CLI) is not the server. The server binary is nats-server.exe.
Config file priority
- File passed by
--config nats-config.jsonin the working directory~/.nats-bootstrap/nats-config.json
Quick usage
nats-bootstrap status
nats-bootstrap doctor
nats-bootstrap up --cluster demo
nats-bootstrap join --cluster demo --seed pc-a:6222
Binary resolution order
- CLI
--nats-server-path - Config
nats_server_path - Env
NATS_SERVER_PATH(compat:NATS_SERVER_BIN) nats-server-bin(extras:server)nats-serverin PATH
Bootstrap mode (no config file)
--cluster auto-generates a config file for you.
nats-bootstrap up --cluster demo --datafolder C:\nats\data
nats-bootstrap join --cluster demo --seed pc-a:6222 --datafolder C:\nats\data
- Default
--datafolder:.\nats-bootstrap-data - Generated config:
<datafolder>\nats-bootstrap.conf - If you want to manage config yourself, use
--nats-config(cannot be combined with--cluster) --seedcan behostonly; it uses--cluster-port(default 6222)- Optional:
--cluster-port,--client-port,--http-port,--listen(hostorhost:port)
controller (MVP)
nats-bootstrap controller start --listen 127.0.0.1:8222 --nats-url nats://127.0.0.1:4222 --sys-creds C:\path\sys.creds
nats-bootstrap leave --controller http://127.0.0.1:8222 --server-name node-1 --nats-url nats://127.0.0.1:4222 --confirm
Windows service (MVP)
Default is no copy (use resolved nats-server.exe). Use --bin-dir to copy to a fixed path.
Admin privileges are required.
nats-bootstrap service install --service-name nats-bootstrap
nats-bootstrap up --service --service-name nats-bootstrap
nats-bootstrap doctor --service-name nats-bootstrap
nats-bootstrap service uninstall --service-name nats-bootstrap
backup/restore (MVP)
Requires nats CLI in PATH or --nats-cli-path / NATS_CLI_PATH.
nats-bootstrap backup --stream ORDERS --output C:\nats\backup
nats-bootstrap restore --input C:\nats\backup --confirm
Tests
uv pip install pytest
pytest -q
Manuals
- Japanese:
manuals/manual_ja.md - English:
manuals/manual_en.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nats_bootstrap-0.0.9.tar.gz.
File metadata
- Download URL: nats_bootstrap-0.0.9.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81f2589c211d2739adc2c28f836a14e9f0ab925ecd7be9d842a54ae29f9b7372
|
|
| MD5 |
6f52daf47863c6971f6e8deefa6c6494
|
|
| BLAKE2b-256 |
27d2bceb72cffd2baa82b3699059a206fa189cf69a51e5dbaf8b84480a78e2c4
|
File details
Details for the file nats_bootstrap-0.0.9-py3-none-any.whl.
File metadata
- Download URL: nats_bootstrap-0.0.9-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
444685b528a4bb095fadf213cc45cfcaedefc1e80e379206d093922c9bdb6c7e
|
|
| MD5 |
41a14d7e4e869aacaa9bdec52226b25c
|
|
| BLAKE2b-256 |
fa7d6f8b9749797afb5a13456545eddc06163cc529e6f1f5a57ec9943f6f7323
|