perses-variable-manage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Perses Variable Management

Perses 变量管理

Create and manage variables with chains and interpolation.
创建并管理带有依赖链和插值配置的变量。

Operator Context

操作上下文

This skill operates as the lifecycle manager for Perses variables, handling creation, chaining, and interpolation configuration across scopes.
本技能作为Perses变量的生命周期管理器,处理跨范围的变量创建、依赖链配置和插值设置。

Hardcoded Behaviors (Always Apply)

硬编码行为(始终生效)

  • Chain ordering: Variables must be ordered so dependencies come first — Perses evaluates variables in array order, so a variable referencing
    $cluster
    must appear after the cluster variable
  • MCP-first: Use Perses MCP tools when available, percli as fallback
  • Interpolation format: Document which format is used and why — wrong format causes query syntax errors (e.g., regex format for Prometheus matchers, csv for multi-select labels)
  • 依赖链顺序:变量必须按依赖关系排序,依赖项在前——Perses按数组顺序评估变量,因此引用
    $cluster
    的变量必须出现在cluster变量之后
  • 优先使用MCP:优先使用Perses MCP工具,无可用时回退到percli
  • 插值格式:记录所使用的格式及其原因——错误的格式会导致查询语法错误(例如,Prometheus匹配器使用regex格式,多选择标签使用csv格式)

Default Behaviors (ON unless disabled)

默认行为(启用状态,除非手动关闭)

  • ListVariable: Default to ListVariable with PrometheusLabelValuesVariable plugin
  • Dashboard scope: Create variables at dashboard scope unless otherwise specified
  • Multi-select: Enable allowMultiple and allowAllValue by default for filter variables
  • ListVariable:默认使用带PrometheusLabelValuesVariable插件的ListVariable
  • 仪表板范围:除非另有指定,否则在仪表板范围创建变量
  • 多选择:默认启用allowMultiple和allowAllValue选项用于过滤器变量

Optional Behaviors (OFF unless enabled)

可选行为(关闭状态,除非手动启用)

  • Global/project variables: Create at global or project scope for reuse across dashboards
  • TextVariable: Use TextVariable for free-form user input fields
  • 全局/项目变量:在全局或项目范围创建变量,以便跨仪表板复用
  • TextVariable:使用TextVariable作为自由格式用户输入字段

What This Skill CAN Do

本技能可完成的操作

  • Create TextVariable and ListVariable at any scope (global, project, dashboard)
  • Set up variable chains with cascading dependencies
  • Configure interpolation formats (csv, regex, json, lucene, pipe, glob, etc.)
  • Use all 4 variable plugin types
  • 在任意范围(全局、项目、仪表板)创建TextVariable和ListVariable
  • 设置带有级联依赖的变量链
  • 配置插值格式(csv、regex、json、lucene、pipe、glob等)
  • 使用全部4种变量插件类型

What This Skill CANNOT Do

本技能不可完成的操作

  • Create custom variable plugins (use perses-plugin-create)
  • Create dashboards (use perses-dashboard-create)
  • Manage datasources (use perses-datasource-manage)

  • 创建自定义变量插件(请使用perses-plugin-create)
  • 创建仪表板(请使用perses-dashboard-create)
  • 管理数据源(请使用perses-datasource-manage)

Instructions

操作步骤

Phase 1: IDENTIFY

阶段1:识别

Goal: Determine variable type, scope, and dependencies.
Variable types:
  • TextVariable: Static text input — user types a value. Use for free-form filters like custom regex or label values not available via query.
  • ListVariable: Dynamic dropdown populated by a plugin. Use for most filter/selector use cases.
