cli cleanup: merge login into config subcommands and remove top-level login command

This commit is contained in:
DBT
2026-02-28 02:59:15 +00:00
parent ac1ab06250
commit 3e1514c724
4 changed files with 3 additions and 7 deletions

View File

@@ -94,7 +94,6 @@ func printHelp() {
fmt.Println(" status Show clawgo status")
fmt.Println(" config Get/set config values")
fmt.Println(" cron Manage scheduled tasks")
fmt.Println(" login Configure CLIProxyAPI upstream")
fmt.Println(" channel Test and manage messaging channels")
fmt.Println(" skills Manage skills (install, list, remove)")
fmt.Println(" uninstall Uninstall clawgo components")

View File

@@ -25,6 +25,8 @@ func configCmd() {
configCheckCmd()
case "reload":
configReloadCmd()
case "login":
configLoginCmd()
default:
fmt.Printf("Unknown config command: %s\n", os.Args[2])
configHelp()

View File

@@ -9,7 +9,7 @@ import (
"clawgo/pkg/config"
)
func loginCmd() {
func configLoginCmd() {
cfg, err := loadConfig()
if err != nil {
fmt.Printf("Error loading config: %v\n", err)
@@ -38,6 +38,3 @@ func loginCmd() {
fmt.Println("✓ CLIProxyAPI configuration saved.")
}
func configureProvider(cfg *config.Config, provider string) {
// Deprecated: Migrated to CLIProxyAPI logic in loginCmd
}

View File

@@ -62,8 +62,6 @@ func main() {
configCmd()
case "cron":
cronCmd()
case "login":
loginCmd()
case "channel":
channelCmd()
case "skills":