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

@tny-robotics/sdk

v0.9.7

Published

Typescript SDK for TNY-Robotics robots

Readme

@tny-robotics/sdk

npm version License: MIT TypeScript

The official TypeScript/JavaScript SDK for all TNY Robotics robots

🌐 Website📦 NPM Package💬 Discord


🚀 Overview

@tny-robotics/sdk provides a clean, promise-based API to communicate with your TNY Robotics robot.

It handles all the complex binary WebSocket framing under the hood, letting you focus on building amazing apps, dashboards, or block-based programming interfaces (like TNY-Coder).

✨ Features

  • Universal (Isomorphic): Works flawlessly in Node.js (Electron, backends) and in the Browser (Nuxt, Vue, React).
  • Fully Typed: Written in TypeScript for perfect auto-completion and Developer Experience (DX).
  • Modular: Access robot features cleanly through dedicated modules (robot.system, robot.joint, robot.power, etc.).

📦 Installation

Install the package using your favorite package manager:

npm install @tny-robotics/sdk
# or
yarn add @tny-robotics/sdk
# or
pnpm add @tny-robotics/sdk

💻 Quick Start

Here is a simple example to connect to your TNY-360 and test the connection latency:

import { TNY360 } from '@tny-robotics/sdk';

async function main() {
    console.log('Creating TNY-360 instance...');
    // Replace with your robot's IP address
    const robot = new TNY360('192.168.4.1');

    try {
        console.log('Connecting to TNY-360...');
        await robot.connect();
        console.log('Connected successfully!');
    } catch (err) {
        console.error('Connection error:', err);
        return;
    }

    // Ping test
    console.log('Sending pings...');
    const start = Date.now();
    for (let i = 0; i < 10; i++) {
        await robot.system.ping();
    }
    const end = Date.now();
    
    console.log(`Average response time: ${(end - start) / 10} ms.`);
}

main();

🧩 API Structure

The SDK is organized into intuitive modules. Here are some examples of what you can do:

System & Settings

// Get robot statistics
const stats = await robot.system.getStats();
console.log(`Temperature: ${stats.temp_c}°C, CPU0 Usage: ${stats.cpu_usage.core0}%`);

// Change AutoLife mode
import { AutoLifeLevel } from '@tny-robotics/sdk';
await robot.system.setAutoLifeLevel(AutoLifeLevel.Safeguard);

Motion & Joints

// Set the front-right knee joint to 30 degrees
await robot.joint.setAngle(JointId.FrontRightKneePitch, 30 * (Math.PI / 180));

// Get the current angle of the back-left hip roll joint
const curAngle = await robot.joint.getFeedbackAngle(JointId.BackLeftHipRoll);
console.log(`Current Hip Roll Angle: ${curAngle * (180 / Math.PI)} degrees`);

Sensors & Telemetry (Coming soon)

// Subscribe to continuous Lidar distance updates
// const unsubscribe = robot.laser.distance.subscribe((dist) => {
//     console.log(`Lidar Distance: ${dist} meters`);
// });

🤝 Contributing

This SDK is part of the open-source TNY-Robotics ecosystem. Found a bug or want to add a new module? Open an Issue or submit a Pull Request!

📄 License

This SDK is licensed under the MIT License. You are free to use it in your open-source or commercial applications, just include the copyright notice.

Need help? Contact us by mail or join our Discord.