Overview#
TS RouterOS is a minimal TypeScript client for the MikroTik RouterOS API. It connects over TCP on port 8728 or over SSL on port 8729, then sends commands and parses the responses into plain objects.
How It Works#
You create a client for one router, connect, log in, and run commands. The client picks the legacy or challenge login flow automatically.
Every async call returns a result with a status, so the caller decides how to branch. Expected failures come back as results rather than thrown errors.
Design Choices#
- Factory-style API built from plain functions, with no classes
- Result pattern for every async operation
- Generic
runCommandfor any RouterOS command, with room for custom helpers