Code example

Is it possible to add to WinBox a preview of the code that is generated by the set configuration?
For example:
winbox64.png

You could wait months and years for MikroTik to get around to adding this preview feature, but you can, today, for the low-low cost of $0 get a “postview” of a given change.

Step 1: Back your router config up with my fine backup system.

Step 2: Make your change in WinBox.

Step 3: Back the router up again, yielding a compact diff of the change for you to study.

Huzzah!

There is also safe mode:
https://help.mikrotik.com/docs/display/ROS/Configuration+Management#ConfigurationManagement-SafeMode

What will be purpose of this unless this is a way you want to learn CLI syntax with that feature?

@optio, That’s a fine purpose. Make the GUI generate CLI code for you, see what it does, and thereby learn to write it yourself.

The OP’s use of the word “preview” suggests that he wants to see what will happen if he clicks the “OK” button, which is why @Amm0 brings up Safe Mode. The major problem with Safe Mode is that if you do anything complicated and that locks you out, triggering the rollback, you have to do it all over again but with one leeeetle thing changed. If instead we could get WinBox to give us the CLI code up front, we could copy-paste it somewhere and then begin iterating on it until we get it right.

Re safe mode… I don’t see this any time soon. So mainly a suggestion you can try CLI commands & if you got something wrong revert it. In most cases, winbox hiearchy is same as CLI and the attributes name are same as winbox just with dashes.

The issue is what command to “preview” is not a simple answer. e.g. Does it show a set with using .id or using [find …]? Does it show the “get” until you edit and then show the “set”? How does an add show?

More importantly, some “tricks” are need to use the CLI that cannot be captured in a “preview”. Importantly how [find] works with “set”. And learning about tab completion and F1 to show help in CLI are likely more helpful than “preview”.

This does however seem like a good YouTube video for Mikrotik: How to convert any winbox operation to CLI?

Interesting concept. I use WinBox almost exclusively for configuration of my routers. On more than one occasion, I have looked at my daily exports in order to figure out the CLI structure for some change that I did the day before (the router creates backup and export files every night).