Registry / devops / mike
library2.2.0pypypi✓ verified 23d ago

mike is a Python utility designed to simplify the deployment of multiple versions of your MkDocs-powered documentation to a Git branch, commonly `gh-pages`. This approach allows you to archive older documentation versions, ensuring they remain accessible even if future MkDocs updates introduce breaking changes. The current version is 2.1.4, with a release cadence that includes frequent bug fixes and less frequent but consistent minor/major feature releases.

pip install mike
INSTALL
IMPORT
SIG · MIKE
M
mike
devopspythonv2.2.0
Install
3.2s avg
Import
Disk
34MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 34.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.2s · import 0.000s · 36MB
34MB installed
● package 34MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mike
plugins: - mike
mike is primarily a CLI tool and an MkDocs plugin. Direct Python programmatic imports of its core functionality are less common for typical usage. Its primary 'import' is via the MkDocs configuration file (`mkdocs.yml`) to enable the versioning features and UI selector.

This quickstart demonstrates the core `mike` commands for setting up, deploying, and serving versioned MkDocs documentation. It includes creating a new MkDocs project, deploying initial versions with aliases, setting a default version, and viewing the documentation locally.

mkdocs new my-docs cd my-docs # Add some content or configure mkdocs.yml echo 'theme: readthedocs' >> mkdocs.yml # Deploy the initial version and an alias mike deploy 1.0 latest # Set the default version to 'latest' mike set-default latest # Serve the documentation locally (includes version selector) mike serve # To add another version later: mike deploy 2.0 # To update an existing alias: mike alias 2.0 stable --update-aliases # To list deployed versions: mike list
mike --version
Debug
Known issues
breakingIn `mike` v2.0.0, the default behavior for deploying aliases changed from copying files (`copy`) to using symbolic links (`symlink`). Additionally, empty commits are no longer created by default during deployment.
fix
If relying on the old behavior, explicitly specify `--alias-type copy` in CLI commands or `alias_type: copy` in the `mike` plugin configuration in `mkdocs.yml`. To allow empty commits, add `--allow-empty` to `mike deploy` commands.
affects: <2.0.0
gotchaPrior to `mike` v2.1.0, when `mike` loaded the MkDocs configuration, it did not properly trigger the `startup` and `shutdown` events. This could lead to unexpected behavior or failures for other MkDocs plugins that rely on these events.
fix
Upgrade to `mike>=2.1.0` to ensure proper execution of MkDocs' `startup` and `shutdown` events.
affects: <2.1.0
gotchaFull support for resolving `INHERIT` directives in `mkdocs.yml` when using environment variables (e.g., `!ENV [VAR, 'default']`) was only robustly added and fixed in `mike` v2.1.1. Older versions might not correctly parse or apply these variables, leading to configuration errors.
fix
Ensure `mike>=2.1.1` is installed if you are using `INHERIT` directives with environment variables in your `mkdocs.yml` file.
affects: <2.1.1
gotchaWhen using `mike serve`, it only serves the *current* version of your documentation from your local files, not necessarily the versions committed to your `gh-pages` branch. For testing committed versions, use `mike serve` (which serves from the deployed branch) rather than `mkdocs serve` (which serves from local source).
fix
Be mindful of which command you use for local testing: `mkdocs serve` for local source changes, `mike serve` for deployed (Git) branch content. For live sites, use a proper web server, not `mike serve` or `mkdocs serve`.
affects: all
Upgrade
Version history
2.2.0latest on PyPI · released Apr 14, 2026
Audit
Dependencies
mkdocsrequiredmike manages versions of MkDocs documentation, so MkDocs itself is a fundamental prerequisite.
gitrequiredmike interacts directly with Git for deploying documentation versions to branches like `gh-pages`.
Agent activity
7 hits · last 30 days
node
4
Resources
mike — pip install mike · libregistry