mirror of
https://github.com/koloideal/Argenta.git
synced 2026-08-08 17:01:13 +03:00
docs: add CLI documentation section with translations and code snippets; refactor mock/ to examples/, improve CLI module (bug fixes, DX, error handling)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from prompt_toolkit import HTML
|
||||
|
||||
from argenta import App, Orchestrator
|
||||
from argenta.app import PredefinedMessages, StaticDividingLine, AutoCompleter
|
||||
from argenta.app.dividing_line.models import DynamicDividingLine
|
||||
from argenta.orchestrator import ArgParser
|
||||
from examples.example_app.routers import work_router
|
||||
|
||||
app: App = App(
|
||||
dividing_line=StaticDividingLine('~')
|
||||
)
|
||||
orchestrator: Orchestrator = Orchestrator()
|
||||
|
||||
|
||||
def main():
|
||||
app.include_router(work_router)
|
||||
|
||||
app.add_message_on_startup(PredefinedMessages.USAGE)
|
||||
app.add_message_on_startup(PredefinedMessages.AUTOCOMPLETE)
|
||||
app.add_message_on_startup(PredefinedMessages.HELP)
|
||||
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user