{"id":8009,"library":"checkmk-dev-tools","title":"Checkmk Dev Tools","description":"Checkmk Dev Tools is a collection of helper scripts designed for developers working with Checkmk. It provides various utilities to streamline development workflows for Checkmk and related projects. The current version is 2.2.0, and it generally follows the Checkmk project's release cadence, with updates often tied to Checkmk major and patch releases.","status":"active","version":"2.2.0","language":"en","source_language":"en","source_url":"https://github.com/Checkmk/checkmk-dev-tools","tags":["monitoring","checkmk","devops","tools","scripts","utility"],"install":[{"cmd":"pip install checkmk-dev-tools","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"The 'checkmk-dev-tools' package contains helper scripts meant for direct execution from the command line after being added to the system's PATH. It is not designed for traditional Python `import` statements to access classes or functions programmatically within a Python script. If programmatic interaction is desired, consider executing the CLI tools as subprocesses.","symbol":"checkmk-dev-tools","correct":"This package primarily provides command-line tools, not Python modules for direct import. After installation, scripts are typically accessed via the system PATH."}],"quickstart":{"code":"# Example: Assuming 'cmk-dev-install' is one of the scripts installed and available in PATH\nimport subprocess\nimport os\n\n# Note: The actual tools and their arguments depend on the specific scripts\n# within the checkmk-dev-tools package and their intended functionality.\n# This is a generic example demonstrating how to execute a command-line tool.\n\n# Example of executing a hypothetical 'cmk-dev-info' tool to get version info\n# You might need to adjust the command based on actual tools in the package.\ntry:\n    result = subprocess.run(['cmk-dev-install', '--help'], capture_output=True, text=True, check=True)\n    print(\"cmk-dev-install --help output:\\n\", result.stdout)\nexcept FileNotFoundError:\n    print(\"Error: 'cmk-dev-install' command not found. Ensure checkmk-dev-tools is installed and in PATH.\")\nexcept subprocess.CalledProcessError as e:\n    print(f\"Error executing command: {e}\")\n    print(f\"Stderr: {e.stderr}\")\n","lang":"python","description":"This quickstart demonstrates how to interact with a hypothetical command-line tool from the `checkmk-dev-tools` package using Python's `subprocess` module. Since the package consists of scripts, direct Python imports are not the standard usage. Users are expected to add the installed scripts to their system's PATH and execute them directly."},"warnings":[{"fix":"After `pip install checkmk-dev-tools`, ensure your shell's PATH includes the directory where pip installs scripts (e.g., `~/.local/bin` or your virtual environment's `bin/Scripts` directory). You might need to restart your terminal or add `export PATH=$PATH:~/.local/bin` to your shell's configuration file (e.g., `.bashrc`, `.zshrc`).","message":"The `checkmk-dev-tools` package installs command-line scripts. These scripts need to be available in your system's PATH environment variable to be executable directly. Installation via pip does not always automatically add scripts to a universally accessible PATH.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always check the official Checkmk release notes and the `checkmk-dev-tools` GitHub repository for specific migration notes and compatibility information before upgrading your Checkmk instance. Update `checkmk-dev-tools` to the latest compatible version.","message":"Checkmk major version upgrades often introduce breaking changes in APIs or internal structures that Checkmk development tools might rely on. Tools might become incompatible or behave unexpectedly with newer Checkmk versions.","severity":"breaking","affected_versions":"Across Checkmk major versions (e.g., 2.3.0 to 2.4.0, 2.4.0 to 2.5.0)"},{"fix":"Consult the source code or any available documentation for individual scripts within the `checkmk-dev-tools` package to understand their expected behavior, parameters, and environmental dependencies. Test scripts thoroughly in your development environment before relying on them in production-like settings.","message":"Output from the scripts can vary significantly based on the Checkmk environment they are executed against (e.g., site version, configuration). Scripts are often designed for specific Checkmk versions or setups.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Verify installation with `pip show checkmk-dev-tools`. If installed, locate the script directory (e.g., `python -m site --user-base`/bin on Linux/macOS or `Scripts` in your virtual environment on Windows) and add it to your PATH. For example: `export PATH=\"$PATH:$(python -m site --user-base)/bin\"` in your shell config.","cause":"The directory where pip installed the `checkmk-dev-tools` scripts is not in your system's PATH environment variable, or the package was not installed correctly.","error":"cmk-dev-install: command not found"},{"fix":"Ensure you are running Python 3.10.4 or higher, but less than Python 4.0.0. Use a virtual environment to manage specific Python versions if needed. For example, `pyenv install 3.11.8 && pyenv local 3.11.8`.","cause":"You are attempting to use `checkmk-dev-tools` with an incompatible Python version.","error":"Error: Python requirements not met: requires Python >=3.10.4, <4.0.0"},{"fix":"Review the specific script's documentation or `--help` output for expected site ID formats and allowed characters. Ensure the site ID exists and is accessible to the user running the script.","cause":"A `checkmk-dev-tools` script was invoked with an invalid or incorrectly formatted Checkmk site ID.","error":"ValueError: Invalid site ID"}]}