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

@mishkat/remnawave-sdk

v1.3.0

Published

SDK for Remnawave API

Readme

Remnawave SDK

npm npm downloads


📦 Installation

Choose your preferred package manager:

bun

bun install @mishkat/remnawave-sdk

npm

npm install @mishkat/remnawave-sdk

yarn

yarn add @mishkat/remnawave-sdk

pnpm

pnpm add @mishkat/remnawave-sdk

🚀 Quick Start

import { RemnawaveSDK } from "@mishkat/remnawave-sdk";

const client = new RemnawaveSDK({
  panelUrl: 'https://remna.st', // or 'http://remnawave:3000' for docker network
  apiKey: "your-api-key",

  // For Caddy reverse proxy authentication (Optional)
  caddyAuthToken: "your-caddy-token",

  // For Cloudflare Zero Trust (Optional)
  cloudflareZeroTrustClientId: "your-cf-client-id",
  cloudflareZeroTrustClientSecret: "your-cf-client-secret",
});

📚 Usage Examples

🔐 Auth Controller

// Login
const loginResult = await client.auth.login({
  username: "[email protected]",
  password: "password123"
});

// Register
const registerResult = await client.auth.register({
  username: "newuser",
  email: "[email protected]",
  password: "password123"
});

// Get Status
const status = await client.auth.getStatus();

👥 User Controller

// Create User
const user = await client.users.create({
  username: "newuser",
  email: "[email protected]",
  // ... other fields
});

// Get All Users
const users = await client.users.getAll({ start: 0, size: 25 });

// Get User by UUID
const userByUuid = await client.users.getByUuid("user-uuid");

// Get User by Username
const userByUsername = await client.users.getByUsername("username");

// Get User by Email
const userByEmail = await client.users.getByEmail("[email protected]");

// Get User by Telegram ID
const userByTelegram = await client.users.getByTelegramId("123456789");

// Get User by Short UUID
const userByShortUuid = await client.users.getByShortUuid("short-uuid");

// Get User by Tag
const userByTag = await client.users.getByTag("premium");

// Update User
const updated = await client.users.updateByUuidOrUsername({
  uuid: "user-uuid",
  email: "[email protected]"
});

// Delete User
await client.users.delete("user-uuid");

// Enable User
await client.users.enable("user-uuid");

// Disable User
await client.users.disable("user-uuid");

// Reset User Traffic
await client.users.resetTraffic("user-uuid");

// Revoke User Subscription
await client.users.revoke("user-uuid");

// Get All Tags
const tags = await client.users.getAllExistingTags();

// Get User Accessible Nodes
const nodes = await client.users.getUserAccessibleNodes("user-uuid");

// Get Subscription Request History
const history = await client.users.getSubscriptionRequestHistory("user-uuid");

// Get User Usage by Range
const usage = await client.users.getUserUsageByRange("user-uuid", {
  startDate: "2024-01-01",
  endDate: "2024-01-31"
});

// Bulk Delete Users
await client.users.bulkDelete({
  uuids: ["uuid1", "uuid2", "uuid3"]
});

// Bulk Delete Users by Status
await client.users.bulkDeleteByStatus({
  status: "disabled"
});

// Bulk Reset Traffic
await client.users.bulkResetTraffic({
  uuids: ["uuid1", "uuid2"]
});

// Bulk Revoke Subscription
await client.users.bulkRevokeSubscription({
  uuids: ["uuid1", "uuid2"]
});

// Bulk Update Users
await client.users.bulkUpdate({
  uuids: ["uuid1", "uuid2"],
  updateData: {
    tag: "premium"
  }
});

// Bulk Update Squads
await client.users.bulkUpdateSquads({
  uuids: ["uuid1", "uuid2"],
  squadUuids: ["squad-uuid1", "squad-uuid2"]
});

// Bulk All Reset Traffic
await client.users.bulkAllResetTraffic();

// Bulk All Update
await client.users.bulkAllUpdate({
  updateData: {
    tag: "standard"
  }
});

🖥️ Nodes Controller

// Create Node
const node = await client.nodes.create({
  name: "Node 1",
  host: "node.example.com",
  port: 443
  // ... other fields
});

// Get All Nodes
const nodes = await client.nodes.getAll();

// Get One Node
const node = await client.nodes.getOne("node-uuid");

// Update Node
const updated = await client.nodes.update({
  uuid: "node-uuid",
  name: "Updated Node Name"
});

// Delete Node
await client.nodes.delete("node-uuid");

// Enable Node
await client.nodes.enable("node-uuid");

// Disable Node
await client.nodes.disable("node-uuid");

// Restart Node
await client.nodes.restart("node-uuid");

// Restart All Nodes
await client.nodes.restartAll();

