# Zoo (KCL) Kernel
URL: /docs/kernels/zoo

## Setup

Set the `KITTYCAD_API_TOKEN` environment variable for Zoo API access.

## Usage

1. Load/create a file ending with `.kcl` **or** set the build asset language to `zoo`.
2. The CAD machine will automatically choose the Zoo kernel and spin up the `zoo.worker`.
3. All viewer features work including mesh display, STL export, and STEP export.

## Example

```ts
send({
  type: 'initializeModel',
  code: `
const width = 10
const height = 10
const depth = 10

const cube = startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> line([width, 0], %)
  |> line([0, height], %)
  |> line([-width, 0], %)
  |> close(%)
  |> extrude(depth, %)
  `,
  parameters: {},
  kernelType: 'zoo',
});
```

## KCL Syntax

KCL uses a functional, pipe-based syntax:

```javascript
const part = startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> line([0, 10], %)
  |> line([-10, 0], %)
  |> close(%)
  |> extrude(5, %)
```
