New:Socket for Asana Is Now Available.Learn more
Get Started

@kittycad/lib

Package Overview
Dependencies
Maintainers
7
Versions
297
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kittycad/lib

Javascript library for KittyCAD API

Source
npmnpm
Version
4.4.9
Version published
Weekly downloads
5K
-27.6%
Maintainers
7
Weekly downloads
 
Created
Source

KittyCAD JS/TS API library

Fully typed js library, compatible with js and ts.

Please see CONTRIBUTING.md for how to to publish AND AN EXPLANATION BEHIND THE DERIVATION PROCESS!

Full documentation here

Install

npm install @kittycad/lib
# or
yarn add @kittycad/lib

## set your token
export ZOO_API_TOKEN=<your token>

Basic example

import { Client, file } from '@kittycad/lib';
import fsp from 'fs/promises';

async function main() {
    const client = new Client()
    // zoo.dev/docs/api/get-cad-file-mass?lang=typescript
    const response = await file.create_file_mass({
      client,
      src_format: 'obj',
      material_density_unit: 'kg:m3',
      output_unit: 'g',
      material_density: 0.007,
      body: await fsp.readFile('./example.obj', 'base64'),
    })
    if ('error_code' in response) throw 'error'

    const { status, mass } = response
    console.log(status, mass);
}

main();

Keywords

hardware

FAQs

Package last updated on 04 Sep 2026

Related posts