I started writing a prototype of the approach discussed in this thread. But then Worktm had other ideas, as it so often seems to.
The code is up on Github. It’s nowhere near complete, but perhaps there is enough to see where I was going. It’s not just rostopic, it’s intended to be a complete set of command line tools for working with the ROS graph.
I still want to keep working on it myself, but I think progress would be faster as a group effort.
Having said that, there has been activity recently on the ros2 github to implement a rosnode tool directly, so perhaps this work is moot.