Variable plugins (for ListVariable):
Plugin KindSourceUse Case
PrometheusLabelValuesVariableLabel values queryFilter by namespace, pod, job
PrometheusPromQLVariablePromQL query resultsDynamic values from expressions
StaticListVariableHardcoded listFixed options (env, region)
DatasourceVariableAvailable datasourcesSwitch between datasource instances
Variable scopes:
ScopeResource KindUse Case
GlobalGlobalVariableShared filters across all projects and dashboards
ProjectVariable (in project)Shared filters across dashboards within a project
Dashboardvariables[] in dashboard specDashboard-specific filters
Interpolation formats (
${var:format}
):
FormatOutput ExampleUse Case
csv
a,b,c
Multi-value in most contexts
json
["a","b","c"]
JSON-compatible contexts
regex
a|b|c
Prometheus label matchers with
=~
pipe
a|b|c
Pipe-delimited lists
glob
{a,b,c}
Glob-style matching
lucene
("a" OR "b" OR "c")
Loki/Elasticsearch queries
values
a+b+c
URL query parameter encoding
singlevariablevalueSingle valueExtracts one value from multi-select
doublequote
"a","b","c"
Quoted CSV
singlequote
'a','b','c'
Single-quoted CSV
raw
a
(first only)
Single value extraction
Gate: Variable type, plugin, scope, and dependencies identified. Proceed to Phase 2.
目标:确定变量类型、范围和依赖关系。
变量类型
  • TextVariable:静态文本输入——用户手动输入值。适用于自由格式过滤器,例如自定义正则表达式或无法通过查询获取的标签值。
  • ListVariable:由插件填充的动态下拉菜单。适用于大多数过滤器/选择器场景。
变量插件(适用于ListVariable):
插件类型数据源使用场景
PrometheusLabelValuesVariable标签值查询按命名空间、Pod、Job过滤
PrometheusPromQLVariablePromQL查询结果从表达式中获取动态值
StaticListVariable硬编码列表固定选项(环境、区域)
DatasourceVariable可用数据源在数据源实例之间切换
变量范围
范围资源类型使用场景
全局GlobalVariable跨所有项目和仪表板共享过滤器
项目Variable(项目内)跨项目内的仪表板共享过滤器
仪表板dashboard spec中的variables[]仪表板专属过滤器
插值格式 (
${var:format}
):
格式输出示例使用场景
csv
a,b,c
大多数场景下的多值格式
json
["a","b","c"]
兼容JSON的场景
regex
a|b|c
Prometheus的=~匹配器
pipe
a|b|c
竖线分隔的列表
glob
{a,b,c}
Glob风格匹配
lucene
("a" OR "b" OR "c")
Loki/Elasticsearch查询
values
a+b+c
URL查询参数编码
singlevariablevalue单个值从多选择中提取单个值
doublequote
"a","b","c"
带双引号的CSV
singlequote
'a','b','c'
带单引号的CSV
raw
a
(仅第一个值)
单个值提取
准入条件:已确定变量类型、插件、范围和依赖关系。进入阶段2。

Phase 2: CREATE

阶段2:创建

Goal: Create the variable resource(s).
Single variable (global scope):
bash
percli apply -f - <<EOF
kind: GlobalVariable
metadata:
  name: namespace
spec:
  kind: ListVariable
  spec:
    name: namespace
    display:
      name: Namespace
      hidden: false
    allowAllValue: true
    allowMultiple: true
    plugin:
      kind: PrometheusLabelValuesVariable
      spec:
        labelName: namespace
        datasource:
          kind: PrometheusDatasource
          name: prometheus
EOF
Via MCP (project scope):
perses_create_project_variable(
  project="my-project",
  name="namespace",
  kind="ListVariable",
  plugin_kind="PrometheusLabelValuesVariable",
  plugin_spec={"labelName": "namespace", "datasource": {"kind": "PrometheusDatasource", "name": "prometheus"}},
  allow_multiple=true,
  allow_all_value=true
)
Variable chain (dashboard scope — cluster -> namespace -> pod):
Variables must be ordered with dependencies first. Each subsequent variable uses matchers that reference the previous variables:
yaml
variables:
  - kind: ListVariable
    spec:
      name: cluster
      display:
        name: Cluster
      allowAllValue: false
      allowMultiple: false
      plugin:
        kind: PrometheusLabelValuesVariable
        spec:
          labelName: cluster
          datasource:
            kind: PrometheusDatasource
            name: prometheus
  - kind: ListVariable
    spec:
      name: namespace
      display:
        name: Namespace
      allowAllValue: true
      allowMultiple: true
      plugin:
        kind: PrometheusLabelValuesVariable
        spec:
          labelName: namespace
          datasource:
            kind: PrometheusDatasource
            name: prometheus
          matchers:
            - "cluster=\"$cluster\""
  - kind: ListVariable
    spec:
      name: pod
      display:
        name: Pod
      allowAllValue: true
      allowMultiple: true
      plugin:
        kind: PrometheusLabelValuesVariable
        spec:
          labelName: pod
          datasource:
            kind: PrometheusDatasource
            name: prometheus
          matchers:
            - "cluster=\"$cluster\""
            - "namespace=\"$namespace\""
