Windows mqtt-cli.exe not working?

I’m trying to get started with HiveMQ. I have followed the instructions at:

but when I navigate in command prompt to my extracted folder and type ‘mqtt-cli.exe’ it shows:

←[1mUsage:←[21m←[0m ←[1m←[33mmqtt←[39m←[21m←[0m [←[3m←[33m-hV←[39m←[23m←[0m] { pub | sub | shell }

MQTT Command Line Interpreter.

←[3m←[33m-h←[39m←[23m←[0m, ←[3m←[33m–help←[39m←[23m←[0m Show this help message and exit.
←[3m←[33m-V←[39m←[23m←[0m, ←[3m←[33m–version←[39m←[23m←[0m Print version information and exit.

←[1m←[33mpub←[39m←[21m←[0m, ←[1m←[33mpublish←[39m←[21m←[0m Publish a message to a list of topics
←[1m←[33msub←[39m←[21m←[0m, ←[1m←[33msubscribe←[39m←[21m←[0m Subscribe an mqtt client to a list of topics
←[1m←[33mshell←[39m←[21m←[0m, ←[1m←[33msh←[39m←[21m←[0m Starts MqttCLI in shell mode, to enable interactive mode with further sub commands.

after this, I enter:

mqtt sub -h -p 8883 -s -u admin -pw -t ‘my/test/topic’

but it says mqtt is not recognized as an internal or external command.

any suggestions?

I’ve got exactly the same problem. Seems like the text format used is wrong.
Maybe rather post it under the MQTT-CLI topic rather?
I can, but then I would just duplicate.

Did you solve this? If not, here’s what I learned. Win10 released a version of the console (Command Prompt) that supports ANSI colour codes (the rubbish you see muddling up the output), but it is not enabled by default. Three things you could do.

  1. Ignore it, and use the mqtt-cli shell; that mode enables colours

  2. Add the DWORD registry entry for HKEY_CURRENT_USER/Console/VirtualTerminalLevel, set to 1. This tells Win10 to enable some features the standard cmd prompt does not have, including colours.

  3. Install Microsoft’s “Terminal” from the Microsoft Store. The Command Prompt support in this automatically supports ANSI colours. You might like it better anyway… it appears to be a wrapper that supports a tabbed set of consoles.

BTW. When viewing a folder in Windows Explorer you can type CMD in the address line to open a command prompt with that folder already selected as current directory. When you type WT to open a Windows Terminal session, it opens in your user directory by default. To fix that, go to the Command Prompt profile and change the start directory to a dot (.)