Add list tools; normalize tool names and paths in transcript

This commit is contained in:
Ian Gulliver
2026-10-20 21:05:29 -07:00
parent e5a7fc4c1a
commit 53f20e40d3
9 changed files with 175 additions and 20 deletions
+20
View File
@@ -0,0 +1,20 @@
package main
import (
"fmt"
"os"
"g.fc.run/ai/byre/internal/dirlist"
)
func listCmd(args []string) {
if len(args) != 1 {
usage()
}
out, err := dirlist.List(args[0])
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Print(out)
}
+3 -1
View File
@@ -24,13 +24,15 @@ func main() {
signingCmd(os.Args[2:])
case "grep":
grepCmd(os.Args[2:])
case "list":
listCmd(os.Args[2:])
default:
usage()
}
}
func usage() {
fmt.Fprintln(os.Stderr, "usage: byre serve | byre install | byre check | byre run [--resume ID] | byre signing CHECKOUT | byre grep [--glob GLOB] [--ignore-case] [--files-only] PATTERN PATH")
fmt.Fprintln(os.Stderr, "usage: byre serve | byre install | byre check | byre run [--resume ID] | byre signing CHECKOUT | byre grep [--glob GLOB] [--ignore-case] [--files-only] PATTERN PATH | byre list PATH")
os.Exit(2)
}