// Reorder Nodes
await client.nodes.reorder({
  uuids: ["uuid1", "uuid2", "uuid3"]
});

// Reset Node Traffic
await client.nodes.resetTraffic("node-uuid");

// Get Realtime Usage
const realtimeUsage = await client.nodes.getRealtimeUsage();

// Get Usage by Range
const usage = await client.nodes.getUsageByRange({
  startDate: "2024-01-01",
  endDate: "2024-01-31"
});

// Get Node User Usage by Range
const nodeUsage = await client.nodes.getNodeUserUsageByRange("node-uuid", {
  startDate: "2024-01-01",
  endDate: "2024-01-31"
});

🌐 Hosts Controller

// Create Host
const host = await client.hosts.create({
  name: "Host 1",
  address: "host.example.com"
  // ... other fields
});

// Get All Hosts
const hosts = await client.hosts.getAll();

// Get Host by UUID
const host = await client.hosts.getByUuid("host-uuid");

// Update Host
const updated = await client.hosts.update({
  uuid: "host-uuid",
  name: "Updated Host Name"
});

// Delete Host
await client.hosts.delete("host-uuid");

// Reorder Hosts
await client.hosts.reorder({
  uuids: ["uuid1", "uuid2", "uuid3"]
});

// Get All Tags
const tags = await client.hosts.getAllTags();

// Bulk Delete Hosts
await client.hosts.deleteMany({
  uuids: ["uuid1", "uuid2", "uuid3"]
});

// Bulk Enable Hosts
await client.hosts.enableMany({
  uuids: ["uuid1", "uuid2"]
});

// Bulk Disable Hosts
await client.hosts.disableMany({
  uuids: ["uuid1", "uuid2"]
});

// Set Inbound to Many Hosts
await client.hosts.setInboundToMany({
  uuids: ["uuid1", "uuid2"],
  inboundUuid: "inbound-uuid"
});

// Set Port to Many Hosts
await client.hosts.setPortToMany({
  uuids: ["uuid1", "uuid2"],
  port: 443
});

⚙️ System Controller

// Get Stats
const stats = await client.system.getStats();

// Get Bandwidth Stats
const bandwidth = await client.system.getBandwidthStats();

// Get Nodes Metrics
const metrics = await client.system.getNodesMetrics();

// Get Nodes Statistics
const statistics = await client.system.getNodesStatistics();

// Get Remnawave Health
const health = await client.system.getRemnawaveHealth();

// Generate X25519
const keys = await client.system.generateX25519();

// Encrypt Happ Crypto Link
const encrypted = await client.system.encryptHappCryptoLink({
  data: "data-to-encrypt"
});

📋 Subscription Controller

// Get Subscription Info by Short UUID
const subscription = await client.subscription.getInfoByShortUuid("short-uuid");

📊 Subscriptions Controller

// Get All Subscriptions
const subscriptions = await client.subscriptions.getAll({
  start: 0,
  size: 25
});

// Get Subscription by UUID
const subscription = await client.subscriptions.getByUuid("subscription-uuid");

// Get Subscription by Username
const subscription = await client.subscriptions.getByUsername("username");

// Get Subscription by Short UUID Protected
const subscription = await client.subscriptions.getByShortUuidProtected("short-uuid");

👨‍👩‍👧‍👦 Internal Squads Controller

// Create Internal Squad
const squad = await client.internalSquads.create({
  name: "Premium Squad",
  // ... other fields
});

// Get All Internal Squads
const squads = await client.internalSquads.getAll();

// Get Internal Squad by UUID
const squad = await client.internalSquads.getByUuid("squad-uuid");

// Update Internal Squad
const updated = await client.internalSquads.update({
  uuid: "squad-uuid",
  name: "Updated Squad Name"
});

// Delete Internal Squad
await client.internalSquads.delete("squad-uuid");

// Get Accessible Nodes
const nodes = await client.internalSquads.getAccessibleNodes("squad-uuid");

// Add Users
await client.internalSquads.addUsers("squad-uuid");

// Delete Users
await client.internalSquads.deleteUsers("squad-uuid");

🌍 External Squads Controller

// Get All External Squads
const squads = await client.externalSquads.getAll();

// Get External Squad by UUID
const squad = await client.externalSquads.getByUuid("squad-uuid");

// Create External Squad
const squad = await client.externalSquads.create({
  name: "External Squad",
  // ... other fields
});

// Update External Squad
const updated = await client.externalSquads.update({
  uuid: "squad-uuid",
  name: "Updated Squad Name"
});

// Delete External Squad
await client.externalSquads.delete("squad-uuid");

// Add Users
await client.externalSquads.addUsers("squad-uuid");

// Remove Users
await client.externalSquads.removeUsers("squad-uuid");