Gate: Variables created without errors. Proceed to Phase 3.
目标:创建变量资源。
单个变量(全局范围):
bash
percli apply -f - <<EOF
kind: GlobalVariable
metadata:
  name: namespace
spec:
  kind: ListVariable
  spec:
    name: namespace
    display:
      name: Namespace
      hidden: false
    allowAllValue: true
    allowMultiple: true
    plugin:
      kind: PrometheusLabelValuesVariable
      spec:
        labelName: namespace
        datasource:
          kind: PrometheusDatasource
          name: prometheus
EOF
通过MCP创建(项目范围):
perses_create_project_variable(
  project="my-project",
  name="namespace",
  kind="ListVariable",
  plugin_kind="PrometheusLabelValuesVariable",
  plugin_spec={"labelName": "namespace", "datasource": {"kind": "PrometheusDatasource", "name": "prometheus"}},
  allow_multiple=true,
  allow_all_value=true
)
变量链(仪表板范围 — cluster -> namespace -> pod):
变量必须按依赖关系排序,依赖项在前。后续每个变量使用引用前序变量的匹配器:
yaml
variables:
  - kind: ListVariable
    spec:
      name: cluster
      display:
        name: Cluster
      allowAllValue: false
      allowMultiple: false
      plugin:
        kind: PrometheusLabelValuesVariable
        spec:
          labelName: cluster
          datasource:
            kind: PrometheusDatasource
            name: prometheus
  - kind: ListVariable
    spec:
      name: namespace
      display:
        name: Namespace
      allowAllValue: true
      allowMultiple: true
      plugin:
        kind: PrometheusLabelValuesVariable
        spec:
          labelName: namespace
          datasource:
            kind: PrometheusDatasource
            name: prometheus
          matchers:
            - "cluster=\"$cluster\""
  - kind: ListVariable
    spec:
      name: pod
      display:
        name: Pod
      allowAllValue: true
      allowMultiple: true
      plugin:
        kind: PrometheusLabelValuesVariable
        spec:
          labelName: pod
          datasource:
            kind: PrometheusDatasource
            name: prometheus
          matchers:
            - "cluster=\"$cluster\""
            - "namespace=\"$namespace\""
准入条件:变量创建无错误。进入阶段3。

Phase 3: VERIFY

阶段3:验证

Goal: Confirm variables exist and chains resolve correctly.
bash
undefined
目标:确认变量存在且依赖链解析正确。
bash
undefined

List variables in project

列出项目中的变量

percli get variable --project <project>
percli get variable --project <project>

List global variables

列出全局变量

percli get globalvariable
percli get globalvariable

Describe specific variable

查看特定变量详情

percli describe variable <name> --project <project>

Or via MCP:
perses_list_variables(project="<project>") perses_list_global_variables()

Verify chain behavior by checking that dependent variables correctly filter when parent values change (requires UI or API query testing).

**Gate**: Variables listed and chain dependencies confirmed. Task complete.

---
percli describe variable <name> --project <project>

或通过MCP:
perses_list_variables(project="<project>") perses_list_global_variables()

通过检查父变量值变更时,依赖变量是否正确过滤来验证链行为(需要UI或API查询测试)。

**准入条件**:变量已列出且依赖链关系确认无误。任务完成。

---

Error Handling

错误处理

