A JavaScript and TypeScript runtime in Rust and V8.
One binary: amber. Built for agent tools, not as a Node.js clone.
Website · Docs · Current scope · Releases · Issues
amber runs .js / .ts / .tsx on V8. TypeScript is stripped by oxc — there is no project-wide tsc step.
Use it when you want one binary that can:
- run scripts and a REPL
- run Jest-style tests
- host agent tools behind a capability sandbox (
--sandbox,--seed,--freeze-time) - speak MCP / JSON-RPC over stdio
- do in-process tensors via
amber:ai(no Python sidecar)
It is not a drop-in Node.js replacement. APIs land incrementally and are scored in tests/conformance/ (55/55 on Node.js Conformance 5.0). Closest cousins: Deno (V8 + Rust, permissioned) and Bun (all-in-one CLI). Amber keeps V8, adds an agent/MCP host, and labels every command Stable / Preview / Experimental.
The only user-facing capability map is Current Scope. Historical docs/STAGE_* numbers are not current facts.
Prebuilt archives: macOS (arm64, x64), Linux gnu (x64, arm64), Windows (x64 zip).
# macOS / Linux
curl -fsSL https://get.amberjs.com/install.sh | sh
# pin a release
curl -fsSL https://get.amberjs.com/install.sh | AMBER_VERSION=v1.16.0 shWindows (PowerShell):
irm https://get.amberjs.com/install.ps1 | iexHomebrew (formula in this repo; SHA256 is rewritten on each GitHub Release):
brew install zh30/tap/amberamber --version
amber eval "1 + 1"Needs Rust (1.97.1, pinned) and a C++ toolchain for V8.
git clone https://github.com/zh30/amberjs.git
cd amberjs
cargo build --release
./target/release/amber --version// hello.ts
const runtime = "Amber";
console.log(`hello from ${runtime}`);amber run hello.ts
# hello from Amber
amber eval "console.log(crypto.randomUUID())"
amber replThrown stacks map back to .ts lines when a source map is present. There is still no tsc --noEmit in the runtime; use that in CI if you want typechecking.
Jest-style tests (Stable since v1.15.0):
// math.test.js
describe("math", () => {
test("adds numbers", () => {
expect(2 + 3).toBe(5);
});
});amber test
amber test examples/testing/math.test.js
amber test --watchamber test --parallel is rejected (exit code 2): V8 isolates are not shared across threads.
WinterCG-style HTTP (Preview):
// app.js
module.exports = {
fetch() {
return new Response("ok");
},
};amber serve app.js --host 127.0.0.1 --port 3000Default-deny I/O for tool processes, deterministic clocks/PRNG, stdio MCP.
amber run --sandbox --permission-policy examples/agent/echo.policy.json \
--export-tools examples/agent/echo_tool.ts
amber session --sandbox --permission-policy examples/agent/echo.policy.json \
examples/agent/echo_tool.ts
amber mcp --inspect examples/agent/echo_tool.ts| Flag | Purpose |
|---|---|
--sandbox |
Deny fs / net / env / run, then overlay --allow-* |
--permission-policy <file> |
JSON policy (alias --policy) |
--audit-log <path> |
JSONL of allow/deny decisions |
--seed <u64> |
Deterministic Math.random / crypto.getRandomValues |
--freeze-time <spec> |
Freeze Date.now / performance.now |
--inspect / --inspect-brk |
CDP on 127.0.0.1:9229 |
Stable builtins — no native addon, no Python process:
import { Tensor, LLM, AgentPipeline } from "amber:ai";
const a = Tensor.from([1, 2, 3, 4], [2, 2]);
const b = Tensor.from([5, 6, 7, 8], [2, 2]);
const c = Tensor.matmul(a, b);LLM (load, generate, generateStream, embed) and AgentPipeline are in the manual. Cargo feature = "ai" is empty and is not a product LLM.
Stable — everyday commands:
amber run <file> [args...] Run JS (TS/TSX via oxc)
amber eval <code> Evaluate an expression
amber test [files...] [--watch]
amber repl
amber snapshot [build|status|clean]
amber session <tool> JSON-RPC over stdin
amber mcp [tool] MCP stdio server
amber --version | amber version
Preview — present, contract still tightening:
amber serve [--https --cert --key]
amber bundle <entry> [-o dist/bundle.js] [--minify]
amber compile <file> [-o myapp]
amber run --inspect / --inspect-brk
TypeScript / TSX execution
Experimental — do not treat as product promises: amber debug, amber init / create / add / remove / install / prune / x / upgrade, N-API hello process.dlopen, fmt / lint / task / bench / profile / deploy.
Full flags: CLI usage guide.
| Amber 1.16.0 | Node.js | Bun | Deno | |
|---|---|---|---|---|
| Engine | V8 + Rust | V8 + C++ | JavaScriptCore + Zig | V8 + Rust |
| TypeScript | oxc, transpile-only | loaders / tsc |
built-in | built-in |
| Secure defaults | opt-in --sandbox |
none | none | permission flags |
| Node API | incremental Preview | native | drop-in goal | compat layer |
| Package manager | Experimental | npm | bun |
deno / JSR |
| Test runner | built-in amber test |
external | bun test |
deno test |
| Native AI | amber:ai |
— | — | — |
Node modules that exist today include fs, path, os, url, buffer, events, stream, crypto, http, http2, net, child_process (execSync / spawnSync), zlib, util, worker_threads. Web: fetch, Streams, Web Crypto, URL, Worker. Coverage is per-API, not “Node compatible.” WinterTC baseline: DOMException, URLPattern, ReadableStream.from, amber:sockets, import.meta.main.
On Apple M2 Max (2026-09-16), suite 2.0 URL / fetch / ReadableStream beat Node.js; Express on Amber was ~68k req/s vs Node ~19k. Numbers live in benchmarks/ with command, hardware, and a correctness check. This README does not reprint them as product SLAs.
- VS Code: extensions/vscode —
amber lsp+ inspector attach. Install the local.vsix; Marketplace is not shipped. - Zed: extensions/zed — Install as a Dev Extension;
ambermust be onPATH.
amber lsp
amber run --inspect-brk app.ts| Current Scope | Stable / Preview / Experimental / Historical |
| Quick start | Source-first smoke commands |
| CLI guide | Flags and examples |
| v1.16.0 notes | Wasm 2.0, bundle/compile, RSI |
| Examples | Scripts and tests |
| Website | Manual and blog |
cargo test --lib
cargo test --test wintertc_compliance_tests -- --test-threads=1
cargo clippy --all-targets -- -D warnings
cargo fmt --all -- --checkSee AGENTS.md for module boundaries (src/main.rs is the amber entry; do not treat every directory under src/ as a public API).
