Welcome to params-proto
params-proto is a lightweight Python library that automatically generates command-line interfaces (CLIs) and configuration management from type-annotated functions and classes.
What Problem Does It Solve?
Instead of manually building argument parsers and config systems, you write simple Python code with type hints—params-proto handles the rest:
Run it from the command line:
Key Features
✅ Automatic CLI generation - No argparse boilerplate needed ✅ Type-based help text - Automatic type detection and display ✅ Configuration as code - Reusable, composable config objects ✅ Union types as subcommands - Choose between multiple configurations ✅ Environment variables - Load defaults from env vars ✅ Hyperparameter sweeps - Easy parameter exploration ✅ Singleton prefixes - Global namespaced configuration groups
Quick Start Paths
For scripts and CLI tools: Start with Configuration Patterns to learn function-based configs.
For libraries and reusable components: Start with Core Concepts to understand decorators and classes.
For detailed CLI features: Check CLI Fundamentals for naming, help generation, and types.
For advanced patterns:
See Advanced Patterns for prefixes, singletons, and composition.
Next Steps
- Read Core Concepts - Understand the 3 main decorators
- Pick your pattern:
- Functions → Configuration Patterns
- Classes →
Advanced Patterns - Union types →
Union Types
- Explore features:
- CLI basics → CLI Fundamentals
- CLI patterns → CLI Patterns
- Environment variables →
Environment Variables - Parameter sweeps →
Hyperparameter Sweeps
Documentation
- Core Concepts - Decorators and basic usage
- Configuration Patterns - Functions vs classes
- CLI Fundamentals - Building CLIs
- CLI Patterns - Advanced CLI patterns
Union Types- Subcommands and optional parametersAdvanced Patterns- Prefixes and composition- Type System - Supported types and conversion
Environment Variables- EnvVar integration- Parameter Overrides - Multiple override methods
Hyperparameter Sweeps- Systematic exploration- Parameter Iteration - Lightweight sweeps with
piter @ {...}syntax
Features
Automatic CLI from Functions
→ Automatically generates help, parses args, handles types.
Configuration Classes
→ Reusable, composable, type-safe configurations.
Union Types as Subcommands
Global Prefixed Configs
Philosophy
- Minimal boilerplate - Focus on logic, not CLI setup
- Type-driven - Leverage Python's type system
- Composable - Build complex configs from simple pieces
- CLI-first - Design for command-line usage
- Pythonic - Use familiar Python patterns and idioms