https://github.com/almeidx/repl
A browser-based TypeScript/JavaScript REPL powered by WebContainers.
https://github.com/almeidx/repl
npm repl runkit webcontainers
Last synced: 5 months ago
JSON representation
A browser-based TypeScript/JavaScript REPL powered by WebContainers.
- Host: GitHub
- URL: https://github.com/almeidx/repl
- Owner: almeidx
- License: mit
- Created: 2026-01-13T20:30:19.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-13T21:48:12.000Z (6 months ago)
- Last Synced: 2026-01-13T22:27:30.533Z (6 months ago)
- Topics: npm, repl, runkit, webcontainers
- Language: Svelte
- Homepage: https://repl.almeidx.dev
- Size: 48.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# repl
A browser-based TypeScript/JavaScript REPL powered by WebContainers.
## Features
- Monaco editor with TypeScript support
- In-browser Node.js execution via WebContainers
- NPM package installation with version picker
- xterm.js console with ANSI colors and clickable links
- Dark/light theme with system preference detection
- Shareable URLs (code stored in URL hash)
- Resizable panels
## Requirements
- Node.js 24+
- pnpm
## Setup
```bash
pnpm install --frozen-lockfile
```
## Development
```bash
pnpm dev
```
Open http://localhost:5173
## Scripts
| Command | Description |
|---------|-------------|
| `pnpm dev` | Start development server |
| `pnpm build` | Build for production |
| `pnpm preview` | Preview with Wrangler locally |
| `pnpm run deploy` | Build and deploy to Cloudflare |
| `pnpm check` | Run type checking |
## Keyboard Shortcuts
| Shortcut | Action |
|----------|--------|
| `Cmd/Ctrl + Enter` | Run code |
| `Cmd/Ctrl + .` | Stop execution |
| `Cmd/Ctrl + K` | Clear console |
| `Cmd/Ctrl + Shift + C` | Copy share URL |
## Deployment
Deployed to Cloudflare Workers. Requires:
1. Cloudflare account
2. `wrangler` CLI authenticated (`wrangler login`)
```bash
pnpm run deploy
```
## Architecture
- **SvelteKit** - Framework
- **Svelte 5** - UI with runes syntax
- **Monaco Editor** - Code editing (CDN)
- **xterm.js** - Terminal emulation
- **WebContainers** - Browser-based Node.js runtime
- **Cloudflare Workers** - Edge deployment
## License
[MIT](LICENSE.md)