# Zoo (KCL) URL: /docs/kernels/zoo import { Building, Rocket } from 'lucide-react'; ## 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, %) ```
```tsx // highlight a line
Hello World
// [!code highlight] // highlight a word // [!code word:Fumadocs]
Fumadocs
// diff styles console.log('hewwo'); // [!code --] console.log('hello'); // [!code ++] // focus return new ResizeObserver(() => {}) ``` Hello World ```js title="My Title" icon={} console.log('Hello World'); ``` Tab 1 Tab 2 ```ts console.log('A'); ``` ```ts console.log('B'); ``` ```ts twoslash lineNumbers const a = 'Hello World'; // ^? console.log(a); ``` Tab 1 Tab 2 ```ts console.log('A'); ``` ```ts console.log('B'); ``` ```js lineNumbers=4 function main() { console.log('starts from 4'); return 0; } ```