Expand CLI coverage for agent/skill/runtime APIs that previously had no CLI wrappers despite having fully implemented backend endpoints. Agent commands (was: only list): - agent get/create/update/archive/restore/tasks - agent skills list/set - agent list --include-archived Skill commands (new, was: 0% coverage): - skill list/get/create/update/delete/import - skill files list/upsert/delete Runtime commands (new, was: 0% coverage): - runtime list/usage/activity/ping/update - ping and update support --wait for polling
48 lines
1.2 KiB
Go
48 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
version = "dev"
|
|
commit = "unknown"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "multica",
|
|
Short: "Multica CLI — local agent runtime and management tool",
|
|
Long: "multica manages local agent runtimes and provides control commands for the Multica platform.",
|
|
SilenceUsage: true,
|
|
SilenceErrors: true,
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.PersistentFlags().String("server-url", "", "Multica server URL (env: MULTICA_SERVER_URL)")
|
|
rootCmd.PersistentFlags().String("workspace-id", "", "Workspace ID (env: MULTICA_WORKSPACE_ID)")
|
|
rootCmd.PersistentFlags().String("profile", "", "Configuration profile name (e.g. dev) — isolates config, daemon state, and workspaces")
|
|
|
|
rootCmd.AddCommand(loginCmd)
|
|
rootCmd.AddCommand(authCmd)
|
|
rootCmd.AddCommand(daemonCmd)
|
|
rootCmd.AddCommand(agentCmd)
|
|
rootCmd.AddCommand(workspaceCmd)
|
|
rootCmd.AddCommand(configCmd)
|
|
rootCmd.AddCommand(issueCmd)
|
|
rootCmd.AddCommand(attachmentCmd)
|
|
rootCmd.AddCommand(repoCmd)
|
|
rootCmd.AddCommand(versionCmd)
|
|
rootCmd.AddCommand(updateCmd)
|
|
rootCmd.AddCommand(skillCmd)
|
|
rootCmd.AddCommand(runtimeCmd)
|
|
}
|
|
|
|
func main() {
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Fprintln(os.Stderr, "Error:", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|