From 23482b5d8da5c67da1fc501ddbafdd123be3972c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 7 Sep 2025 14:29:35 +0300 Subject: feat: rename hexai-action -> hexai-tmux-action; remove --tmux/--no-tmux; tmux-only flow; update docs and Magefile --- cmd/hexai-action/main.go | 33 --------------------------------- cmd/hexai-tmux-action/main.go | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 cmd/hexai-action/main.go create mode 100644 cmd/hexai-tmux-action/main.go (limited to 'cmd') diff --git a/cmd/hexai-action/main.go b/cmd/hexai-action/main.go deleted file mode 100644 index b796cbd..0000000 --- a/cmd/hexai-action/main.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "context" - "flag" - "fmt" - "os" - - "codeberg.org/snonux/hexai/internal/hexaiaction" -) - -func main() { - infile := flag.String("infile", "", "Read input from this file instead of stdin") - outfile := flag.String("outfile", "", "Write output to this file instead of stdout") - forceTmux := flag.Bool("tmux", false, "Force running the UI in a tmux split-pane (auto if not set)") - noTmux := flag.Bool("no-tmux", false, "Disable tmux mode even if available") - uiChild := flag.Bool("ui-child", false, "INTERNAL: run interactive UI and write to -outfile atomically") - tmuxTarget := flag.String("tmux-target", "", "tmux split target (advanced)") - tmuxSplit := flag.String("tmux-split", "v", "tmux split orientation: v or h") - tmuxPercent := flag.Int("tmux-percent", 33, "tmux split size percentage (1-100)") - flag.Parse() - - opts := hexaiaction.Options{ - Infile: *infile, Outfile: *outfile, - ForceTmux: *forceTmux, NoTmux: *noTmux, UIChild: *uiChild, - TmuxTarget: *tmuxTarget, TmuxSplit: *tmuxSplit, TmuxPercent: *tmuxPercent, - } - if err := hexaiaction.RunCommand(context.Background(), opts, os.Stdin, os.Stdout, os.Stderr); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - diff --git a/cmd/hexai-tmux-action/main.go b/cmd/hexai-tmux-action/main.go new file mode 100644 index 0000000..02cfe09 --- /dev/null +++ b/cmd/hexai-tmux-action/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + + "codeberg.org/snonux/hexai/internal/hexaiaction" +) + +func main() { + infile := flag.String("infile", "", "Read input from this file instead of stdin") + outfile := flag.String("outfile", "", "Write output to this file instead of stdout") + uiChild := flag.Bool("ui-child", false, "INTERNAL: run interactive UI and write to -outfile atomically") + tmuxTarget := flag.String("tmux-target", "", "tmux split target (advanced)") + tmuxSplit := flag.String("tmux-split", "v", "tmux split orientation: v or h") + tmuxPercent := flag.Int("tmux-percent", 33, "tmux split size percentage (1-100)") + flag.Parse() + + opts := hexaiaction.Options{ + Infile: *infile, Outfile: *outfile, + UIChild: *uiChild, TmuxTarget: *tmuxTarget, TmuxSplit: *tmuxSplit, TmuxPercent: *tmuxPercent, + } + if err := hexaiaction.RunCommand(context.Background(), opts, os.Stdin, os.Stdout, os.Stderr); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + -- cgit v1.2.3