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

@computesdk/arker

v0.1.3

Published

Arker provider for ComputeSDK - sandboxed VMs with persistent filesystems, forked from golden images

Downloads

1,507

Readme

@computesdk/arker

Arker provider for ComputeSDK — run code in Arker sandboxed VMs with persistent per-VM filesystems.

Installation

npm install @computesdk/arker

Setup

  1. Get your Arker API key (starts with ark_) from arker.ai.
  2. Set the environment variable:
export ARKER_API_KEY=ark_live_your_api_key_here

By default the provider targets the aws-us-east-1 region. Select another region with region / ARKER_REGION.

Quick Start

Configure compute with the Arker provider and create a sandbox:

import { compute } from 'computesdk';
import { arker } from '@computesdk/arker';

compute.setConfig({
  provider: arker({ apiKey: process.env.ARKER_API_KEY }),
});

const sandbox = await compute.sandbox.create();

const result = await sandbox.runCommand('node -v');
console.log(result.stdout); // v18.x

await sandbox.destroy();

Or call the provider factory directly when you only need one provider:

import { arker } from '@computesdk/arker';

const sdk = arker({ apiKey: process.env.ARKER_API_KEY });
const sandbox = await sdk.sandbox.create();

How sandboxes are created

Arker disables direct VM creation — every sandbox is forked from a source VM. create() forks the ubuntu-small golden (Node.js + Python preinstalled) by default. The source can be chosen two ways:

  • By name — a golden/template, via source in config or templateId in create options.
  • By id — a specific existing VM, via snapshotId in create options. The sandboxId returned by create() is itself a valid source, so this branches a sandbox from its current state (Arker's equivalent of a snapshot restore). If both are given, snapshotId wins.
// Default: forks the `ubuntu-small` golden
const sandbox = await sdk.sandbox.create();

// Pick a golden globally for this provider
const heavy = arker({ apiKey, source: 'ubuntu-full' });

// ...or per sandbox, by name
const other = await sdk.sandbox.create({ templateId: 'ubuntu-full' });

// Fork an existing sandbox by id — branches from its current state
const forked = await sdk.sandbox.create({ snapshotId: sandbox.sandboxId });

Configuration

Environment Variables

export ARKER_API_KEY=ark_live_your_api_key_here
export ARKER_REGION=aws-us-east-1     # optional, this is the default
export ARKER_SOURCE=ubuntu-small      # optional default golden

Configuration Options

interface ArkerConfig {
  /** Arker API key (starts with `ark_`). Falls back to ARKER_API_KEY. */
  apiKey?: string;
  /** Region, e.g. `aws-us-east-1`. Falls back to ARKER_REGION, then the us-east-1 default. */
  region?: string;
  /** Golden source VM to fork on create(). Falls back to ARKER_SOURCE, then `ubuntu-small`. */
  source?: string;
}

API Reference

Command Execution

// Shell command
const result = await sandbox.runCommand('echo hello');

// Run a script via heredoc
const result = await sandbox.runCommand(`python3 - <<'PY'
print("Hello from Python")
PY`);

// With environment and working directory
const result = await sandbox.runCommand('npm test', {
  cwd: '/app',
  env: { CI: '1' },
});

runCommand returns { stdout, stderr, exitCode, durationMs }.

Filesystem Operations

Filesystem operations run as shell commands in the VM and work over arbitrary paths.

await sandbox.filesystem.writeFile('/tmp/hello.txt', 'hi');
const content = await sandbox.filesystem.readFile('/tmp/hello.txt');
await sandbox.filesystem.mkdir('/tmp/data');
const entries = await sandbox.filesystem.readdir('/tmp');
const exists = await sandbox.filesystem.exists('/tmp/hello.txt');
await sandbox.filesystem.remove('/tmp/hello.txt');

Sandbox Management

const sandbox = await sdk.sandbox.create();
const info = await sandbox.getInfo();      // { id, provider, status, createdAt, ... }
const all = await sdk.sandbox.list();      // VMs visible to the API key
const existing = await sdk.sandbox.getById(sandbox.sandboxId);
await sandbox.destroy();

Features

  • Command Execution — full shell, Node.js & Python preinstalled (ubuntu-small)
  • Filesystem Operations — persistent per-VM filesystem (read/write/list/mkdir/exists/remove)
  • Fast cold start — forking the default golden boots a sandbox in well under a second
  • Automatic retries — the underlying @arker-ai/sdk retries transient failures (HTTP 429/502/503/504 and transient backend errors)

Limitations

  • Creation is fork-only — direct VM creation is disabled; create() forks a golden by name (templateId/source) or an existing VM by id (snapshotId). There's no separate snapshot store, but any sandboxId can be re-forked as a snapshotId.
  • getUrl is not supported — Arker does not expose per-port URLs; getUrl throws. VMs forked with network reachability enabled get a stable per-VM hostname — see the Arker SDK fork network options.
  • getInfo status — always reports running; idle sandboxes resume automatically on their next command.

Support

License

MIT