INNER CODE UNIT · Go
newShotCommand
gameknife/gkNextEngine · tools/gnb/cmd/gnb/main.go:607
func newShotCommand(ctx appContext) *cobra.Command {
var scene string
var target string
var frames int
var includeUI bool
var headless bool
cmd := &cobra.Command{
Use: "shot [--scene <path>] [--target <name>] [--frames N] [--ui] [--headless]",
Short: "Capture one validation screenshot, then auto-exit (no focus-stealing window)",
Long: "Render a scene to a stable frame, capture a single screenshot to a fixed path, then exit.\n\n" +
"The window is hidden so it never pops to the foreground or steals focus during an agent\n" +
"dev loop, and the app exits on its own. Pass --ui to include ImGui in the capture.\n" +
"The screenshot path is printed when finished.\n\n" +
"Examples:\n" +
" gnb shot --scene assets/models/playground.glb\n" +
" gnb shot --target ScadStudio --scene assets/scad/source/beer_cup.scad --frames 60\n" +
" gnb shot --target AirportSim --ui",
RunE: func(cmd *cobra.Command, args []string) error {