Vector kit command

file.inspect

Inspect Document

Answers the active document's layer tree, artboards, selection and history; depth and childLimit slice large trees. Start here before editing, and use file.node for one object.

Kit
Vector 0.1.0 (.kvector)
Changes the document
no

Parameters

Parameters of file.inspect
NameTypeRequiredDescription
childLimitintegerno
depthintegerno

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "file.inspect" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: childLimit, depth. vector_run answers the step’s result in completed[i].result.

Result

Result of file.inspect
NameTypeRequiredDescription
artboardsobject[]no
colorModestringno
currentLayernumberno
dirtybooleanno
historyany[]no
isolationanyno
layerRowsany[]no
layersobject[]no
objectsnumberno
paintobjectno
pasteRemembersLayersbooleanno
pathanyno
redoany[]no
revisionnumberno
selectionnumber[]no
selectionBoundsobjectno
selectionRotationnumberno
targetanyno
titlestringno
toolstringno
unitsstringno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "artboards": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "height": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "width": {
            "type": "number"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "colorMode": {
      "type": "string"
    },
    "currentLayer": {
      "type": "number"
    },
    "dirty": {
      "type": "boolean"
    },
    "history": {
      "type": "array"
    },
    "isolation": {},
    "layerRows": {
      "type": "array"
    },
    "layers": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "bounds": {
            "additionalProperties": true,
            "type": "object"
          },
          "children": {
            "type": "array"
          },
          "clip": {
            "type": "boolean"
          },
          "color": {
            "type": "string"
          },
          "dimImages": {},
          "id": {
            "type": "number"
          },
          "kind": {
            "type": "string"
          },
          "locked": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "preview": {
            "type": "boolean"
          },
          "printable": {
            "type": "boolean"
          },
          "template": {
            "type": "boolean"
          },
          "visible": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "objects": {
      "type": "number"
    },
    "paint": {
      "additionalProperties": true,
      "properties": {
        "appearanceItem": {},
        "fill": {
          "type": "string"
        },
        "fillActive": {
          "type": "boolean"
        },
        "stroke": {
          "type": "string"
        },
        "strokeWidth": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "pasteRemembersLayers": {
      "type": "boolean"
    },
    "path": {},
    "redo": {
      "type": "array"
    },
    "revision": {
      "type": "number"
    },
    "selection": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "selectionBounds": {
      "additionalProperties": true,
      "properties": {
        "height": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "selectionRotation": {
      "type": "number"
    },
    "target": {},
    "title": {
      "type": "string"
    },
    "tool": {
      "type": "string"
    },
    "units": {
      "type": "string"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "childLimit": {
      "type": "integer"
    },
    "depth": {
      "type": "integer"
    }
  },
  "returns": "layer tree, artboards, selection, history (a sliced tree reports childCount)",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.