8000 GitHub - py-lama/jsbox
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

py-lama/jsbox

Repository files navigation

Bexy (formerly JSBox)

A secure JavaScript sandbox for safely executing untrusted code in isolated environments.

npm version License Node.js Version

PyLama Ecosystem Navigation

Project Description Links
Bexy JavaScript sandbox for executing code GitHub · NPM · Docs
GetLLM LLM model management and code generation GitHub · PyPI · Docs
DevLama Python code generation with Ollama GitHub · Docs
LogLama Centralized logging and environment management GitHub · PyPI · Docs
APILama API service for code generation GitHub · Docs
BEXY Sandbox for executing generated code GitHub · Docs
JSLama JavaScript code generation GitHub · NPM · Docs
SheLLama Shell command generation GitHub · PyPI · Docs
WebLama Web application generation GitHub · Docs

Author

Tom Sapletta — DevOps Engineer & Systems Architect

  • 💻 15+ years in DevOps, Software Development, and Systems Architecture
  • 🏢 Founder & CEO at Telemonit (Portigen - edge computing power solutions)
  • 🌍 Based in Germany | Open to remote collaboration
  • 📚 Passionate about edge computing, hypermodularization, and automated SDLC

GitHub LinkedIn ORCID Portfolio

Support This Project

If you find this project useful, please consider supporting it:

Installation

npm install bexy

Quick Start

Command Line Usage

# Run a JavaScript file in the sandbox
bexy run script.js

# Start an interactive REPL in the sandbox
bexy repl

# Show version
bexy --version

Programmatic Usage

const { executeInSandbox } = require('bexy');

// Execute code in a secure sandbox
const result = await executeInSandbox('1 + 1');
console.log(result); // 2

Features

  • Secure code execution in isolated environments
  • Support for both synchronous and asynchronous code
  • Configurable resource limits (CPU, memory, execution time)
  • Built-in REPL for interactive development
  • Support for CommonJS and ES modules
  • TypeScript type definitions included

Testing

To run tests for JSBox using the PyLama ecosystem:

cd ../../tests
./run_all_tests.sh
# or for a tolerant run
./run_all_tests_tolerant.sh

Or, from the jsbox directory:

make test

Project Management

Common Makefile commands:

  • make install – Install dependencies
  • make lint – Lint code
  • make test – Run tests
  • make build – Build project
  • make clean – Clean build/deps
  • make format – Format code
  • make start – Start project (if supported)

Example: Creating a Safe JavaScript Sandbox

const JSBox = require('jsbox');

const userCode = '2 + 2';
const result = JSBox.evaluate(userCode);
console.log(result); // 4

JSBox is a JavaScript sandbox for safely executing code in isolated environments. It is part of the PyLama ecosystem and integrates with LogLama as the primary service for centralized logging and environment management.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0