npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@robodk/robodk

v1.0.0

Published

Official RoboDK API for TypeScript and JavaScript - Control robots, create programs, and automate manufacturing

Readme

@robodk/robodk

Official RoboDK API for TypeScript and JavaScript. Control robots, create programs, and automate manufacturing workflows.

Requirements

  • Node.js 18+
  • RoboDK installed (free educational license available)

Installation

npm install @robodk/robodk

Quick Start

import { Robolink, ITEM_TYPE_ROBOT } from '@robodk/robodk';

async function main() {
  // Connect to RoboDK (launches automatically if not running)
  const rdk = new Robolink();
  await rdk.Connect();

  // Get the first robot in the station
  const robot = await rdk.Item('', ITEM_TYPE_ROBOT);
  console.log('Robot:', await robot.Name());

  // Get current joint positions
  const joints = await robot.Joints();
  console.log('Joints:', joints);

  // Move robot (joint movement)
  await robot.MoveJ([0, -90, 90, 0, 90, 0]);

  // Get current pose (position + orientation)
  const pose = await robot.Pose();
  console.log('Position:', pose.Pos());

  rdk.Disconnect();
}

main();

Features

  • Full API parity with the Python RoboDK API
  • TypeScript-first with complete type definitions
  • Zero dependencies - uses Node.js built-in modules
  • Auto-launch RoboDK if not running
  • Async/await for all I/O operations

API Overview

Robolink Class

Main interface to RoboDK. Manages connection and station-level operations.

const rdk = new Robolink();
await rdk.Connect();

// Find items
const robot = await rdk.Item('UR10', ITEM_TYPE_ROBOT);
const frame = await rdk.Item('Base Frame', ITEM_TYPE_FRAME);
const items = await rdk.ItemList(ITEM_TYPE_ROBOT);

// Create items
const newFrame = await rdk.AddFrame('My Frame');
const newTarget = await rdk.AddTarget('Target 1', frame, robot);

// Station operations
await rdk.Render();
await rdk.Save('station.rdk');

Item Class

Represents any item in the RoboDK station tree (robot, frame, tool, target, etc.).

// Robot operations
await robot.MoveJ(target);        // Joint movement
await robot.MoveL(target);        // Linear movement
await robot.MoveC(via, target);   // Circular movement

const joints = await robot.Joints();
await robot.setJoints([0, -90, 90, 0, 90, 0]);

const pose = await robot.Pose();
await robot.setPose(newPose);

// Frame/tool operations
await frame.setPoseAbs(pose);
const children = await frame.Childs();

// Item properties
const name = await item.Name();
await item.setName('New Name');
const visible = await item.Visible();
await item.setVisible(false);

Mat Class

4x4 transformation matrix for poses (position + orientation).

import { Mat } from '@robodk/robodk';

// Identity matrix
const m = new Mat();

// From position
const pose = Mat.transl(100, 200, 300);

// Get/set position
const [x, y, z] = pose.Pos();
pose.setPos([150, 250, 350]);

// Matrix operations
const combined = pose1.multiply(pose2);
const inverse = pose.inv();

Constants

Common constants are exported for convenience:

import {
  // Item types
  ITEM_TYPE_ROBOT,
  ITEM_TYPE_FRAME,
  ITEM_TYPE_TOOL,
  ITEM_TYPE_TARGET,
  ITEM_TYPE_PROGRAM,

  // Run modes
  RUNMODE_SIMULATE,
  RUNMODE_MAKE_ROBOTPROG,
  RUNMODE_RUN_ROBOT,

  // Move types
  MOVE_TYPE_JOINT,
  MOVE_TYPE_LINEAR,
  MOVE_TYPE_CIRCULAR,
} from '@robodk/robodk';

Connection Options

// Default: localhost:20500, auto-launch RoboDK
const rdk = new Robolink();

// Custom IP/port (connect to remote RoboDK)
const rdk = new Robolink('192.168.1.100', 20500);

// Custom RoboDK path
const rdk = new Robolink('localhost', 20500, [], 'D:\\RoboDK\\bin\\RoboDK.exe');

Documentation

License

Apache-2.0