xonecas.io
6119
My

mysis / files

mysis / internal / cli / help.go

3.1 KB
1package cli
2
3import (
4	"fmt"
5
6	"github.com/xonecas/mysis/internal/styles"
7)
8
9// PrintVersion displays the version information.
10func PrintVersion(version string) {
11	fmt.Printf("Mysis %s\n", version)
12}
13
14// PrintHelp displays usage information with CLI styling.
15func PrintHelp(version string) {
16	fmt.Println(styles.Brand.Render("╔══════════════════════════════════════╗"))
17	fmt.Println(styles.Brand.Render("║") + "  " + styles.BrandBold.Render("Mysis") + " - SpaceMolt Agent CLI         " + styles.Brand.Render("║"))
18	fmt.Println(styles.Brand.Render("╚══════════════════════════════════════╝"))
19	fmt.Println()
20	fmt.Println(styles.BrandBold.Render("USAGE:"))
21	fmt.Println("  mysis [flags]")
22	fmt.Println()
23	fmt.Println(styles.BrandBold.Render("FLAGS:"))
24	fmt.Println("  " + styles.Secondary.Render("-h, --help") + "              Show this help message")
25	fmt.Println("  " + styles.Secondary.Render("-v, --version") + "           Show version information")
26	fmt.Println("  " + styles.Secondary.Render("-c, --config") + " PATH       Path to config file (default: config.toml)")
27	fmt.Println("  " + styles.Secondary.Render("-d, --debug") + "             Enable debug logging")
28	fmt.Println("  " + styles.Secondary.Render("-p, --provider") + " NAME     Provider name (overrides config default)")
29	fmt.Println("  " + styles.Secondary.Render("-s, --session") + " NAME      Session name (resume or create)")
30	fmt.Println("  " + styles.Secondary.Render("-a, --autoplay") + " MSG      Start autoplay immediately with message")
31	fmt.Println("  " + styles.Secondary.Render("-f, --file") + " PATH      Load system prompt from markdown file")
32	fmt.Println("  " + styles.Secondary.Render("-t, --tui") + "              Use terminal UI mode")
33	fmt.Println("  " + styles.Secondary.Render("-l, --list-sessions") + "     List recent sessions and exit")
34	fmt.Println("  " + styles.Secondary.Render("-D, --delete-session") + " N  Delete session by name and exit")
35	fmt.Println()
36	fmt.Println(styles.BrandBold.Render("EXAMPLES:"))
37	fmt.Println("  # Start anonymous session")
38	fmt.Println("  mysis")
39	fmt.Println()
40	fmt.Println("  # Resume or create named session")
41	fmt.Println("  mysis -s mybot")
42	fmt.Println()
43	fmt.Println("  # Start with autoplay enabled")
44	fmt.Println("  mysis -s mybot -a \"explore and mine resources\"")
45	fmt.Println()
46	fmt.Println("  # List all sessions")
47	fmt.Println("  mysis -l")
48	fmt.Println()
49	fmt.Println("  # Delete a session")
50	fmt.Println("  mysis -D mybot")
51	fmt.Println()
52	fmt.Println(styles.BrandBold.Render("IN-SESSION COMMANDS:"))
53	fmt.Println("  " + styles.Secondary.Render("/autoplay <message>") + "    Start autonomous gameplay with given goal")
54	fmt.Println("  " + styles.Secondary.Render("/autoplay stop") + "         Stop autonomous gameplay")
55	fmt.Println("  " + styles.Secondary.Render("exit, quit") + "             Exit the session")
56	fmt.Println()
57	fmt.Println(styles.Muted.Render("Note: Running without -s/--session creates an anonymous session (not saved by name)."))
58	fmt.Println()
59}