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

@contextsdk/cli

v0.4.0

Published

CLI for portable encrypted context state

Readme

@contextsdk/cli

Command-line tool for contextSDK: portable encrypted context state for agent sandboxes and VMs.

npm install -g @contextsdk/cli
export CONTEXTSDK_PASSPHRASE="choose-a-strong-passphrase"
contextsdk doctor

No cloud bucket required. With no S3 configured, contexts live encrypted in a local store at ~/.contextsdk/storage. Set CONTEXTSDK_STORAGE_DIR to pick another directory, or storage.type: "fs" plus directory in contextsdk.config.ts. When an S3 bucket is configured (env or config), S3 wins and is used for multi-machine sharing.

Run a context-backed session:

export E2B_API_KEY="..."
contextsdk run my-agent \
  --runtime e2b \
  --create-if-missing \
  --checkpoint-interval 5m \
  -- sh -lc 'echo ok > /workspace/result.txt'

run prints the wrapped command's own stdout and stderr and exits with its exit code. Pass --json for the machine-readable envelope ({ ok, result }). The passthrough is a breaking change from 0.2.0, which always printed JSON.

Pass --recover to survive a sandbox dying mid-run: the CLI re-provisions a fresh sandbox, restores the latest committed state (including the newest checkpoint), and re-runs the wrapped command. It needs a provisioner-backed runtime (e2b/vercel/modal without an explicit --sandbox-id/sandbox name).

Prerequisites

  • Node.js >= 20. The packages are ESM-only (import; no require).
  • A POSIX host: macOS, Linux, or WSL. The CLI shells out to tar, zstd, and python3.
  • e2fsprogs (mkfs.ext4, e2fsck) only for the optional --format ext4 contexts. The default tree format never needs it. macOS: brew install e2fsprogs.

Credentials

Encryption is always required: set CONTEXTSDK_PASSPHRASE, or CONTEXTSDK_KEY_HEX for a raw 32-byte key in hex.

Per-provider credentials are read from the environment, never from argv:

| Runtime | Credentials | | --- | --- | | E2B | E2B_API_KEY | | Vercel | VERCEL_TOKEN + VERCEL_TEAM_ID + VERCEL_PROJECT_ID, or VERCEL_OIDC_TOKEN | | Modal | ~/.modal.toml (from modal token new), or MODAL_TOKEN_ID + MODAL_TOKEN_SECRET | | SSH | --ssh-host / --ssh-user / --ssh-key; the remote needs bash, tar, zstd, python3 |

S3-compatible storage (optional, for multi-machine use) reads CONTEXTSDK_S3_BUCKET, CONTEXTSDK_S3_REGION, CONTEXTSDK_S3_ENDPOINT, CONTEXTSDK_S3_ACCESS_KEY_ID, and CONTEXTSDK_S3_SECRET_ACCESS_KEY.

doctor

contextsdk doctor

doctor reports the resolved storage backend (fs with its directory, or s3 with the bucket), which credentials it can see (encryption, E2B, Vercel, Modal — including ~/.modal.toml), and the local tools it found (tar, zstd, python3, and ext4 tooling marked as needed only for --format ext4). It never prints secret values.

Common commands

contextsdk init my-agent                    # create an encrypted context in storage
contextsdk status my-agent                  # manifest + lock state
contextsdk verify my-agent                  # stored objects exist and are encrypted
contextsdk probe --runtime e2b              # check runtime capabilities

Move the same context across providers:

contextsdk run my-agent --runtime e2b --create-if-missing -- sh -lc 'echo hi > /workspace/state.txt'
contextsdk run my-agent --runtime vercel --vercel-runtime node24 -- sh -lc 'cat /workspace/state.txt'
contextsdk run my-agent --runtime modal -- sh -lc 'cat /workspace/state.txt'

Vercel's default runtime image is python3.13. For Node work pass --vercel-runtime node24.

The CLI bundles the E2B, Vercel, and Modal adapters for trials. For SDK usage, install @contextsdk/core and the adapter package you need.

Full docs: https://github.com/robzilla1738/ContextSDK