Metadata-Version: 2.4
Name: turbolaunch
Version: 0.1.0
Summary: The definitive command-line arguments parser
Author-email: Sam Vervaeck <samvv@pm.me>
Maintainer-email: Sam Vervaeck <samvv@pm.me>
License-Expression: MIT
Project-URL: Homepage, https://github.com/samvv/turbolaunch
Project-URL: Bug Reports, https://github.com/samvv/turbolaunch/issues
Project-URL: Source, https://github.com/samvv/turbolaunch/
Keywords: cli,argparse,library
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Provides-Extra: dev
Requires-Dist: check-manifest; extra == "dev"
Provides-Extra: test
Requires-Dist: coverage; extra == "test"
Dynamic: license-file

TurboLaunch
===========

TurboLaunch is a CLI parser for Python programs that requires almost no setup.

 - ✅ Run Python functions directly as CLI commands
 - ✅ Support for enums and other built-in types
 - 🚧 Help messages derived from docstrings
 - 🚧 Plugins to extend the functionality of this library
 - 🚧 Fuzzing of as much code paths as possible to ensure quality

TurboLaunch was initially written as part of the [Mage project](https://github.com/samvv/mage).

## Quick Start

Simply create or edit a module with the following code:

```py
def main() -> int:
    import turbolaunch
    turbolaunch.launch(__name__)
```

In your `pyproject.toml`-file, you'd have something like this:

```toml
[project.scripts]
mycommand = "mylibrary:main"
```

That's it!

Now if you would like to have command `test` which e.g. takes a filename and an optional `foo` flag:

```py
def test(filename: str, foo: bool = False) -> int:
    if foo:
        print("'foo' is enabled")
    print(f"Reading {filename}")
    return 0
```

The above code would be run like this:

```
mycommand test loremipsum.txt --foo
```

More options, such as programmatic usage and plugins will come soon.

## License

This software is licensed under the MIT license.
