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

@alpha-sdk/client

v0.3.3

Published

TypeScript client for the Alpha Camera REST API — control Sony cameras via REST. Auto-generated from the OpenAPI spec via Fern.

Readme

@alpha-sdk/client

TypeScript client for the Alpha Camera REST API — control Sony cameras via REST.

Public example app:

Install

npm install @alpha-sdk/client

Usage

import { AlphaSDKClient } from "@alpha-sdk/client";

const client = new AlphaSDKClient({
  environment: "http://localhost:8080",
});

// Discover cameras
const listing = await client.cameras.list();
console.log(listing.cameras);

// Connect, shoot, disconnect
const cameraId = listing.cameras[0].id;
await client.cameras.connect({ cameraId, mode: "remote" });
await new Promise((r) => setTimeout(r, 500)); // settle (see Recipe 5)
await client.properties.setPriorityKey({ cameraId, setting: "pc-remote" });
await client.actions.afShutter({ cameraId });
await client.cameras.disconnect({ cameraId });

Resources exposed

| Accessor | What it covers | |----------|----------------| | client.server | Server status, logs, shutdown | | client.cameras | Discover, connect, disconnect | | client.properties | Read/write properties (ISO, aperture, priority key, etc.) | | client.actions | Shoot, focus near/far, zoom, movie recording | | client.liveView | Enable/start/stop live view stream | | client.sdCard | List + download SD card files | | client.settings | Save-info, LUT import, settings-file up/download |

Every REST endpoint in the OpenAPI spec has a method here.

Recipes — SSE, live view, server lifecycle, discovery

Some patterns aren't REST and are deliberately not generated into this client — they ship as copy-paste recipes on crsdk.app:

| Pattern | Recipe | |---------|--------| | Real-time events (SSE) | SSE events | | Live view frame polling | Live view polling | | Server subprocess lifecycle | Server subprocess | | Camera discovery / hot-plug | Discovery + reconnect | | Retry with backoff | Retry + backoff | | React hook | React hook |

Why recipes instead of a wrapper library? These patterns are standard JS/TS idioms (fetch streaming, setInterval, child_process.spawn). Owning the code in your app is easier to debug, easier to modify, and easier for AI coding assistants to reason about than an opaque library abstraction.

Error handling

Every non-2xx response throws a typed subclass of AlphaSDKError:

import { AlphaCameraRestApi, AlphaSDKError } from "@alpha-sdk/client";

const { BadRequestError, NotFoundError } = AlphaCameraRestApi;

try {
  await client.cameras.connect({ cameraId: "unknown", mode: "remote" });
} catch (err) {
  if (err instanceof BadRequestError) {
    console.error("400:", (err.body as any).message);
  } else if (err instanceof AlphaSDKError) {
    console.error(`${err.statusCode}: ${err.message}`);
  }
}

404 is used only on a smaller subset of endpoints (for example missing live view frames or camera-specific SD-card download targets). Connection-status and disconnect remain 200 even when nothing is currently connected.

License

MIT — see LICENSE.