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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@camera.ui/nats

v0.0.27

Published

camera.ui nats package

Readme

@camera.ui/nats

NATS Server binary downloader for camera.ui - downloads the official NATS Server for internal messaging and RPC communication.

Installation

npm install @camera.ui/nats

The NATS Server binary will be automatically downloaded during installation.

Usage

import { natsServerPath, isNatsServerAvailable } from '@camera.ui/nats';

// Get NATS Server binary path
const natsServer = natsServerPath();
console.log('NATS Server path:', natsServer);

// Check if NATS Server is available
if (isNatsServerAvailable()) {
  console.log('NATS Server is ready to use');
}

Official NATS Server

This package downloads the official NATS Server binary used by camera.ui for:

  • RPC Communication - Inter-service messaging between camera.ui components
  • Event Distribution - Real-time event broadcasting
  • Plugin Communication - Messaging between plugins and core
  • Clustering - Multi-instance camera.ui deployments

Platform Support

Supported Platforms:

  • Linux - x64, ARM64, ARMv6, ARMv7, x86, PowerPC64, S390X, MIPS64LE
  • Windows - x64, ARM64, ARMv6, ARMv7, x86
  • macOS - Intel (x64), Apple Silicon (ARM64)
  • FreeBSD - x64

Examples

Basic Usage

import { natsServerPath } from '@camera.ui/nats';
import { spawn } from 'child_process';

const natsServer = spawn(natsServerPath(), [
  '--config', 'nats.conf',
  '--port', '4222'
]);

Check Availability

import { isNatsServerAvailable, natsServerPath } from '@camera.ui/nats';

if (!isNatsServerAvailable()) {
  console.error('NATS Server not found');
  process.exit(1);
}

console.log('Using NATS Server at:', natsServerPath());

Integration with Camera.UI

import { natsServerPath } from '@camera.ui/nats';

// Used internally by camera.ui for RPC communication
const natsServer = spawn(natsServerPath(), [
  '--config', '/path/to/camera-ui/nats.conf',
  '--port', '4222',
  '--cluster_name', 'camera-ui'
]);

Cross-Platform Installation

# Force specific platform/architecture
npm_config_os=linux npm_config_cpu=arm64 npm install

Examples:

npm_config_os=linux npm_config_cpu=x64     # Linux x64
npm_config_os=linux npm_config_cpu=arm64   # Linux ARM64
npm_config_os=win32 npm_config_cpu=x64     # Windows x64
npm_config_os=darwin npm_config_cpu=arm64  # Apple Silicon

File Format Support

The installer automatically handles different archive formats:

  • TAR.GZ - Linux and macOS binaries
  • ZIP - Windows binaries
  • DEB - Some Linux architectures (S390X, MIPS64LE)

Installation Process

The installer automatically:

  1. Detects your platform and architecture
  2. Downloads the appropriate binary from NATS official releases
  3. Extracts from archive (TAR.GZ, ZIP, or DEB)
  4. Makes executable (Unix systems)
  5. Cleans up temporary files

Installation Log

Detected platform: linux / arm64
Downloading NATS Server v2.11.4...
Extracting nats-server-v2.11.4-linux-arm64.tar.gz...
Making executable...
Done!

NATS in Camera.UI

NATS Server provides the messaging backbone for camera.ui:

RPC Communication

  • Plugin-to-core communication
  • Service-to-service messaging
  • Request/response patterns

Event Broadcasting

  • Camera state changes
  • Motion detection events
  • System notifications

Clustering Support

  • Multi-instance deployments
  • Load balancing
  • High availability

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.

License

MIT


Part of the camera.ui ecosystem - A comprehensive camera management solution.