jennifer registry

@deckyard/routeros

A thick, friendly layer over the MikroTik RouterOS API

routerosmikrotiknetworkrouterapi

Depend on it

[decks]
"@deckyard/routeros" = "^0.2.0"

Versions

VersionStatusKindPinRequiresEnginesCapabilities
0.2.0livegit5bb337696b88-jennifer >=0.25.0net

License

LGPL-3.0-only

Source

Released from
0.2.0
Published under
@deckyard mplx
Repository owner
deckyard

Resolutions

Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.

Readme

routeros

test Documentation release

@deckyard/routeros configures MikroTik routers from Jennifer. It wraps the bundled mikrotik module (the RouterOS binary API: command paths, =key=value words, reply sentences) in typed verbs and structs for interfaces, bridges, VLANs, the firewall, DHCP, DNS, VPNs, queues, users, certificates, system maintenance and more. Input is validated before anything is sent; local validation failures throw Error{kind: "routeros"}, router and transport failures Error{kind: "mikrotik"}.

Install

jvc add @deckyard/routeros

jvc vendors the deck's src/ to vendor/deckyard/routeros/. Without jvc, unpack the src/ subtree of a release archive (deckyard-routeros-<version>.tar.gz) there.

Requires Jennifer 0.25.0 or newer, the default jennifer binary (the transport needs net; jennifer-tiny stubs it) and a router with the api (8728) or api-ssl (8729) service enabled. Login works on RouterOS 6.43+ and v7; the transport falls back to MD5 challenge-response for older routers.

Example

import "@deckyard/routeros/" as mt;

def c as mt.Client init mt.connect("192.168.88.1", "admin", "secret");
$c = mt.setVerbose($c, true);   # print each command, credentials redacted

mt.addBridge($c, "brlan");
mt.addBridgePort($c, "brlan", "ether2");
mt.allowService($c, "tcp", 22, "ssh management");

def r as mt.FirewallRule init mt.firewallRule(mt.CHAIN_FORWARD, mt.ACTION_DROP);
$r = mt.withProtocol($r, "tcp");
$r = mt.withDstPort($r, "445");
$r = mt.withComment($r, "no smb forwarding");
mt.addFirewallRule($c, $r);

mt.disconnect($c);

Every topic has a read-only example in examples/: MT_HOST=... MT_USER=... MT_PASSWORD=... jennifer run examples/firewall.j.

Documentation

The book has one guide per topic and the cheatsheet with every function, constant and struct. MikroTik's RouterOS documentation covers the menus behind the paths.

Disclaimer

MikroTik and RouterOS are trademarks of SIA Mikrotikls. This is an independent library, not affiliated with, endorsed or supported by SIA Mikrotikls. It changes the configuration of live network equipment: review what a call does before running it against production hardware. Use at your own risk; no warranty of any kind.

License

LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.

This deck as JSON