Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674

Daniel1d7ba73fe338
diff --git a/kernel/cli/cmd/attr.go b/kernel/cli/cmd/attr.go
index 8082715925..e066884f3b 100644
--- a/kernel/cli/cmd/attr.go
+++ b/kernel/cli/cmd/attr.go
@@ -59,6 +59,18 @@ var attrGetCmd = &cobra.Command{
var attrSetCmd = &cobra.Command{
Use: "set --id <id> --attr name=value",
Short: "Set block attributes",
+ Long: `Set custom attributes on a block.
+
+Common attributes:
+ icon Emoji hex codepoint (e.g. "1f4ca"), custom image path (e.g. "1/b3log.png"), or dynamic icon URL.
+ DO NOT use the emoji character (e.g. "📊").
+ title-img CSS background-image format (e.g. 'background-image:url("assets/example.jpg")').
+ DO NOT use a bare asset path.
+ tags Comma-separated tag names.
+
+Examples:
+ siyuan-kernel attr set --id 20260605100657-v080a4j --attr icon=1f4ca
+ siyuan-kernel attr set --id 20260605100657-v080a4j --attr title-img='background-image:url("assets/example.jpg")'`,
RunE: func(cmd *cobra.Command, args []string) error {
id, _ := cmd.Flags().GetString("id")
if id == "" {