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/just-bash

v0.1.13

Published

Archil filesystem adapter for just-bash

Readme

@archildata/just-bash

Archil filesystem adapter for just-bash - run bash commands against Archil distributed filesystems.

Launch an interactive shell against your Archil disk:

ARCHIL_TOKEN=adt_xxx npx @archildata/just-bash aws-us-east-1 myaccount/mydisk

Installation

npm install @archildata/just-bash @archildata/client just-bash

Quick Start

import { ArchilClient } from '@archildata/client';
import { ArchilFs } from '@archildata/just-bash';
import { Bash } from 'just-bash';

// Connect to Archil
const client = await ArchilClient.connect({
  region: 'aws-us-east-1',
  diskName: 'myaccount/mydisk',
  authToken: 'adt_xxx', // or omit for IAM auth
});

// Create filesystem adapter
const fs = new ArchilFs(client);

// Use with just-bash
const bash = new Bash({ fs });

// Run commands
const result = await bash.exec('ls -la /');
console.log(result.stdout);

// Read files
const content = await bash.exec('cat /myfile.txt');

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

Writing Files (Delegations)

Archil uses a delegation system for write access. Before writing, you need to "checkout" the directory or file:

// Get the inode ID for a path
const inodeId = await fs.resolveInodeId('/mydir');

// Checkout to get write access
await client.checkout(inodeId);

// Now you can write
await bash.exec('echo "hello" > /mydir/newfile.txt');

// Release the delegation when done
await client.checkin(inodeId);

For shared/multi-client access, use force to revoke existing delegations:

await client.checkout(inodeId, { force: true });

With User Context

Specify a Unix user context for permission checks:

const fs = new ArchilFs(client, {
  user: { uid: 1000, gid: 1000 }
});

Interactive Shell

The package includes an interactive shell for testing:

# Positional arguments (recommended)
npx @archildata/just-bash aws-us-east-1 myaccount/mydisk

# With flags
npx @archildata/just-bash --region aws-us-east-1 --disk myaccount/mydisk

# With token (use env var to keep out of shell history)
ARCHIL_TOKEN=xxx npx @archildata/just-bash aws-us-east-1 myaccount/mydisk

# With debug logging
npx @archildata/just-bash aws-us-east-1 myaccount/mydisk --log-level debug

Shell commands:

  • Standard bash commands (ls, cat, echo, etc.)
  • archil checkout [--force] <path> - Acquire write delegation
  • archil checkin <path> - Release write delegation
  • archil help - Show archil commands

API

ArchilFs

new ArchilFs(client: ArchilClient, options?: { user?: UnixUser })

Read Operations

  • readFile(path, encoding?) - Read file as string
  • readFileBuffer(path) - Read file as Uint8Array
  • readdir(path) - List directory entries
  • stat(path) / lstat(path) - Get file stats
  • exists(path) - Check if path exists
  • readlink(path) - Read symlink target

Write Operations

  • writeFile(path, content) - Write file
  • appendFile(path, content) - Append to file
  • mkdir(path, options?) - Create directory
  • rm(path, options?) - Delete file/directory
  • cp(src, dest, options?) - Copy
  • mv(src, dest) - Move/rename
  • symlink(target, path) - Create symlink

Utilities

  • resolveInodeId(path) - Get inode ID for delegation operations

Debugging

Enable debug logging with the DEBUG environment variable:

# Enable archil:fs logging
DEBUG=archil:fs node myapp.js

# Enable all archil debug logging
DEBUG=archil:* node myapp.js

Performance

  • Chunked reads - Large files read in 4 MiB chunks
  • Native protocol - Direct Archil protocol access, no FUSE overhead

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).

License

MIT