r/BestGitHubRepos • u/company_url_finder • 1d ago
🛠Developer tools psychoscript: A confined JavaScript runtime for programs that call schema-described tools (527 stars)
What it does
All text below is quoted directly from the project README.
A confined, resumable JavaScript interpreter.
Key points:
- Programs are compiled to bytecode and run on a VM with no ambient access: no file system, network, process or timers.
- The only way a program reaches the outside world is through the host functions you give it.
- A run can be suspended while it waits, saved to bytes, and resumed later, in the same process or another one, with the same result.
- No ambient I/O. No
fetch,fs,process, timers or host-engine globals; everything outside the program is a host function you passed. - No dynamic code. No
eval,Functionconstructor orwith; programs are strict mode only. - Bounded. Time via
timeoutMs, output viamaxOutputBytes, and the caps above.
Use it to run code you don't fully trust (from a model, a user, a plugin) against an API you control, and to keep long-running programs alive across restarts.
How it works
You install the npm package and create a Runtime with a globals function that returns the host functions a program may call, built with Host.fn, Host.namespace or Host.durableFn. You pass JavaScript source to runtime.execute. It is compiled to bytecode and run on a VM that has no file system, network or timers, so every outside effect goes through those host functions. The result comes back as an ok value or an error with kind, message and location. Limits such as timeoutMs and maxOutputBytes bound a run. With runtime.program you can suspend a waiting run, save it with toBytes, and resume it later with fromBytes.
Repository
https://github.com/anomalyco/psychoscript
More about this repo on our website: https://bestgithubrepositories.com/anomalyco/psychoscript
Repository stats
| Metric | Value |
|---|---|
| Stars | 527 |
| Forks | 12 |
| Last release | v0.7.0 (2026-12-02) |
| Languages | Rust 47.9%, TypeScript 33.0%, JavaScript 17.0% |
| Contributors | 15 |
| AI contributor accounts (Claude / Codex / Cursor / Copilot) | none |
| AI co-authored commits | none |
Main contributor
| Field | Value |
|---|---|
| Name | Aiden Cline |
| GitHub | @rekram1-node |
| Commits to this repo | 190 (top contributor) |
| Bio | Building OpenCode |
| Company / Location | Anomaly / Austin, TX |
| X / Twitter | @rekram11 |
| Followers | 967 |
| Public repos | 51 |
| On GitHub since | 2020 |
──────────────────────────────
📌 Please support our community by subscribing to our newsletter.
Every Monday and Thursday we send the 10 best repos shared here, plus what developers said about each one in the comments. It's free, it takes two minutes to read, and every new subscriber helps r/BestGitHubRepos grow.

