ct-fivem
v1.1.4
Published
FiveM CLI launcher and auto-reconnect watchdog
Maintainers
Readme
CT FiveM
CT FiveM (ct-fivem) is a production-ready Windows CLI tool and auto-reconnect watchdog for FiveM.
Instead of opening FiveM manually, pressing F8, and typing connect IP:PORT, you can use ct:
ct 123.123.123.123:30120Features
- 🚀 Direct Connect: Connect to FiveM servers straight from PowerShell / Command Prompt / Windows Terminal.
- 📊 Server Info: Query
/info.jsonand/players.jsonwithout launching FiveM (ct info IP:PORT). - 🛡️ Auto-Reconnect Watchdog (ACT): Monitor connection, detect crashes, timeouts, and disconnects, and automatically reconnect (
ct act IP:PORT). - ⚡ Zero External Dependencies: Pure Node.js standard modules for fast installation and maximum reliability.
- ⚙️ Configurable: Global settings managed in
%APPDATA%\CT\config.json. - 📁 Local Logging: Structured local logs saved to
%LOCALAPPDATA%\CT\logs\ct.log.
Installation
npm install -g ct-fivem
npm install -g ct-fivem@latestUsage
1. Direct Connect (Default)
Validates server, queries endpoints, displays formatted server card, and launches FiveM:
ct 123.123.123.123:30120or explicitly:
ct connect example.com:301202. Check Server Details Only
Displays server information without launching FiveM:
ct info 123.123.123.123:30120Example Output:
╭──────────────────────────────────────────────╮
│ CT FiveM │
├──────────────────────────────────────────────┤
│ Server : Example Roleplay │
│ Address : 123.123.123.123:30120 │
│ Players : 128 / 256 │
│ Ping : 42 ms │
│ Status : ONLINE │
╰──────────────────────────────────────────────╯3. Auto-Reconnect Watchdog (ACT)
Keeps running in your terminal to automatically reconnect when FiveM closes, crashes, or disconnects:
ct act 123.123.123.123:301204. Configuration
View or update configuration settings:
# Show current config
ct config
# Change reconnect cooldown delay (in milliseconds)
ct config set reconnectDelay 10000Optional FiveM Client Resource (ct_client)
For 100% exact connection state tracking during ct act, copy the resource/ct_client folder to your FiveM server resources and add ensure ct_client to server.cfg.
Standalone Executable (ct.exe)
To compile ct-fivem into a standalone .exe:
npx @yao-pkg/pkg . --targets node18-win-x64 --output ct.exe