08b50ee5a23b3ae7dd7b19383f14bbd520079cc1
KittyCAD JS/TS API library
Socials::
- blog • twitter • linkedin • instagram • youtube • discord
WIP, docs will be added to kittycad.io/docs soon
Install
npm install @kittycad/lib
# or
yarn add @kittycad/lib
## set your token
export KITTYCAD_TOKEN=<your token>
Basic example
import { file } from '@kittycad/lib';
import type { Models } from '@kittycad/lib';
import fsp from 'fs/promises';
async function main() {
const { status, mass } = (await file.create_file_mass({
src_format: 'obj',
material_density: '0.007',
body: await fsp.readFile('./example.obj', 'base64'),
})) as Models['FileMass_type'];
console.log(status, mass);
}
main();
Languages
TypeScript
99.3%
Go
0.2%
Nix
0.2%
JavaScript
0.2%
Shell
0.1%