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

@argmaxinc/local-server

v0.0.5

Published

Library for managing Argmax Local Server on macOS

Readme

@argmax/local-server

Node.js wrapper for managing Argmax Local Server on macOS

Overview

A Node.js wrapper for the Argmax Local Server binary that provides:

  • Process management - Start, stop, and monitor the server
  • REST API client - Interface with server endpoints
  • WebSocket transcription - Real-time speech-to-text
  • CLI tool - Command-line interface for server management

Installation

npm install @argmax/local-server

Getting the Argmax Local Server Binary

Get the Argmax Local Server binary from Argmax.
For support, contact [email protected].

Development CLI Wrapper

For development purposes, this package includes a create-dev-cli.sh script that creates a signed CLI wrapper. This is useful when you need to run the Argmax Local Server binary through a wrapper for development or testing.

Creating the Development CLI

# Create a signed dev_cli binary (requires macOS with Xcode command line tools)
./node_modules/@argmaxinc/local-server/dist/create-dev-cli.sh <TEAM_ID>

This will create a dev_cli binary that can be used as a launch wrapper:

# Use the dev_cli as a launch wrapper
npx @argmax/local-server start --launch-wrapper ./dev_cli --binary /path/to/argmax-local-server

Note: This script is intended for development use only and requires:

  • macOS with Xcode command line tools installed
  • Valid Apple Developer code signing certificate
  • Team ID for code signing

Quick Start

Basic Usage

import { ArgmaxLocalServer } from '@argmax/local-server';

const server = new ArgmaxLocalServer({
  binaryPath: '/path/to/argmax-local-server',
  apiKey: 'your-api-key'
});

// Start the server
await server.startProcess();

// Initialize with a model
await server.init({ 
  apiKey: 'your-api-key',
  model: 'tiny.en' 
});

// Wait for ready
await server.waitForReady();

// Get status
const status = await server.status();
console.log('Server status:', status);

// Clean shutdown
await server.shutdown();
await server.stopProcess();

Real-time Transcription

// Create transcriber
const transcriber = server.createTranscriber({ source: 'microphone' });

// Set up event listeners
transcriber.on('transcription', (result) => {
  if (result.isFinal) {
    console.log(`[FINAL] ${result.transcript}`);
  } else {
    console.log(`[INTERIM] ${result.transcript}`);
  }
});

// Connect and start transcribing
await transcriber.connect({
  keywords: ['Argmax', 'AI', 'transcription'],
});

CLI Usage

# Start server
npx @argmax/local-server start --binary /path/to/argmax-local-server

# Start with launch wrapper for development
npx @argmax/local-server start --launch-wrapper /path/to/wrapper --binary /path/to/argmax-local-server

# Check status
npx @argmax/local-server status

# Initialize with model
npx @argmax/local-server init --api-key your-key --model tiny.en

# Real-time transcription
npx @argmax/local-server transcribe --api-key your-key

API Reference

ArgmaxLocalServer

Main class for server management.

constructor(config: ArgmaxLocalServerConfig)

Methods:

  • startProcess() - Start the server process
  • stopProcess() - Stop the server process
  • status() - Get server status
  • init(config) - Initialize server with model
  • waitForReady(timeout?) - Wait for server to be ready
  • reset() - Reset server state
  • shutdown() - Shutdown server
  • createTranscriber(options?) - Create WebSocket transcriber

Configuration

interface ArgmaxLocalServerConfig {
  binaryPath: string;           // Path to argmax-local-server binary
  launchWrapper?: string | string[]; // Optional wrapper command/script to launch the binary
  host?: string;                // Server host (default: localhost)
  port?: number;                // Server port (default: 50060)  
  apiKey?: string;              // Argmax API key (ax_your_key from https://app.argmaxinc.com/)
  autoRestart?: boolean;        // Auto-restart on failure (default: true)
  verbose?: boolean;            // Enable verbose logging
  args?: string[];              // Additional CLI arguments
}

Environment Variables

ARGMAX_SERVER_PATH=/path/to/argmax-local-server
ARGMAX_API_KEY=your-api-key

Deepgram SDK Integration

You can use the Deepgram SDK to connect to your local Argmax server instead of Deepgram's cloud service:

const { createClient, LiveTranscriptionEvents } = require("@deepgram/sdk");

// Instead of connecting to Deepgram cloud:
// const deepgram = createClient(process.env.DEEPGRAM_API_KEY);

// Connect to local Argmax server:
// Note: Use your Argmax API key (ax_...) instead of Deepgram API key
const deepgram = createClient(process.env.ARGMAX_API_KEY, {
  global: {
    websocket: {
      options: {
        url: "ws://localhost:50060"
      }
    }
  }
});

// Use the same Deepgram SDK API as usual
const connection = deepgram.listen.live({
  model: "any model here", // ignored
  language: "en",
  smart_format: true, // not supported
  interim_results: true,
  encoding: 'linear16',
  channels: 1,
  sampleRate: 48000
});

connection.on(LiveTranscriptionEvents.Open, () => {
  console.log("Connection opened.");
});

connection.on(LiveTranscriptionEvents.Transcript, (data) => {
  console.log(data.channel.alternatives[0].transcript);
});

This allows you to keep your existing Deepgram SDK code while routing requests to your local Argmax server.

Note: For testing purposes, you can start the server with --any-token to allow any token value.

Testing

# Install dependencies
npm install

# Run tests
npm test

# Run with real server binary
ARGMAX_SERVER_PATH=/path/to/binary npm test

License

MIT

Support

For questions and support, contact [email protected].