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

@sequentialos/sequential-machine

v1.0.0

Published

Persistent compute through content-addressable filesystem layers - Sequential ecosystem machine runner

Readme

sequential-machine

Persistent compute through content-addressable filesystem layers - Sequential ecosystem machine runner.

Run commands, capture filesystem changes as immutable layers. Same instruction from same state = instant cache hit.

Install

npm install @sequential/sequential-machine

CLI

# Run and capture
sequential-machine run "npm install"
sequential-machine run "npm run build"

# Check status
sequential-machine status        # uncommitted workdir changes
sequential-machine history       # layer history
sequential-machine head          # current layer hash

# Navigate
sequential-machine checkout abc123    # by short hash
sequential-machine checkout v1        # by tag
sequential-machine diff abc123 def456 # compare layers

# Tags
sequential-machine tag v1             # tag current head
sequential-machine tag release abc123 # tag specific layer
sequential-machine tags               # list tags

# Inspect
sequential-machine inspect v1         # layer details

# Manage
sequential-machine rebuild            # reconstruct workdir from layers
sequential-machine reset              # clear all state

# Run without capture
sequential-machine exec "cat file.txt"

API

const { StateKit, StateKitVFS, SequentialMachineAdapter } = require('@sequential/sequential-machine');

const kit = new StateKit({
  stateDir: '.statekit',
  workdir: '.statekit/work'
});

// Run and capture
const r = await kit.run('echo "hello" > hello.txt');
// { hash: 'abc...', short: 'abc123def456', cached: false }

// Cache hit when same instruction from same parent
await kit.checkout(r.hash);
const cached = await kit.run('echo "hello" > hello.txt');
// { hash: 'abc...', short: 'abc123def456', cached: true }

// Batch
await kit.batch(['npm install', 'npm build', 'npm test']);

// Status - uncommitted changes
const s = await kit.status();
// { added: [], modified: [], deleted: [], clean: true }

// Diff between layers
const d = await kit.diff('abc123', 'def456');
// { added: ['new.txt'], modified: ['changed.txt'], deleted: [] }

// Tags
kit.tag('v1');
kit.tag('release', 'abc123');
kit.tags(); // { v1: 'abc...', release: 'abc...' }

// Navigate
await kit.checkout('v1');     // by tag
await kit.checkout('abc123'); // by short hash

// Inspect
kit.inspect('v1');
// { hash, short, instruction, parent, time, size }

// History
kit.history();
// [{ hash, short, instruction, parent, parentShort, time }, ...]

// Run without capture
await kit.exec('cat file.txt');

// Manage
await kit.rebuild();  // reconstruct workdir
await kit.reset();    // clear everything

How It Works

  1. Run - execute command in workdir
  2. Diff - compare to previous state
  3. Store - save diff as content-addressed tar
  4. Index - record layer with sha256(instruction + parent)
  5. Cache - on match, restore from stored tar

Each layer stores only what changed. Layers are immutable. Same instruction from same parent always hits cache.

Refs

Commands accept refs in multiple formats:

  • Full hash: abc123def456... (64 chars)
  • Short hash: abc123def456 (12+ chars)
  • Tag name: v1, release

Sequential Machine Adapter

For integration with the Sequential ecosystem as an alternative to xstate:

const { SequentialMachineAdapter } = require('@sequential/sequential-machine');

// Initialize adapter
const machine = new SequentialMachineAdapter({
  stateDir: '.sequential-machine',
  workdir: '.sequential-machine/work'
});

// Initialize machine state
await machine.initialize();

// Execute commands with state capture
const result = await machine.execute('npm install');
// { success: true, layer: 'abc...', short: 'abc123', cached: false, instruction: 'npm install' }

// Get current state
const state = machine.getCurrentState();
// { layer: 'abc...', short: 'abc123' }

// Restore to previous layer
await machine.restore('abc123');

// Batch execution
const results = await machine.batch(['npm install', 'npm run build', 'npm test']);

// Checkpoints
await machine.checkpoint('before-deployment');
const checkpoints = machine.listCheckpoints();
await machine.restoreCheckpoint('before-deployment');

// VFS integration for OS.js
const vfs = machine.getVFSAdapter();
await vfs.readdir('sequential-machine:/');

Environment

  • SEQUENTIAL_MACHINE_DIR - state directory (default: .sequential-machine)
  • SEQUENTIAL_MACHINE_WORK - working directory (default: .sequential-machine/work)

License

Apache-2.0