package main

import (
	"fmt"
	"os"

	"github.com/keepmind9/acp-sdk-go/examples/cli/cmd"
	"github.com/spf13/cobra"
)

func main() {
	root := &cobra.Command{
		Use:   "acp-cli",
		Short: "acp-cli is a simple interactive ACP client.",
		Long: `acp-cli connects to an ACP agent over stdio for interactive conversation.

Use the "run" subcommand to spawn an agent and chat with it:

  acp-cli run -- ./examples/agent
  acp-cli run -- claude
  acp-cli run -- /path/to/acp-server --work-dir /project --env API_KEY=xxx

Inside the session:
  :exit, :quit   Exit the client
  :cancel         Cancel the current prompt
  :help           Show available commands`,
		SilenceUsage: true,
	}

	root.AddCommand(cmd.RunCmd)

	if err := root.Execute(); err != nil {
		fmt.Fprintln(os.Stderr, "acp-cli:", err)
		os.Exit(1)
	}
}
