MCPcopy Index your code
hub / github.com/Erotemic/mkinit

github.com/Erotemic/mkinit @1.8.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.8.3 ↗ · + Follow
28 symbols 92 edges 7 files 13 documented · 46% updated 2mo agov1.2.0 · 2025-12-02★ 908 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

The mkinit module helps you write __init__ files without from ? import *.

mkinit automatically imports all submodules in a package and their members.

It can do this dynamically, or it can statically autogenerate the __init__ for faster import times. Its kinda like using the fromimport * syntax, but its easy to replace with text that wont make other developers lose their hair.

Command Line Usage

The following command will statically autogenerate an __init__ file in the specified path or module name. If one exists, it will only replace text after the final comment. This means mkinit wont clobber your custom logic and can be used to help maintain customized __init__.py files.

mkinit <your_modname_or_modpath>

You can also enclose the area allowed to be clobbered in the autogeneration with special xml-like comments.

Python Usage

import mkinit; exec(mkinit.dynamic_init(__name__))

Core symbols most depended-on inside this repo

parse_requirements
called by 3
setup.py
_indent
called by 2
mkinit/dynamic_mkinit.py
_make_initstr
called by 2
mkinit/dynamic_mkinit.py
parse_version
called by 1
setup.py
parse_description
called by 1
setup.py
_find_local_submodules
called by 1
mkinit/static_mkinit.py
_static_parse_imports
called by 1
mkinit/static_mkinit.py
_autogen_init_make
called by 1
mkinit/static_mkinit.py

Shape

Function 26
Class 1
Method 1

Languages

Python100%

Modules by API surface

mkinit/dynamic_mkinit.py12 symbols
mkinit/static_mkinit.py10 symbols
setup.py5 symbols
mkinit/__main__.py1 symbols

For agents

$ claude mcp add mkinit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact