Added soypakcli.py

The soypak CLI interface module which handles arg parsing and the initialisation of soypak.
This commit is contained in:
Ethan Smith-Coss 2023-07-04 20:52:59 +01:00
parent 23fd41ce03
commit ce8365ebe7
Signed by: TheOnePath
GPG Key ID: 4E7D436CE1A0BAF1

24
soypak/cli/soypakcli.py Normal file
View File

@ -0,0 +1,24 @@
import sys
import soypak.cli.parser as parser
# :@TODO: remove this and implement the following:
# - a class which will auto-add commands to the CLI which can be ran (eopkg autocommand).
# - this will inherit `type` and be inherited as a metaclass `class ...(metaclass=...)`
class SoypakCLI:
def __init__(self) -> None:
_parser = parser.SoypakParser()
cmd, args = _parser.parse_args()
if len(args) == 0:
if _parser.namespace.version:
print(_parser.VERSION)
sys.exit(0)
print(cmd, args)
def run(self):
# :@TODO: run commands
...