Skip to main content

Syncthing Peer

@randybias/syncthing-peerv2026.10.17.2beta· 9d agoBEHAVIORSACCEPTED WARNINGS
01README

Ensure a peer device and a shared folder on one Syncthing node through its REST API, reached locally or over SSH, and inspect or remove them. The API key travels only in the X-API-Key header, plain HTTP is loopback-only, and state is keyed by a SHA-256 of the node label and endpoint.

02Behaviors1
@randybias/syncthing-peerv2026.10.17.2syncthing_peer.ts
fn get()
READ-ONLY. Read node status, devices and folders and store the summary. Fails when the node does not answer.
fn sync()
READ-ONLY. Refresh node status, devices and folders; records reachable false instead of failing when the node is down.
fn ensure_device()
DESTRUCTIVE. Ensure one peer device config exists exactly as declared: create it or update a differing one, never a second. Idempotent; returns changed false when it already matches.
fn remove_device()
DESTRUCTIVE. Remove one peer device config and prove it is gone. Idempotent: an already-absent device is a clean no-op.
fn ensure_folder()
DESTRUCTIVE. Ensure one shared folder exists exactly as declared, with the given peer device ids: create it or update a differing one. Idempotent; returns changed false when it already matches.
fn remove_folder()
DESTRUCTIVE. Remove one shared folder and prove it is gone. Idempotent: an already-absent folder is a clean no-op.

Resources

node(infinite)— Syncthing node status: my id, version and counts
device(infinite)— One peer device config and its change flag
folder(infinite)— One shared folder config and its change flag
03Previous Versions1
2026.10.17.1
04Stats
A
93 / 100
Downloads
2
Archive size
42.5 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License1/2partial

    no SPDX license declared

  • Verified public repository2/2earned

06Platforms
07Labels