⚙️ Config Profiles Controller

// Create Config Profile
const profile = await client.configProfiles.create({
  name: "Profile 1",
  // ... other fields
});

// Get All Config Profiles
const profiles = await client.configProfiles.getAll();

// Get Config Profile by UUID
const profile = await client.configProfiles.getByUuid({ uuid: "profile-uuid" });

// Update Config Profile
const updated = await client.configProfiles.update({
  uuid: "profile-uuid",
  name: "Updated Profile Name"
});

// Delete Config Profile
await client.configProfiles.delete({ uuid: "profile-uuid" });

// Get Computed Config Profile
const computed = await client.configProfiles.getComputedByProfileUuid("profile-uuid");

// Get All Inbounds
const inbounds = await client.configProfiles.getAllInbounds();

// Get Inbounds by Profile UUID
const inbounds = await client.configProfiles.getInboundsByProfileUuid({ uuid: "profile-uuid" });

🔑 Keygen Controller

// Get Public Key
const pubkey = await client.keygen.getPubkey();

📝 Snippets Controller

// Get All Snippets
const snippets = await client.snippets.getAll();

// Create Snippet
const snippet = await client.snippets.create({
  name: "My Snippet",
  content: "snippet content"
  // ... other fields
});

// Update Snippet
const updated = await client.snippets.update({
  uuid: "snippet-uuid",
  content: "updated content"
});

// Delete Snippet
await client.snippets.delete({ uuid: "snippet-uuid" });

🖥️ HWID Controller

// Create HWID Device
const device = await client.hwid.create({
  userUuid: "user-uuid",
  hwid: "device-hwid"
  // ... other fields
});

// Get All HWID Devices
const devices = await client.hwid.getAll({ start: 0, size: 25 });

// Get HWID Devices by User
const devices = await client.hwid.getByUser({ userUuid: "user-uuid" });

// Delete HWID Device
await client.hwid.delete({ uuid: "device-uuid" });

// Delete All User HWID Devices
await client.hwid.deleteAllByUser({ userUuid: "user-uuid" });

// Get HWID Stats
const stats = await client.hwid.getStats();

📄 Subscription Template Controller

// Get Subscription Template
const template = await client.subscriptionTemplate.getTemplate("template-uuid");

// Update Subscription Template
const updated = await client.subscriptionTemplate.updateTemplate({
  uuid: "template-uuid",
  // ... fields to update
});

⚙️ Subscription Settings Controller

// Get Subscription Settings
const settings = await client.subscriptionSettings.getSettings();

// Update Subscription Settings
const updated = await client.subscriptionSettings.updateSettings({
  // ... fields to update
});

📜 Subscription Request History Controller

// Get Subscription Request History
const history = await client.subscriptionRequestHistory.getHistory({
  start: 0,
  size: 25
});

// Get Subscription Request History Stats
const stats = await client.subscriptionRequestHistory.getStats();

💰 Infra Billing Controller

// Create Infra Provider
const provider = await client.infraBilling.createProvider({
  name: "Provider 1",
  // ... other fields
});

// Get All Infra Providers
const providers = await client.infraBilling.getProviders();

// Get Infra Provider by UUID
const provider = await client.infraBilling.getProviderByUuid({ uuid: "provider-uuid" });

// Update Infra Provider
const updated = await client.infraBilling.updateProvider({
  uuid: "provider-uuid",
  name: "Updated Provider Name"
});

// Delete Infra Provider
await client.infraBilling.deleteProvider({ uuid: "provider-uuid" });

// Create Billing Node
const node = await client.infraBilling.createBillingNode({
  name: "Billing Node 1",
  providerUuid: "provider-uuid"
  // ... other fields
});

// Get All Billing Nodes
const nodes = await client.infraBilling.getBillingNodes();

// Update Billing Node
const updated = await client.infraBilling.updateBillingNode({
  uuid: "node-uuid",
  name: "Updated Node Name"
});

// Delete Billing Node
await client.infraBilling.deleteBillingNode({ uuid: "node-uuid" });

// Create Bill Record
const record = await client.infraBilling.createBillRecord({
  nodeUuid: "node-uuid",
  amount: 100.50,
  date: "2024-01-01"
  // ... other fields
});

// Get Bill Records
const records = await client.infraBilling.getBillRecords({
  start: 0,
  size: 25
});

// Delete Bill Record
await client.infraBilling.deleteBillRecord({ uuid: "record-uuid" });

🔧 Error Handling

try {
  const user = await client.users.getByUuid("user-uuid");
  console.log(user);
} catch (error) {
  if (error instanceof Error) {
    console.error("API Error:", error.message);
  }
}

🔗 Links


👨‍💻 Author

Mishkat - GitHub