package com.correx.apps.cli

import com.correx.apps.cli.commands.ApproveCommand
import com.correx.apps.cli.commands.EventsCommand
import com.correx.apps.cli.commands.HealthCommand
import com.correx.apps.cli.commands.ProviderCommand
import com.correx.apps.cli.commands.ReplayCommand
import com.correx.apps.cli.commands.RunCommand
import com.correx.apps.cli.commands.SessionCommand
import com.correx.apps.cli.commands.StatsCommand
import com.correx.apps.cli.commands.StatusCommand
import com.correx.apps.cli.commands.TaskCommand
import com.correx.apps.cli.commands.UndoCommand
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.subcommands
import com.github.ajalt.clikt.parameters.options.flag
import com.github.ajalt.clikt.parameters.options.option

class CorrexCli : CliktCommand(name = "correx") {
    val json by option("--json", help = "Output machine-readable JSON").flag()
    val quiet by option("--quiet", help = "Output errors only").flag()

    override fun run() = Unit
}

fun buildCli(): CorrexCli = CorrexCli().subcommands(
    RunCommand(),
    SessionCommand(),
    ApproveCommand(),
    StatusCommand(),
    ProviderCommand(),
    UndoCommand(),
    EventsCommand(),
    ReplayCommand(),
    StatsCommand(),
    HealthCommand(),
    TaskCommand(),
)