CauseSymptomSolution
Variable chain break: dependent variable defined before its parent in the arrayChild variable shows all values instead of filtering by parent selection; Perses evaluates variables in array order, so the parent has no value yet when the child resolvesReorder the variables array so parents appear before children — cluster before namespace before pod. Each variable can only reference variables that appear earlier in the array
Wrong interpolation format: using
${var:csv}
where
${var:regex}
is needed
Prometheus query with
=~
matcher fails with parse error or matches nothing —
label=~"a,b,c"
is not valid regex, must be
label=~"a|b|c"
Use
${var:regex}
for any Prometheus
=~
or
!~
label matchers. Reserve
${var:csv}
for contexts that accept comma-separated lists
PrometheusLabelValuesVariable returns empty dropdownVariable renders with no selectable options despite metrics existing in PrometheusCheck: (1)
labelName
matches exact Prometheus label name (case-sensitive), (2)
matchers
filters are not too restrictive or referencing nonexistent parent variables, (3) datasource name matches a configured PrometheusDatasource, (4) Prometheus is reachable from Perses server
MCP
perses_create_project_variable
fails
Error returned from MCP tool call — variable not createdCheck: (1) variable name does not already exist in the project (names must be unique per scope), (2) the target project exists (create it first with
perses_create_project
), (3) plugin kind is spelled correctly (e.g.,
PrometheusLabelValuesVariable
not
PrometheusLabelValues
)
Matcher syntax error in child variableChild variable returns empty results or Perses logs show query parse errorsMatchers must be exact PromQL label matcher syntax:
"label=\"$var\""
with escaped inner quotes. Missing escapes or wrong quote nesting breaks the matcher silently

