Since early February last year, Team RabbitMQ has been working on a new implementation
of our command line tools and yesterday we finally integrated them into master and open sourced
the repository [1].
We had a few goals with this project:
* We wanted to use a more user-friendly command line parser and produce more useful help and error messages, at least in the medium term
* CLI tools should be extensible from plugins: plugins such as management, federation, shovel, trust store all have functions that are meant to be invoked by CLI tools but the only way of doing it was `rabbitmqctl eval`, which is error prone and can be dangerous
* CLI tools should be able to produce machine-friendly formats, be it JSON, CSV or something else; there was no internal infrastructure for doing that in the original implementation
* Our CLI tools historically didn't have good test coverage; the new ones should (and do)
* We wanted to give Elixir [2] a try on a real project that wasn't too schedule sensitive
and was from scratch. There are chances that we will adopt it for all new plugins in the future.
* CLI tools should be a separate repository just like all plugins, client libraries, and now the release toolchain
I believe we are at a point where all of the above boxes are checked and we've integrated
this new project into RabbitMQ release builds.
If you get a nightly build of RabbitMQ or build the tools from source — it's fairly straightforward
once you have Elixir and Mix installed — then `sbin/rabbitmqctl` and `sbin/rabbitmq-plugins` will
point to the new CLI binary (yes, a single one for both tools) and can help us test it,
find incompatibilities with the existing tools and maybe even try developing a CLI command
of your own :)
We are not 100% done yet but what's left is mostly polishing, ironing out minor backwards compatibility problems and adding features that are not essential and shouldn't delay
the switch to the new repository.
We will publish a blog post and initial set of docs in the upcoming weeks but this experiment
turned out to be a substantial improvement over the CLI tools we have and it's very exciting
to have it ship in the 3.7.0 release.
Let us know how it goes and what you'd like to see in CLI tools beyond 3.7.0.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