Contains various Open Source Mikrotik RouterOS projects, generally focused on /container
and scripting. This page serves as an commented index to the more developed projects within TIKOCI.
See Repositories for full list of all TIKOCI's code and projects.
-
The tikoci/restraml project provides a web page that allows picking two RouterOS versions to see what commands have changed in the CLI or RouterOS APIs like REST.
-
The project is mainly code for Postman's "Code Snippet" to support
/tool/fetch
- but hosts a web page to convert "most"curl
commands into the right RouterOS command using/tool/fetch
. Various "output styles" are supported to provide examples of using/tool/fetch
in various use cases. -
Currently contains two "tools":
-
The "Scheme Downloads" is the main output of
tikoci/restraml
project. The RouterOS REST API schemas are arranged by version and can be used in most Web API tools. For use with Postman App, see the following post on Mikrotik's Forum: REST API schema for Postman & more.
The collection includes more RouterOS containers, but the most developed are:
-
tikoci/cligames old BSD game collections (30+ games!) – wrapped into RouterOS container – with retro
telnet
interface. Available on DockerHub -
tikoci/netinstall runs Mikrotik's netinstall tool as a RouterOS container, and QEMU to enable it for ARM/ARM64. The netinstall container uses UNIX
make
to download packages needed automatically via provided/container/env
. Available on DockerHub -
tikoci/serial2http wraps RouterOS "remote" serial port as an HTTP interface. Available on DockerHub
There are additional containers stored in TIKOCI's Repositories. Please note some repos are used as part of other builds, and other are just experiments - use unlisted containers with care, or as examples. If you have questions or problems, file an issue within the particular repo.
Not all project in tikoci are containers. Projects below generally re-package, inspect, generate, or extract Mikrotik things, using GitHub Action builder.
-
tikoci/fat-chr rebuilds RouterOS CHR
.raw
package, into a valid UEFI image for UTM/Apple/other virtualization platforms. Largely by usingfat
, instead ofext2
for the EFI partition. UEFI-enabled CHR images are in the project releases -
tikoci/restraml is not a container, but builds API schemas for any RouterOS version, using CHR in GitHub Action to dynamically create API schemas from RouterOS's
/console/inspect
command. The generated schemes can be used in Postman and other API tools to enable RouterOS's REST API software development.This project also "hosts" the RouterOS Command
diff
Tool via GitHub Pages, and is implemented as a "serverless, single page app" - so all the "diff'ing" and other app logic is happening in the browser without any backend server. -
tikoci/postman-code-generators contains fork from Postman adding RouterOS
/tool/fetch
snippet support & also thecurl2rsc
websiteThe
curl2rsc
webpage takes a different approach thanrestraml
. It uses HTMX, instead of local JavaScript events to handle UI logic. With HTMX using a glitch.com backend providing a/curl
endpoint that utilizes this project's RouterOS "codegen" library, with [curl-to-postman] module, to do code generation on the backend. -
tikoci/winbox-deb uses
Makefile
to create a.deb
linux package with WinBox 4.0, including adding icon to desktop. Provided mainly as an example for others wanting to package WinBox 4.0 for various distros and "app stores".The
.deb
built is not intended for wide redistribution – more a template for future winbox packaging.
Various maybe good examples of RouterOS scripting function:
-
$PIANO
- interactive "player piano" & studio-quality recorder using :beep -
$INQUIRE
- prompt user for input using arrays +$CHOICES
+$QKEYS
-
$ROKU
- the missing Roku TV remote for RouterOS -
$ZT2DNS
- import ZeroTier Members into Mikrotik DNS, with 6PLANE support -
$npushover
- send messages to https://pushover.net and providing an example of using JSON, arrays, and/tool/fetch
-
$updateDynu
- enables updating IP to DNS mappings at https://www.dynu.com for DDNS support -
Track LTE Signal using The Dude is not really a RouterOS function - but provides an example of The Dude's
array_element()
andoid_column()
functions to handle name to OID mapping.
Please see Mikrotik's Scripting Language Manual for more details on the syntax and structure, and basic examples.
For more practical scripts and examples, see ✂ Rextended Fragments of Snippets
The following projects are in hooper:
-
RouterOS "Functional Repo" Various, potentially useful, scripts are littered here and forum. Part of the original idea of TIKOCI was to store them, in one place, and allow simple downloads. Eventually, more scripts will be published on
tikoci.github.com
. -
Traefik Proxy Container with for CORS & WASM Traefik seems like a better fit for adding HTTP frontend on RouterOS, than the previous tikoci/ngnix approach. While Traefik's DockerHub image work on RouterOS as-is — setup, configuration, and log viewing are greatly aided by scripting. The longer term goal is to integrate Grain WASM tikoci/traefik-wasm-grain plugin, as basis for policy enforcement for REST APIs (e.g. RouterOS REST support), using Traefik 3.0's WASM support.
Various repos make use of great work by others. Specifically, and in no order:
- Both
restraml
andcurl2rsc
use a few projects and libraries that enable the page:- PicoCSS to enable a "minimal CSS framework for semantic HTML"
- highlight.js
- deep-diff
- json-diff
- jsonpath
- Many repos here use RouterOS scripts. While specific contributions are noted in the specific scripts/projects, thanks @rextended & others on Mikrotik scripting forum for the many examples.
curl2rsc
webpage intikoci/postman-code-generator
uses HTMX, with glitch.com providing a backend web service needed to run Postman'scurl-to-postman
andpostman-collection
modules under nodeJS.- EvilFreelancer/docker-routeros's "CHR+QEMU-in-Docker" project is used to in extracting RouterOS
/console/inspect
data from a CHR running within a GitHub Action and used bytikoci/restraml
's schema generation code. tikoci/fat-chr
just re-builds a CHR image but relies on a script with some incantation ofqemu-img
/gdisk
- but the scripts themselves come from @jaclaz and @kriznos, with @sindy providing QA+mgmt, in a Mikrotik forum discussion.tikoci.github.io
uses the Observable Framework and GitHub Pages to build the TIKOCI website, which will be developed more in future.tikoci/winbox-deb
is largely borrowed from @eworm and others's Arch winbox package, specifically the.desktop
file.- Stuart Feldman, creator of original UNIX
make
& GNU's excellent documentation covering it. DespiteMakefile
's being ~50 years old, it allows the nifty (IMO) containerization approach used intikoci/netinstall
project – which is just 66 lines ofMakefile
code. And,make
also acts the "runtime" inside the container to both do operations and handle options viacmd=
or env vars. - In the esoteric,
traefik-wasm-grain
is an experimental WASM plugin for Traefik, built with Grain language & runs as RouterOS Traefik container - but the low-levelHttpWasm
bindings would not have been possible without help from @ospencer. - Mikrotik's @mrz. Intentionally last, since it was his
/console/inspect
"easter egg" clues that gave impetus to the various "schema tools" for RouterOS developed here.
Use at your own risk. No guarantees or warranties.
Any trademarks and/or copyrights remain the property of their respective holders, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements. Apple and Mac are registered trademarks of Apple Inc., registered in the U.S. and other countries and regions. MikroTik is a trademark of Mikrotik SIA. Python is a registered trademark of the PSF. UNIX is a registered trademark of The Open Group. Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries. Docker, Inc. and other parties may also have trademark rights in other terms used herein.
Follow any links at your own risk.. Various materials and code may contain links to other websites, content, or services. Links are not investigated, monitored, or checked for accuracy, adequacy, validity, reliability, availability, or completeness by us.
No liability can be accepted. No representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information is offered. Use the concepts, code, examples and other content at your own risk. There may be errors and inaccuracies, that may of course be damaging to your system. Although this is highly unlikely, you should proceed with caution. The author(s) do not accept any responsibility for any damage incurred.