MCPcopy Create free account
hub / github.com/LunaSource/Luna / createGlobalConfig

Function createGlobalConfig

config/config.go:248–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246}
247
248func createGlobalConfig() {
249 path, _ := getGlobalConfigPath()
250 if _, err := os.Stat(path); os.IsNotExist(err) {
251 cfg := GetDefaultConfig()
252 if err := SaveGlobalConfig(cfg); err != nil {
253 fmt.Printf("Error creating .lunarc: %v\n", err)
254 return
255 }
256 fmt.Println("🗸 Created .lunarc in home directory")
257 } else {
258 fmt.Println("🛈 .lunarc already exists in home directory")
259 }
260}
261
262func askForAPIKey(configType string) string {
263 fmt.Printf("→ Set API key for %s? (Enter to skip or paste)\n", configType)

Callers 1

createSelectedConfigsFunction · 0.85

Calls 3

getGlobalConfigPathFunction · 0.85
GetDefaultConfigFunction · 0.85
SaveGlobalConfigFunction · 0.85

Tested by

no test coverage detected