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

@archildata/client

v0.1.13

Published

High-performance Node.js client for Archil distributed filesystem

Readme

@archildata/client

High-performance Node.js bindings for the Archil distributed filesystem client.

Overview

This package provides low-level N-API bindings to the Archil client library, exposing the ArchilService trait methods directly to JavaScript/TypeScript. It's designed for use cases where you need direct protocol access without FUSE overhead.

Installation

npm install @archildata/client

Supported Platforms

This package includes pre-built binaries for:

  • macOS (Apple Silicon) - darwin-arm64
  • Linux (x86_64) - linux-x64-gnu
  • Linux (ARM64) - linux-arm64-gnu

Other platforms are not currently supported.

Note: For best performance, run your application in the same region as your Archil disk (e.g., if your disk is in aws-us-east-1, deploy your app to AWS us-east-1).

Usage

import { ArchilClient } from '@archildata/client';

// Connect to Archil
const client = await ArchilClient.connect({
  region: 'aws-us-east-1',
  diskName: 'myaccount/mydisk',
  authToken: process.env.ARCHIL_TOKEN, // optional, uses IAM if not provided
});

// Get root directory attributes
const rootAttrs = await client.getAttributes(1);
console.log('Root size:', rootAttrs.size);

// List directory contents
const entries = await client.readDirectory(1);
for (const entry of entries) {
  console.log(`${entry.name} (inode: ${entry.inodeId})`);
}

// Read a file
const lookup = await client.lookupInode(1, 'myfile.txt');
const data = await client.readInode(lookup.inodeId, 0, 1024);
console.log('File content:', data.toString());

// Close when done
await client.close();

API

ArchilClient

The main client class for interacting with Archil filesystems.

Connection Methods

  • connect(config) - Connect using region and disk name (recommended)
  • connectDirect(config) - Connect directly to a server (for testing)

Metadata Operations

  • getAttributes(inodeId, options?) - Get inode attributes
  • lookupInode(parentInodeId, name, options?) - Lookup entry by name
  • readDirectory(inodeId, options?) - List directory entries
  • getExtendedAttribute(inodeId, name, options?) - Get xattr value
  • listExtendedAttributes(inodeId, options?) - List xattr names

Data Operations

  • readInode(inodeId, offset, length, options?) - Read file data
  • writeData(inodeId, offset, data, options?) - Write file data (requires delegation)
  • sync() - Sync all pending writes to server

Delegation Operations

  • checkout(inodeId, options?) - Acquire write delegation
  • checkin(inodeId, options?) - Release delegation
  • checkinAll() - Release all delegations
  • listDelegations() - List currently held delegations

Mutation Operations

  • create(parentInodeId, name, attributes, options?) - Create file/directory
  • unlink(parentInodeId, name, options?) - Delete file or empty directory
  • rename(parentInodeId, name, newParentInodeId, newName, options?) - Move/rename
  • setattr(inodeId, attributes, options) - Update file attributes (user required in options)
  • setImmutable(inodeId) - Mark subtree as immutable
  • setMutable(inodeId) - Mark subtree as mutable
  • listImmutableSubtrees() - List immutable roots

Types

interface SimpleConnectionConfig {
  region: string;      // e.g., "aws-us-east-1"
  diskName: string;    // e.g., "myaccount/mydisk"
  authToken?: string;  // optional, uses IAM if not provided
  logLevel?: string;   // optional: "trace", "debug", "info", "warn", "error"
}

interface UnixUser {
  uid: number;
  gid: number;
}

interface InodeAttributes {
  inodeId: number;
  inodeType: 'File' | 'Directory' | 'Symlink' | ...;
  size: number;
  uid: number;
  gid: number;
  mode: number;
  nlink: number;
  ctimeMs: number;
  atimeMs: number;
  mtimeMs: number;
  btimeMs: number;
  rdev?: number;
  symlinkTarget?: string;
}

interface DirectoryEntry {
  name: string;
  inodeId: number;
  inodeType: string;
}

interface OperationOptions {
  user?: UnixUser;    // Unix user context for permission checks
}

interface CheckoutOptions {
  force?: boolean;    // Force revoke existing delegations (default: false)
  user?: UnixUser;    // Unix user context for permission checks
}

interface SetAttrAttributes {
  mode?: number;
  uid?: number;
  gid?: number;
  size?: number;
  atimeMs?: number;   // use -1 for current time
  mtimeMs?: number;   // use -1 for current time
}

Building

This package uses napi-rs for native bindings. To build from source:

cd rust-libs/archil-node
npm install
npm run build

License

Proprietary - Archil Inc.