mwcli (a MediaWiki focused command line tool targeting developers) over the years

January 25, 2025 0 By addshore

mcwli includes the third of so generation of “developer environments” that I have made for MediaWiki over the years. You can see the backstory in this earlier post.

Since the early days of 2022, there has been optional metric collection included within the mwcli tool.

This metric collection simply collects what command you run, and when you run it (without any parameters or inputs) so that the data can be aggregated, and the various commands usage can be graphed.

Each command run includes something like:

Commanddocker mediawiki exec
DateTime2025-01-07T12:45:18.213Z
Version0.25.1

I used to have live (ish) graphs in the Wikimedia Superset installation, however, the queries there appear to fail now. So I took some time to export the dataset as a CSV, and shove it around a bit in a Python notebook.

Overall usage

Since the tracking started, there have been 86,911 command executions reported. The actual number is likely higher, as this is optional tracking, but there is no way to gauge what we don’t see.

Generally, there has been continued growth in usage since 2022.

There have been a multitude of versions released, and generally most executions happen on the same version, and people update rather quickly.

Commands

Overall, the docker commands have seen the most usage, which is the MediaWiki developer environment.

Tab completion is a close second, which doesn’t surprise me, as it’s quite easy to hit tab a bunch of times for completions while using CLI tools, and each one counts as a command execution.

The other most used command groups are update, --help and version, all of which make sense in day to day CLI usage.

There are a few other spikes for various command groups through the years, but these are likely just development try-outs.

Looking at the individual commands rather than groups, we can see a collection of the docker dev environment commands at the top again.

And breaking everything down into a log graph, it is easy to see that the developer environment is the most used element of the CLI.

A next iteration?

One of the dreams was for this to become a general purpose developer utility for MediaWiki and Wikimedia developers and development, though to date, there isn’t much uptake of the additional commands within the CLI.

The flip side of this is that the maintenance burden of most (if not all) of these command is low. For example, the entire GitLab command stack is actually just the official GitLab Golang CLI embedded in this project. The Gerrit commands are all auto generated from the Gerrit API spec. Even the developer environment itself is just a few template commands that wrap around docker, docker compose and YAML. And the CI keeps things well tested, and images up to date.

A topic in the past few years has also been a rename, and perhaps it would make sense to do a rename, at the same time as a rework, restructure and re focus?