This article explains the current architecture of gr_modtool in the python3 branch.
What is gr_modtool?
While developing an Out Of Tree module, there's a lot of boring, monotonous work involved: boilerplate code, makefile editing, etc. gr_modtool is a script which aims to help with all these things by automatically editing makefiles, using templates, and doing as much work as possible for the developer such that you can jump straight into the DSP coding.
Note that gr_modtool makes a lot of assumptions on what the code looks like. The more your module is custom and has specific changes, the less useful gr_modtool will be, but it is probably the best place to start with any new module or block. You can go through the block coding guide for getting an insight of the tool.
gr_modtool is available in the GNU Radio source tree and is installed by default.
gr-modtool uses the click python library for its command line interface.