Add projects

This commit is contained in:
Alois 2026-08-24 00:10:41 +02:00
commit 8b607dd700
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
1802 changed files with 503346 additions and 2 deletions

View file

@ -0,0 +1,32 @@
// Command validate_codex_models validates a Codex client model catalog file.
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/router-for-me/CLIProxyAPI/v7/internal/registry"
)
func main() {
var inputPath string
flag.StringVar(&inputPath, "file", "", "Codex client model catalog JSON file")
flag.Parse()
if strings.TrimSpace(inputPath) == "" {
fmt.Fprintln(os.Stderr, "error: --file is required")
os.Exit(2)
}
data, err := os.ReadFile(inputPath)
if err != nil {
fmt.Fprintf(os.Stderr, "error: read %s: %v\n", inputPath, err)
os.Exit(1)
}
if err = registry.ValidateCodexClientModelsJSON(data); err != nil {
fmt.Fprintf(os.Stderr, "error: invalid Codex client model catalog %s: %v\n", inputPath, err)
os.Exit(1)
}
fmt.Printf("Validated Codex client model catalog: %s\n", inputPath)
}