Shell & tools

Shell & Node

An interactive bash with pipes, background jobs and Node.js, and no install step, so it is ready in a second.

bash · ~/app
editor

The project's files open here.

Changes save as you type. Press Escape, then Tab, to leave the editor.

preview

The page the server serves shows here.

  1. boot
  2. npm install
  3. start
  4. ready

idle

betaClientVM is pre-1.0 (v0.2.0): things can break, and APIs may change between releases. Found a bug? Open an issue.

About this demo

A real interactive bash on a pseudo-terminal: line editing, history, Tab completion, Ctrl+C, and job control with Ctrl+Z, fg and bg. The Linux commands are written in TypeScript and checked against bash and the GNU tools.

Start node serve.js in the background and its page shows in the preview while the prompt stays free for curl.

How it's built

import { attachShell } from '@clientvm/terminal';

const box = await vm.createInstance({ fs: { from: projectFiles } });
await attachShell(term, box, { cwd: '/home/user/app' });