mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Add `lux config lint` command to validate luxd configuration files - Reports unknown keys with typo suggestions - Reports deprecated keys with replacement hints - Validates value types (bool, int, duration, slices, etc.) - Uses authoritative spec from github.com/luxfi/sdk/configspec - Update tests to be more flexible with expected values Also includes: - network start command enhancements - ux output improvements - hd_keys fix
35 lines
747 B
Go
35 lines
747 B
Go
// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package configcmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/luxfi/cli/pkg/application"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var app *application.Lux
|
|
|
|
func NewCmd(injectedApp *application.Lux) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "config",
|
|
Short: "Modify configuration for Lux CLI",
|
|
Long: `Customize configuration for Lux CLI`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
err := cmd.Help()
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
},
|
|
}
|
|
app = injectedApp
|
|
// set user metrics collection preferences cmd
|
|
cmd.AddCommand(newMetricsCmd())
|
|
// validate luxd configuration files
|
|
cmd.AddCommand(newLintCmd())
|
|
|
|
return cmd
|
|
}
|