jamie 791c3c2393
CI / build (tx-sync-linux-amd64, amd64, linux) (push) Successful in 22s
CI / build (tx-sync-windows-amd64.exe, amd64, windows) (push) Successful in 15s
CI / SonarQube (push) Successful in 22s
ci: 🚀 sonarqube
2026-05-07 01:05:55 +01:00
2026-05-07 01:05:55 +01:00
2026-03-21 01:02:52 +00:00
2026-03-21 01:02:52 +00:00
2026-03-21 01:07:05 +00:00
2026-03-21 01:02:52 +00:00
2026-03-21 01:07:05 +00:00
2026-03-21 01:02:52 +00:00

tx-sync

Small utility that POSTs txAdmin playersDB.json to your FiveM dashboard on a timer. It does not parse the file; your server ingests the raw JSON.

Server contract (dashboard ingest)

Item Value
Method POST
Header X-API-Key: <secret>
Header Content-Type: application/json
Body Raw bytes of playersDB.json
URL Whatever you configure (full URL)

Usage

  1. Run the binary once from a console (TTY). If config.json is missing, an interactive wizard creates it next to the executable, then exits.
  2. Run again: it uploads immediately, then every sync_interval (default 5m).
tx-sync [-config path/to/config.json] [-setup]
  • -setup: run the wizard and exit (overwrites or creates config.json).

Configuration (config.json)

Lives beside the binary by default (see -config).

Field Description
endpoint Full POST URL
api_key Sent as X-API-Key
players_db_path Path to playersDB.json on disk
sync_interval Go duration string (e.g. 5m, 10m30s)

Build

go build -trimpath -ldflags="-s -w" -o tx-sync .

Cross-compile (example):

GOOS=linux GOARCH=amd64 GOAMD64=v1 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o tx-sync-linux-amd64 .
GOOS=windows GOARCH=amd64 GOAMD64=v1 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o tx-sync.exe .

CI builds Linux and Windows binaries via .gitea/workflows/build.yml.

S
Description
Small utility that POSTs txAdmin playersDB.json to your FiveM dashboard on a timer.
https://www.jdbnet.co.uk/product/fivem-dashboard
Readme 38 KiB
Languages
Go 100%