Docs / Pure JS Runtime

Pure JS Runtime

Execute pure JavaScript scripts, Node.js 22 tools, and pure JS CLI utilities locally on Android using Casshper's embedded Node.js 22 environment.

Embedded Node.js 22 Engine for Local Scripting

Casshper embeds a native Node.js 22 (v22.x) binary directly inside the terminal environment, enabling local script execution, command-line utilities, and automation tools without requiring external server dependencies.

Pure JavaScript Scope

The Core Terminal runtime supports pure JavaScript scripts built on standard ECMAScript features and Node.js core modules (e.g., fs, path, crypto, http, events). Native C/C++ binary addons (e.g., .node compiled modules requiring node-gyp) are not supported in the standalone core environment.

Executing Local JavaScript Files

You can run local .js scripts directly from the command line:

# Direct invocation via embedded node binary
$ node build-script.js

# Executable script invocation
$ chmod +x deploy.js
$ ./deploy.js
Workflow Guide: Running Pi.dev AI Agent

Want to run terminal AI coding agents locally on device? Check out our dedicated guide for Running Pi.dev AI Agent using Casshper's Pure JS Runtime.

Core Tip: Continuous Automation

Combine the Pure JS Runtime with Casshper's background session persistence to run long-running local JS automation tasks, web watchers, or dev utility servers continuously while switching apps.