Metadata-Version: 2.1
Name: levish
Version: 0.1.8.0
Summary: Create your own shell.
Home-page: https://github.com/aaronlyy/levish
Author: Aaron Levi Can (aaronlyy)
Author-email: aaronlevican@gmail.com
License: MIT
Download-URL: https://github.com/aaronlyy/levish/archive/v0.1.8.0.tar.gz
Description: ![header](media/header.png)
        
        # levish: Create your own Shell
        
        ## Installation
        
        Install levish using pip:
        
        ```txt
        pip install levish
        ```
        
        ## Getting started
        
        Using levish is very easy. We start by importing the 'Shell' class and creating a new Shell object.
        
        ```python
        from levish import Shell
        
        sh = Shell("MyShell")
        ```
        
        After that we can create our first command. We do that by first creating a simple function. The function has to take varargs called '*args'. Then we can add the function to our Shell object using the add_command() method. Pass in our new created function and add a simple description using the 'description' argument.
        
        ```python
        def hello(*args):
            print("what's up?")
        
        sh.add_command(hello, description="This command prints hello!")
        ```
        
        Now we just need to run our shell. We do that by executing the run() function of our Shell object.
        
        ### Complete code
        
        ```python
        from levish import Shell
        
        sh = Shell("MyShell")
        
        def cmd_hello(*args):
            print("hello!")
        
        sh.add_command(hello, description="This command prints hello!")
        
        sh.run()
        ```
        
        ### Output
        
        ```txt
        [>] hello
        hello!
        ```
        
        Other examples can be found in the examples folder.
        
Keywords: shell,terminal,commands,cmd,console
Platform: UNKNOWN
Description-Content-Type: text/markdown
