Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cortex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ def notify(self, args):

# -------------------------------

# Run system health checks
def doctor(self):
from cortex.doctor import SystemDoctor

doctor = SystemDoctor()
return doctor.run_checks()

def install(self, software: str, execute: bool = False, dry_run: bool = False):
# Validate input first
is_valid, error = validate_install_request(software)
Expand Down Expand Up @@ -562,6 +569,7 @@ def show_rich_help():
table.add_row("rollback <id>", "Undo installation")
table.add_row("notify", "Manage desktop notifications") # Added this line
table.add_row("cache stats", "Show LLM cache statistics")
table.add_row("doctor", "System health check")

console.print(table)
console.print()
Expand Down Expand Up @@ -609,6 +617,9 @@ def main():
# Status command
status_parser = subparsers.add_parser("status", help="Show system status")

# doctor command
doctor_parser = subparsers.add_parser("doctor", help="Run system health check")

# Install command
install_parser = subparsers.add_parser("install", help="Install software")
install_parser.add_argument("software", type=str, help="Software to install")
Expand Down Expand Up @@ -688,6 +699,8 @@ def main():
# Handle the new notify command
elif args.command == "notify":
return cli.notify(args)
elif args.command == "doctor":
return cli.doctor()
elif args.command == "cache":
if getattr(args, "cache_action", None) == "stats":
return cli.cache_stats()
Expand Down
Loading
Loading