MMagic MDGitHub
Home

Plugin Directory

每个插件都是可编排的能力单元

插件不是功能菜单,而是工作流节点。按场景自由组合,在文档里把数据获取、处理、引用与渲染串成同一条链路。

🔐

env-table

读取环境变量并以表格形式显示

SidecarRuntimeenv sidecarready

功能概述

从系统环境变量中读取指定的变量名列表,以表格形式展示变量名、值和是否已设置。支持批量查看多个环境变量,适合用于文档中展示项目运行所需的环境配置。

核心特性

  • 通过 Sidecar 后端安全读取环境变量
  • 支持按名称批量读取环境变量
  • 表格形式结构化展示
  • 支持 Inline 和 Block 两种渲染模式
  • 安全隔离,前端无法直接访问系统变量

Actions

Action标签说明
compute🔐 读取读取系统环境变量并返回结果

配置参数

字段类型必需默认说明
variablesstring[]要读取的环境变量名列表

输出结构

output schemajson schema
{
  "type": "object",
  "properties": {
    "variables": {
      "type": "array",
      "description": "Environment variables with their values",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "isSet": {
            "type": "boolean"
          }
        }
      }
    },
    "count": {
      "type": "number",
      "description": "Total count of variables"
    },
    "setCount": {
      "type": "number",
      "description": "Count of set variables"
    },
    "timestamp": {
      "type": "string",
      "description": "Read timestamp"
    }
  }
}

使用示例

查看 Node 环境变量

读取常见的 Node.js 相关环境变量

example.mdmarkdown
::define[env-check]{plugin="env-table"}
```config
{
  "variables": ["NODE_ENV", "PATH", "HOME"]
}
```
::

渲染

  • Inline:✅ 支持
  • Block:✅ 支持
environmentsystemsidecar