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

sandboxie-js

v1.0.2

Published

Sandboxie CLI client

Downloads

16

Readme

sandboxie-js

Sandboxie CLI client for automated sandbox management. Internally it works with Sandboxie.ini and Start.exe.

You can check out the official documentation here:

TypeDoc documentation is available on wiki.

Requirements

Running Sandboxie in the system. Allowed installed or portable versions of Plus and Classic.

Install

Using npm:

npm install sandboxie-js

Using yarn:

yarn add sandboxie-js

Usage

import Sandboxie from 'sandboxie-js'

// Sandboxie constructor accepts optional SandboxieOptions object
// Default values are shown below
const sandboxie = new Sandboxie({
  delay: 2000,
  classic: false,
  portable: false,
  clientPath: this.classic ? 'C:/Program Files/Sandboxie-Plus' : 'C:/Program Files/Sandboxie-Plus',
  configPath: this.portable ? `${this.clientPath}/Sandboxie.ini` : 'C:/Windows/Sandboxie.ini'
})

const name = 'TestBox'
const names = Array.from(new Array(5), (item, i) => `TestBox${i + 1}`)
const program = ['/hide_window', 'C:/Windows/System32/notepad.exe']
const settings = `
Enabled=y
BlockNetworkFiles=y
RecoverFolder=%{374DE290-123F-4565-9164-39C4925E467B}%
RecoverFolder=%Personal%
RecoverFolder=%Desktop%
BorderColor=#00FFFF,ttl
Template=OpenBluetooth
Template=SkipHook
Template=FileCopy
Template=qWave
Template=BlockPorts
Template=LingerPrograms
Template=AutoRecoverIgnore
ConfigLevel=9
`

// Create sandbox(es)
await sandboxie.create(name, settings)
await sandboxie.createMany(names.map((name) => ({ name, settings })))

// List of sandboxes
const sandboxes = await sandboxie.sandboxes()
console.log(sandboxes)

// Run the program(s) in the sandbox(es)
await sandboxie.start(name, program)
await sandboxie.startMany(names.map((name) => ({ name, program })))

// List of pids
const pids = await sandboxie.pids(name)
console.log(pids)

// Stop the program(s) in the sandbox(es)
await sandboxie.stop(name)
await sandboxie.stopAll()

// Delete sandbox(es)
await sandboxie.remove(name)
await sandboxie.removeAll()

// Manual reload of Sandboxie.ini
// Automatically called inside create(Many) and remove(All)
await sandboxie.reload()

Caveats

Race condition

For some reason, executing the remove(All) and stop(All) methods without delay causes Sandboxie errors and crashes, so inside these methods setTimeout is used with delay: 2000 by default.

You can remove the delay by setting the delay: 0 property, or increase it when errors occur.

This is most likely due to the fact that Start.exe passes the request to the SbieSvc.exe service and returns control not waiting for his work to finish.

Parallelization

Do not execute the create(Many) and remove(All) methods in parallel using Promise.all(). They work with Sandboxie.ini and this can lead to an error in writing to the EBUSY file at the same time.