--- id: logmuse version: "0.3.1" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # logmuse — Logging setup License: permissive · Maintenance: active · Downloads: 122.4K/mo ## What it is and what it does Logmuse is a small utility that bridges argparse and Python's standard logging module, letting you add three standard CLI options (`--verbosity`, `--silent`, `--logdev`) to your command-line tool in one line. Instead of writing your own logging setup code, you call `add_logging_options()` to inject these arguments into your parser, then `logger_via_cli()` to configure the root logger based on what the user passed. All loggers in your package and its dependencies automatically respect these settings. The package is designed for CLI tools that want familiar logging controls without boilerplate. It works with standard Python logging, so imported packages don't need logmuse at all—they just use `logging.getLogger(__name__)` and inherit the configuration from your CLI entry point. The main gotcha is to avoid calling `init_logger()` at import time, which would break library usage by replacing handlers before the root logger can be configured. Use it for: - Add standard logging controls to a CLI tool without writing custom argparse setup or logging configuration code. - Let users control verbosity levels (1–5 mapping to CRITICAL through DEBUG) and developer mode from the command line. - Silence all logging output with `--silent` for scripting or batch workflows. - Enable detailed developer logging with timestamps and line numbers via `--logdev` for debugging. - Configure logging in an interactive Python session with `init_logger()` for quick testing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds standard CLI logging options (`--verbosity`, `--silent`, `--logdev`) to argparse-based command-line tools, with a simple interface to configure Python's standard logging from command-line arguments. Yes. Logmuse is a lightweight, actively maintained utility with no dependencies, permissive licensing, and a clear single purpose: reducing boilerplate for CLI logging. Install it if you're building a command-line tool with argparse and want standard logging options without writing setup code. Skip it only if you prefer to manage logging configuration yourself or don't need CLI-driven verbosity control. ## Install pip install logmuse uv add logmuse poetry add logmuse ## Installing logmuse Before you install: Low friction: pure Python wheel with no runtime dependencies. Active maintenance—released 7 days ago with commits through 2026-08-07. Supports Python 3.10 through 3.14. License in practice: BSD-2-Clause (permissive): you can use, modify, and distribute logmuse freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install logmuse import argparse import logmuse parser = argparse.ArgumentParser() parser = logmuse.add_logging_options(parser) args = parser.parse_args() logger = logmuse.logger_via_cli(args) logger.info("Hello, world!") Verify before relying: - Whether logmuse's root logger configuration works correctly when the package is imported as a library by other code - Performance impact of logmuse's handler setup on applications with many loggers ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 122.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cli logging options, argparse logging integration, command line verbosity control, python cli logger setup, logging from command line arguments, cli-logging, argparse [View on SkillFed](https://skillfed.io/packages/logmuse) · [View on PyPI](https://pypi.org/project/logmuse/)