An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674
Daniel2aad10cf402e
diff --git a/kernel/cli/cmd/root.go b/kernel/cli/cmd/root.goindex 2644b3e90f..4ba504154d 100644--- a/kernel/cli/cmd/root.go+++ b/kernel/cli/cmd/root.go@@ -36,9 +36,10 @@ var ()var rootCmd = &cobra.Command{- Use: "siyuan",- Short: "SiYuan Note CLI",- Long: `A command-line interface for SiYuan.`,+ Use: "SiYuan-Kernel",+ Short: "SiYuan CLI",+ Version: util.Ver,+ Long: `A command-line interface for SiYuan.`,PersistentPreRunE: func(cmd *cobra.Command, args []string) error {// 确定工作目录if exePath, err := os.Executable(); err == nil {diff --git a/kernel/main.go b/kernel/main.goindex 8ae36a28f3..347649ba56 100644--- a/kernel/main.go+++ b/kernel/main.go@@ -28,7 +28,12 @@ import (func main() {// Auto-detect: --flag style args → kernel serve modeif len(os.Args) > 1 && strings.HasPrefix(os.Args[1], "-") {- os.Args = append([]string{os.Args[0], "serve"}, os.Args[1:]...)+ switch os.Args[1] {+ case "--help", "-h", "--version", "-v":+ // let cobra handle these+ default:+ os.Args = append([]string{os.Args[0], "serve"}, os.Args[1:]...)+ }}if err := cmd.Execute(); err != nil {os.Exit(1)