{"name":"@deckyard/routeros","description":"A thick, friendly layer over the MikroTik RouterOS API","versions":{"0.2.0":{"version":"0.2.0","kind":"git","url":"https://github.com/deckyard/deck-routeros.git","ref":"0.2.0","commit":"5bb337696b88b11dc7b5c14c2986a44846a9a023","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.25.0"},"capabilities":["net"],"keywords":["routeros","mikrotik","network","router","api"],"description":"A thick, friendly layer over the MikroTik RouterOS API","publishedAt":"1793218456","repoId":1311339307,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# routeros\n\n[![test](https://github.com/deckyard/deck-routeros/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-routeros/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://deckyard.github.io/deck-routeros/)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-routeros)](https://github.com/deckyard/deck-routeros/releases/latest)\n\n`@deckyard/routeros` configures MikroTik routers from\n[Jennifer](https://jennifer-lang.dev/). It wraps the bundled `mikrotik` module\n(the RouterOS binary API: command paths, `=key=value` words, reply sentences) in\ntyped verbs and structs for interfaces, bridges, VLANs, the firewall, DHCP, DNS,\nVPNs, queues, users, certificates, system maintenance and more. Input is\nvalidated before anything is sent; local validation failures throw\n`Error{kind: \"routeros\"}`, router and transport failures `Error{kind: \"mikrotik\"}`.\n\n## Install\n\n```sh\njvc add @deckyard/routeros\n```\n\njvc vendors the deck's `src/` to `vendor/deckyard/routeros/`. Without jvc,\nunpack the `src/` subtree of a release archive\n(`deckyard-routeros-\u003cversion\u003e.tar.gz`) there.\n\nRequires Jennifer 0.25.0 or newer, the default `jennifer` binary (the transport\nneeds `net`; `jennifer-tiny` stubs it) and a router with the `api` (8728) or\n`api-ssl` (8729) service enabled. Login works on RouterOS 6.43+ and v7; the\ntransport falls back to MD5 challenge-response for older routers.\n\n## Example\n\n```jennifer\nimport \"@deckyard/routeros/\" as mt;\n\ndef c as mt.Client init mt.connect(\"192.168.88.1\", \"admin\", \"secret\");\n$c = mt.setVerbose($c, true);   # print each command, credentials redacted\n\nmt.addBridge($c, \"brlan\");\nmt.addBridgePort($c, \"brlan\", \"ether2\");\nmt.allowService($c, \"tcp\", 22, \"ssh management\");\n\ndef r as mt.FirewallRule init mt.firewallRule(mt.CHAIN_FORWARD, mt.ACTION_DROP);\n$r = mt.withProtocol($r, \"tcp\");\n$r = mt.withDstPort($r, \"445\");\n$r = mt.withComment($r, \"no smb forwarding\");\nmt.addFirewallRule($c, $r);\n\nmt.disconnect($c);\n```\n\nEvery topic has a read-only example in [`examples/`](examples/):\n`MT_HOST=... MT_USER=... MT_PASSWORD=... jennifer run examples/firewall.j`.\n\n## Documentation\n\nThe [book](https://deckyard.github.io/deck-routeros/) has one guide per topic\nand the [cheatsheet](docs/cheatsheet.md) with every function, constant and\nstruct. MikroTik's [RouterOS documentation](https://help.mikrotik.com/docs/)\ncovers the menus behind the paths.\n\n## Disclaimer\n\nMikroTik and RouterOS are trademarks of SIA Mikrotikls. This is an independent\nlibrary, not affiliated with, endorsed or supported by SIA Mikrotikls. It\nchanges the configuration of live network equipment: review what a call does\nbefore running it against production hardware. Use at your own risk; no\nwarranty of any kind.\n\n## License\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n"}