Metadata-Version: 2.1
Name: Scripto
Version: 0.0.8
Summary: A simple framework to help you build scripts faster!
Author: Ron Hasleton
Author-email: ronhasleton@gmail.com
License: GNU GPLv3
Keywords: scripting,auto,cli,argparse
Requires-Python: >=3.7, <4
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# Scripto

Are you sick of writing long and annoying argparse initialization code?
Worry no more - the future is here!

Scripto is a Python package designed to transform your scripts into a powerful CLI tool using decorators.
As in the example below, you can use the `@script.register()` decorator on your main business logic functions
to effortlessly generate a feature-rich command-line interface.

## Features

- Seamless integration with argparse.
- Simple and intuitive syntax inspired by Flask.
- Automatically generates CLI commands from decorated functions.
- Ideal for turning scripts into organized and user-friendly command-line tools.

## Usage

1. Install Scripto.
   You can install Scripto using pip:
    ```bash
    pip install scripto
    ```

2. Decorate your main business logic functions with `@script.register()`.
3. Run your script to enjoy the generated CLI:

    ```python
    from scripto.app import Scripto
    
    script = Scripto('script')
    
    @script.register()
    def my_command(arg1, arg2):
        """
        Description of your command.
        """
        # Your business logic here
    
    if __name__ == "__main__":
        script.run()
    ```

## Complex Examples

See the [example](exmaples/Examples.py) script provided.

## About the rationale

We all like the simple automations, and nifty little scripts play a vital role in the life of every developer.

Many times, what was a simple 3 line script turned into a slightly larger one,
and then all of your friends want to use it too.

Which is when you find out, your user interface sucks.

This framework aims to simplify the creation of the command line interface of such scripts.
