-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathragcli.py
More file actions
28 lines (24 loc) · 776 Bytes
/
ragcli.py
File metadata and controls
28 lines (24 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python3
"""
ragcli: Premium RAG Command Center for Oracle Database 26ai.
Direct script entry point.
"""
import sys
import os
# Add the current directory to sys.path to ensure ragcli package is found
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from ragcli.cli.main import app, run_repl
def main():
"""Main entry point logic."""
if len(sys.argv) == 1:
# No arguments provided, launch the interactive Gemini-style REPL
try:
run_repl()
except KeyboardInterrupt:
print("\n\n [dim white]Session terminated by user.[/dim white]")
sys.exit(0)
else:
# Arguments provided, pass to typer app for sub-command execution
app()
if __name__ == "__main__":
main()