--- id: chz version: "0.4.0" license: MIT License Copyright (c) 2024 OpenAI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) license_treatment: permissive maintenance: aging --- # chz — chz is a library for managing configuration License: permissive · Maintenance: aging · Downloads: 1.1M/mo ## What it is and what it does chz is a configuration management library from OpenAI that lets you define configuration objects declaratively and parse them from the command line with full type checking and validation. It provides an object model with immutability, field-level control, and built-in help generation for CLI discoverability. The library handles serialization and deserialization, supports partial application and presets for shared configuration, and integrates post-initialization hooks for custom logic. You use chz by defining a configuration class with typed fields, then calling methods to parse from CLI arguments or load from serialized form. It's designed to replace ad-hoc argparse or environment-variable handling with a declarative, type-safe alternative that catches configuration errors early. Use it for: - Define and parse command-line tool configuration with automatic type validation and help text generation. - Build reusable configuration presets or templates that can be partially applied and shared across applications. - Validate and deserialize configuration from multiple sources (CLI, files, environment) into a single typed object model. - Create CLI tools with built-in discoverability where help and error messages are generated from the configuration schema. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. chz is a configuration management library that handles command-line parsing, validation, and serialization of configuration objects with type checking and immutability support. Yes, if you're building CLI tools or applications that need structured, validated configuration. The low install friction, permissive license, and active maintenance make it a solid choice. The aging status and lack of classifiers suggest it's stable but not rapidly evolving—suitable for production use when your Python version is 3.11+. ## Install pip install chz uv add chz poetry add chz ## Installing chz Before you install: Low install friction with a single lightweight dependency (typing-extensions). The package is aging but actively maintained, with a recent commit on 2025-11-24 and no archived status. License in practice: MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install chz from chz import Config class MyConfig(Config): name: str debug: bool = False config = MyConfig.from_cli() Requires Python 3.11 or later. Verify before relying: - Whether the library's immutability guarantees are enforced at runtime or are type-level only. - Performance characteristics when handling large configuration objects or deeply nested structures. - Compatibility with popular config file formats (YAML, TOML, JSON) beyond what the serialization docs suggest. ## Package facts - License: MIT License Copyright (c) 2024 OpenAI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags configuration management library, command line argument parsing, config validation and type checking, declarative configuration objects, cli config management, cli-tools, config-management, type-safe [View on SkillFed](https://skillfed.io/packages/chz) · [View on PyPI](https://pypi.org/project/chz/)