mikrotik-cli-probe

Probe raw RouterOS terminal output over Telnet to debug CLI transport behavior.

198|97|Updated Aug 16, 2015
One-click install
npx skills add https://github.com/danikf/tik4net --skill mikrotik-cli-probe-danikf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mikrotik-cli-probe
Source: https://github.com/danikf/tik4net/tree/main/.claude/skills/mikrotik-cli-probe
Command: npx skills add https://github.com/danikf/tik4net --skill mikrotik-cli-probe-danikf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a MikroTik router returns empty, garbled, or unexpected output over a terminal connection (Telnet, SSH-PTY, MAC-Telnet, WinBox CLI), it is hard to tell whether the router or the client library is at fault. This Skill provides a standalone Telnet probe script plus verified knowledge of RouterOS CLI quirks so you can establish ground truth independently of the tik4net library. ## Core Features & Use Cases - Standalone Telnet probe script: Tools/probes/telnet-cli-probe.ps1 performs Telnet IAC negotiation, VT100 cursor-probe answers, and login handling, then prints the raw bytes the router returns, without using tik4net. - RouterOS CLI quirks reference: Documents verified behaviors such as print as-value producing nothing interactively unless wrapped in :put, detail being required for full fields, print stats for live counters, quoting rules for where expressions, and VT100 terminal-size negotiation. - Use Case: A print as-value command over tik4net's Telnet transport returns nothing. Run the probe script against the router, confirm the router itself emits no output for bare print as-value, then fix the command builder to wrap it in :put [...]. ## Quick Start Run the probe script with the router host and credentials from the integration test App.config and a command like ':put [/interface print detail as-value]' to see the raw bytes the router sends back.

Frequently Asked Questions about mikrotik-cli-probe

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I see the raw bytes a MikroTik router returns over Telnet?

Run the telnet-cli-probe.ps1 script with the router host, user, and a command such as ':put [/interface print detail as-value]'. It performs Telnet negotiation and VT100 answers, then prints raw bytes with ESC shown as \e and CR/LF as \r/\n.

Why does print as-value return nothing over a MikroTik terminal session?

RouterOS print as-value produces no output in an interactive terminal; it only materializes in script context. Wrap it in :put, for example ':put [/interface print detail as-value]', which emits one line with records joined by semicolons.

When should I use the Telnet probe instead of the MikroTik binary API?

Use the binary API for normal structured queries. Use the probe when the question is about the terminal layer itself: empty or garbled CLI output, VT100 negotiation issues, or verifying what the router sends independent of any client library.

Why does a MikroTik CLI session return only a prompt with no data?

The router sends ESC[6n cursor probes to detect terminal size; if the client never replies, it assumes a 1x1 terminal and emits no output. The client must answer VT100 cursor reports and advertise a wide terminal to avoid wrapped lines.

How do I pass commands containing parentheses to the probe script?

Use the -CommandFile parameter with a file containing one command per line. Passing parentheses directly via -Command fails because PowerShell parses them as syntax; the file bypasses argument parsing and supports # comments.

Does the probe script depend on the tik4net library?

No, the probe is a self-contained PowerShell Telnet client that deliberately avoids tik4net. This makes it a ground-truth reference for comparing against the library's CLI layer in tik4net/Cli and tik4net/Telnet.