Skip to content

Python CLI builder with validation and security features. Create command-line apps using decorators and type hints.

License

Notifications You must be signed in to change notification settings

ulquiorracode/cli_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Builder (deprecated, watch rethink branch)

A modern, type-safe CLI framework for Python applications.

Features

  • Type hints and validation
  • Immutable command configurations
  • Private attributes protection
  • Decorator-based command registration
  • Flexible argument and option handling
  • Built-in error handling
  • Comprehensive test coverage

Documentation

Full documentation is available in multiple languages:

Quick Start

from cli_builder.app import CLI

cli = CLI(name="my-cli", description="My CLI application")

@cli.option("count", short="c", type=int, default=1, help="Number of times to greet")
@cli.argument("name", help="Name to greet")
@cli.command(description="Say hello")
def hello(name: str, count: int = 1) -> None:
    """Simple hello command."""
    for _ in range(count):
        print(f"Hello, {name}!")

if __name__ == "__main__":
    cli.run()

Installation

pip install cli-builder

Examples

See the examples directory for usage examples.

Development

  1. Clone the repository:
git clone https://github.com/ulquiorracode/cli_builder.git
cd cli-builder
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest

Roadmap

Future plans for the CLI Builder project:

  • Add support for Fluent API
  • Add interactive elements (menus, progress bars, find fields, etc.)
  • Create Docker integration for containerized CLI apps
  • Implement plugin system for extending functionality
  • Add support for configuration files (.ini, .yaml, etc.)
  • Improve error messages and debugging capabilities
  • Implement localization

See TODO list for more details.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

About

Python CLI builder with validation and security features. Create command-line apps using decorators and type hints.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages