---
title: "file.new: New… — Vector kit command — Kition"
description: "Creates a new document and makes it active, optionally from a named preset with its own size, units, orientation, artboards, bleed and colour mode; answers the new document's index. Use file.open for an existing file."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/file.new"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/file.new](https://developer.kition.ai/docs/kits/vector/commands/file.new)

# file.new

**New….** Creates a new document and makes it active, optionally from a named preset with its own size, units, orientation, artboards, bleed and colour mode; answers the new document's index. Use file.open for an existing file.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `artboardLayout` | `object` | no | default: all in one row |
| `artboards` | `integer` | no | 1–1000 |
| `backgroundContents` | `string` | no | like transparent; one of several alternative parameters |
| `bleed` | `number \| number[] \| object` | no |  |
| `cmyk` | `any` | no | a CMYK document starts with CMYK swatches and stores the colours applied to it as CMYK; one of several alternative parameters |
| `colorMode` | `string` | no | like rgb; one of several alternative parameters |
| `created` | `number \| null` | no |  |
| `height` | `number` | no | points |
| `landscape` | `any` | no | swaps width and height to match; one of several alternative parameters |
| `name` | `string` | no |  |
| `orientation` | `string` | no | like portrait; one of several alternative parameters |
| `preset` | `string` | no |  |
| `previewMode` | `"default" \| "pixel" \| "overprint"` | no | overprint turns Overprint Preview on, pixel Pixel Preview in the app; default leaves both |
| `rasterEffectsPpi` | `72 \| 150 \| 300` | no | 1–2400 |
| `title` | `string` | no |  |
| `units` | `"Pixels" \| "Points" \| "Picas" \| "Inches" \| "Millimeters" \| "Centimeters" \| "Feet" \| "Yards" \| "Meters" \| "Feet & Inches"` | no | default: prefs unitsGeneral, as print presets; screen presets: Pixels |
| `white` | `any` | no | a white artboard background, not an object; one of several alternative parameters |
| `width` | `number` | no | points; default 612\|"210 mm" |

## Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `artboardLayout`, `artboards`, `backgroundContents`, `bleed`, `cmyk`, `colorMode`, `created`, `height`, `landscape`, `name`, `orientation`, `preset`, `previewMode`, `rasterEffectsPpi`, `title`, `units`, `white`, `width`. vector_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "artboardLayout": {
      "additionalProperties": true,
      "description": "default: all in one row",
      "properties": {
        "columns": {
          "type": "integer"
        },
        "layout": {
          "enum": [
            "gridByRow",
            "gridByColumn",
            "row",
            "column"
          ],
          "type": "string"
        },
        "rightToLeft": {
          "type": "boolean"
        },
        "spacing": {
          "default": 20,
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "artboards": {
      "description": "1–1000",
      "type": "integer"
    },
    "backgroundContents": {
      "description": "like transparent; one of several alternative parameters",
      "type": "string"
    },
    "bleed": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "cmyk": {
      "description": "a CMYK document starts with CMYK swatches and stores the colours applied to it as CMYK; one of several alternative parameters"
    },
    "colorMode": {
      "description": "like rgb; one of several alternative parameters",
      "type": "string"
    },
    "created": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "height": {
      "default": 792,
      "description": "points",
      "type": "number"
    },
    "landscape": {
      "description": "swaps width and height to match; one of several alternative parameters"
    },
    "name": {
      "type": "string"
    },
    "orientation": {
      "description": "like portrait; one of several alternative parameters",
      "type": "string"
    },
    "preset": {
      "type": "string"
    },
    "previewMode": {
      "description": "overprint turns Overprint Preview on, pixel Pixel Preview in the app; default leaves both",
      "enum": [
        "default",
        "pixel",
        "overprint"
      ],
      "type": "string"
    },
    "rasterEffectsPpi": {
      "description": "1–2400",
      "enum": [
        72,
        150,
        300
      ],
      "type": "integer"
    },
    "title": {
      "type": "string"
    },
    "units": {
      "description": "default: prefs unitsGeneral, as print presets; screen presets: Pixels",
      "enum": [
        "Pixels",
        "Points",
        "Picas",
        "Inches",
        "Millimeters",
        "Centimeters",
        "Feet",
        "Yards",
        "Meters",
        "Feet & Inches"
      ],
      "type": "string"
    },
    "white": {
      "description": "a white artboard background, not an object; one of several alternative parameters"
    },
    "width": {
      "description": "points; default 612|\"210 mm\"",
      "type": "number"
    }
  },
  "returns": "{index, previewMode}; the size is remembered in file.newPresets' Recent",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