原因症状解决方案
变量链断裂:依赖变量在数组中定义于父变量之前子变量显示所有值,而非按父变量选择过滤;Perses按数组顺序评估变量,因此父变量在子变量解析时尚无值重新排序变量数组,父变量在前,子变量在后 — cluster在前,然后是namespace,最后是pod。每个变量只能引用数组中出现在它之前的变量
插值格式错误:在需要
${var:regex}
的场景使用
${var:csv}
带有
=~
的Prometheus查询解析失败或无匹配结果 —
label=~"a,b,c"
不是有效的正则表达式,必须使用
label=~"a|b|c"
对于任何Prometheus的
=~
!~
标签匹配器,使用
${var:regex}
。保留
${var:csv}
用于接受逗号分隔列表的场景
PrometheusLabelValuesVariable返回空下拉菜单尽管Prometheus中存在指标,但变量渲染后无可选选项检查:(1)
labelName
与Prometheus标签名称完全匹配(区分大小写),(2)
matchers
过滤条件过于严格或引用了不存在的父变量,(3) 数据源名称与已配置的PrometheusDatasource匹配,(4) Perses服务器可访问Prometheus
MCP
perses_create_project_variable
执行失败
MCP工具调用返回错误 — 变量未创建检查:(1) 变量名称在项目中已存在(每个范围的名称必须唯一),(2) 目标项目已存在(先使用
perses_create_project
创建),(3) 插件类型拼写正确(例如
PrometheusLabelValuesVariable
而非
PrometheusLabelValues
子变量中的匹配器语法错误子变量返回空结果或Perses日志显示查询解析错误匹配器必须符合PromQL标签匹配器的精确语法:
"label=\"$var\""
,内部引号需转义。缺少转义或引号嵌套错误会导致匹配器静默失效

Anti-Patterns

反模式

Anti-PatternWhy It FailsCorrect Approach
Wrong dependency order in variable array (child before parent)Perses evaluates variables top-to-bottom. A child variable referencing
$cluster
that appears before the cluster variable will resolve
$cluster
as empty, returning unfiltered results
Always order variables by dependency chain: root variables first, then each level of dependents in order
Using
${var}
or
${var:csv}
for Prometheus
=~
label matchers
=~
expects a regex pattern. CSV format
a,b,c
is not valid regex and either causes a parse error or silently matches nothing
Use
${var:regex}
which produces
a|b|c
— valid regex alternation for Prometheus matchers
Setting
allowMultiple: true
without configuring the appropriate interpolation format in consuming queries
The variable will return multiple values, but the query uses bare
$var
which only substitutes the first value, silently dropping the rest
When
allowMultiple
is true, always use an explicit interpolation format in queries:
${var:regex}
for Prometheus,
${var:csv}
for APIs,
${var:lucene}
for LogQL
Creating GlobalVariable for project-specific filtersGlobal variables apply to all projects and dashboards, polluting the variable namespace and confusing users who see irrelevant filtersUse project-scoped variables (kind: Variable with project reference) for filters specific to a team or service. Reserve GlobalVariable for truly universal filters like environment or region
Duplicating variables across dashboards instead of using project/global scopeChanges must be made in every dashboard individually; variable definitions drift over timePromote shared variables to project or global scope and reference them consistently across dashboards
Hardcoding datasource name without checking available datasourcesVariable queries fail silently when the datasource name does not match any configured datasourceList available datasources first (
percli get datasource --project <project>
or
perses_list_datasources
) and use the exact name

反模式失败原因正确做法
变量数组中的依赖顺序错误(子变量在前,父变量在后)Perses从上到下评估变量。出现在cluster变量之前且引用
$cluster
的子变量会将
$cluster
解析为空值,返回未过滤的结果
始终按依赖链顺序排列变量:根变量在前,然后依次是每一级依赖变量
在Prometheus
=~
标签匹配器中使用
$var
${var:csv}
=~
期望正则表达式格式。CSV格式
a,b,c
不是有效的正则表达式,会导致解析错误或无匹配结果
使用
${var:regex}
,它会生成
a|b|c
— 这是Prometheus匹配器的有效正则表达式交替格式
设置
allowMultiple: true
但未在消费查询中配置合适的插值格式
变量会返回多个值,但查询使用裸
$var
只会替换第一个值,其余值被静默丢弃
allowMultiple
设为true时,查询中始终显式指定插值格式:Prometheus使用
${var:regex}
,API使用
${var:csv}
,LogQL使用
${var:lucene}
为项目专属过滤器创建GlobalVariable全局变量适用于所有项目和仪表板,会污染变量命名空间,让用户看到无关过滤器而产生困惑针对团队或服务专属的过滤器,使用项目范围变量(kind: Variable,带项目引用)。仅将GlobalVariable用于真正通用的过滤器,例如环境或区域
跨仪表板重复创建变量,而非使用项目/全局范围变更需在每个仪表板中单独进行;变量定义会随时间产生差异将共享变量升级到项目或全局范围,并在所有仪表板中一致引用
未检查可用数据源就硬编码数据源名称当数据源名称与已配置的数据源不匹配时,变量查询会静默失败先列出可用数据源(
percli get datasource --project <project>
perses_list_datasources
),然后使用精确的名称

Anti-Rationalization

反合理化(错误的自我说服)

These are shortcuts that seem reasonable but cause real failures:
RationalizationWhy It's WrongRequired Action
"The variable order doesn't matter, they all resolve eventually"Perses evaluates variables strictly in array order, not by dependency graph. A child variable that appears before its parent will resolve against an empty parent value on first loadMap the full dependency chain and verify array order matches
"I'll just use
$var
without a format — Perses will figure it out"
Bare
$var
uses the default format which may not match the query context. For Prometheus
=~
matchers this silently produces wrong results
Always specify the interpolation format explicitly when the variable is multi-select
"The variable works in the UI so the interpolation must be correct"It may work with a single selection but break with multiple selections. The default interpolation for single values happens to work, masking the missing format specificationTest with multiple values selected to verify the interpolation format produces valid query syntax
"I'll create the variable and fix the chain order later"Variables that appear to work in isolation will return wrong results when chaining is broken, and the bug is subtle — dashboards show data, just unfiltered dataGet the dependency order right before creating any variables

这些看似合理的捷径会导致实际故障:
错误的自我说服错误原因必要操作
“变量顺序无关紧要,最终都会解析”Perses严格按数组顺序评估变量,而非依赖图。出现在父变量之前的子变量在首次加载时会解析为空父值映射完整的依赖链并确认数组顺序与依赖链一致
“我直接使用
$var
即可,Perses会自动处理”
$var
使用默认格式,可能与查询上下文不匹配。对于Prometheus
=~
匹配器,这会静默产生错误结果
当变量为多选择时,始终显式指定插值格式
“变量在UI中可用,说明插值配置正确”单选择时可能正常工作,但多选择时会失效。单值的默认插值恰好能工作,掩盖了格式缺失的问题选择多个值进行测试,验证插值格式生成的查询语法有效
“我先创建变量,之后再修复依赖顺序”单独使用时看似正常的变量,在依赖链断裂时会返回错误结果,且bug非常隐蔽 — 仪表板显示数据,但数据未过滤在创建任何变量之前,先确保依赖顺序正确

FORBIDDEN Patterns

禁止模式

These patterns MUST NOT appear in any variable configuration produced by this skill:
  • NEVER define a child variable before its parent in the variables array — this silently breaks filtering
  • NEVER use
    ${var:csv}
    in a Prometheus
    =~
    or
    !~
    matcher — use
    ${var:regex}
    instead
  • NEVER hardcode label values in a ListVariable when the values come from Prometheus — use PrometheusLabelValuesVariable or PrometheusPromQLVariable instead
  • NEVER create a variable with
    allowMultiple: true
    without verifying that all consuming queries use an appropriate multi-value interpolation format
  • NEVER omit the
    datasource
    field in a Prometheus variable plugin — Perses will not infer it and the variable will fail to resolve

本技能生成的任何变量配置中严禁出现以下模式:
  • 绝对禁止在变量数组中将子变量定义于父变量之前 — 这会静默破坏过滤功能
  • 绝对禁止在Prometheus
    =~
    !~
    匹配器中使用
    ${var:csv}
    — 请改用
    ${var:regex}
  • 绝对禁止当值来自Prometheus时,在ListVariable中硬编码标签值 — 请改用PrometheusLabelValuesVariable或PrometheusPromQLVariable
  • 绝对禁止创建
    allowMultiple: true
    的变量时,未验证所有消费查询使用了合适的多值插值格式
  • 绝对禁止在Prometheus变量插件中省略
    datasource
    字段 — Perses不会自动推断,变量将无法解析

Blocker Criteria

阻塞条件

Do NOT proceed past each phase gate if any of these conditions exist:
Phase 1 Blockers:
  • Variable dependency chain is circular (A -> B -> A) — restructure the chain
  • Requested label does not exist in the target Prometheus — verify with
    curl -s http://<prometheus>/api/v1/labels
  • No datasource of the required type is configured in the target project or globally
Phase 2 Blockers:
  • percli apply
    or MCP tool returns an error — fix before proceeding
  • Variable name conflicts with an existing variable at the same scope
  • Matchers reference a parent variable that does not exist or is misspelled
Phase 3 Blockers:
  • Variable list command does not show the created variable — creation failed silently
  • Variable chain produces unfiltered results when parent is selected — dependency order or matcher syntax is wrong
  • Variable dropdown is empty — plugin configuration, datasource, or label name is incorrect

若存在以下任一情况,请勿进入下一阶段:
阶段1阻塞条件
  • 变量依赖链存在循环(A -> B -> A) — 重构依赖链
  • 请求的标签在目标Prometheus中不存在 — 使用
    curl -s http://<prometheus>/api/v1/labels
    验证
  • 目标项目或全局未配置所需类型的数据源
阶段2阻塞条件
  • percli apply
    或MCP工具返回错误 — 修复后再继续
  • 变量名称与同一范围的现有变量冲突
  • 匹配器引用了不存在或拼写错误的父变量
阶段3阻塞条件
  • 变量列表命令未显示已创建的变量 — 创建已静默失败
  • 选择父变量时,变量链返回未过滤的结果 — 依赖顺序或匹配器语法错误
  • 变量下拉菜单为空 — 插件配置、数据源或标签名称不正确

References

参考资料

ResourceURLUse For
Perses Variable Documentationhttps://perses.dev/docs/user-guides/variables/Variable types, scopes, and configuration
Perses Variable Spec (Go types)https://github.com/perses/perses/tree/main/pkg/model/api/v1/variableAuthoritative field definitions for variable specs
Perses Plugin Listhttps://github.com/perses/pluginsAvailable variable plugins and their spec schemas
Perses MCP Serverhttps://github.com/perses/perses-mcp-serverMCP tool reference for variable CRUD operations
Interpolation Formats Sourcehttps://github.com/perses/perses/tree/main/internal/api/variableImplementation of all interpolation format handlers
percli CLI Referencehttps://perses.dev/docs/user-guides/percli/CLI commands for variable management
资源URL用途
Perses 变量文档https://perses.dev/docs/user-guides/variables/变量类型、范围和配置
Perses 变量规范(Go类型)https://github.com/perses/perses/tree/main/pkg/model/api/v1/variable变量规范的权威字段定义
Perses 插件列表https://github.com/perses/plugins可用的变量插件及其规范 schema
Perses MCP 服务器https://github.com/perses/perses-mcp-server变量CRUD操作的MCP工具参考
插值格式源码https://github.com/perses/perses/tree/main/internal/api/variable所有插值格式处理器的实现
percli CLI 参考https://perses.dev/docs/user-guides/percli/变量管理的CLI命令