Skip to content

urixen-org/ptero-connect

Repository files navigation

🪶 ptero-connect

npm version yarn pnpm bun bun TypeScript downloads Github Publish NPM Publish FOSSA Status

ptero-connect is a lightweight Node.js/TypeScript library for interacting with the Pterodactyl Application API.
It provides a clean, developer-friendly interface with zero dependencies and full TypeScript support.


✨ Highlights

  • 🔹 Application API support
  • 🔹 Zero dependencies
  • 🔹 Fully typed for TypeScript
  • 🔹 Lightweight & fast
  • 🔹 Easy to extend for custom endpoints

📦 Installation

npm install @urixen/ptero-connect
# or
yarn add @urixen/ptero-connect
# or
pnpm add @urixen/ptero-connect
# or
bun add @urixen/ptero-connect

🚀 Quick Start

Application API (admin key)

import { ApplicationApi } from "@urixen/ptero-connect";

// constructor(panelUrl, apiKey, customHeaders?, timeoutMs?)
const app = new ApplicationApi(
  "https://panel.example.com",
  "YOUR_APPLICATION_API_KEY"
);

const servers = await app.getAllServers();
console.log(servers);

Client API (account key)

import { ClientApi } from "@urixen/ptero-connect";

// constructor(panelUrl, clientKey, { debug?, timeout?, headers? })
const client = new ClientApi(
  "https://panel.example.com",
  "YOUR_CLIENT_API_KEY",
  { timeout: 30000 }
);

const me = await client.getUserDetails();
console.log(me);

Note: getEggById() and getNodesByLocationId() are opt-in helpers. Call smallUtility() once at startup to enable them:

import { smallUtility } from "@urixen/ptero-connect";
smallUtility();

📄 License

MIT License © 2025 Urixen and Nehxurai & Vspcoderz


FOSSA Status

💡 About

ptero-connect is part of the Urixen initiative to create high-quality, open-source tools for developers working with game server hosting and automation.

About

The only package need for Pterodactyl API

Topics

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors