Files
pack/cli/schema.go
T
zeekay 7844a60aff refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding
- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
2026-09-04 00:40:42 -07:00

31 lines
653 B
Go

package cli
import (
"context"
"encoding/json"
"os"
"github.com/hanzoai/pack/core/config"
"github.com/urfave/cli/v3"
)
var SchemaCommand = &cli.Command{
Name: "schema",
Usage: "outputs the JSON schema for the Railpack config",
EnableShellCompletion: true,
Flags: []cli.Flag{},
Action: func(ctx context.Context, cmd *cli.Command) error {
schema := config.GetJsonSchema()
schemaJson, err := json.MarshalIndent(schema, "", " ")
if err != nil {
return cli.Exit(err, ExitCodeFailure)
}
_, _ = os.Stdout.Write(schemaJson)
_, _ = os.Stdout.Write([]byte("\n"))
return nil
},
}