Experimental
A terminal-first cloud workstation with a SvelteKit frontend and a Cloudflare Worker + Containers backend.
Cloudshell gives each user one shared workstation filesystem and lets them open isolated runtime sessions on top of it.
The core model is:
user workstation= one shared filesystem per usersession= one isolated runtime containertab= one independent shell inside the active session
- SvelteKit app for auth, routing, and UI
- Better Auth backed by D1
- Cloudflare Worker backend for session orchestration
- Cloudflare Containers for isolated runtime sessions
- Shared per-user workstation files across sessions
- Per-tab shell state inside each session
- Left-side files drawer wired to the same filesystem the terminal sees
- Ports and tools workspace for forwarding, sharing, SSH keys, and backups
- npm-bundled terminal stack with no CDN dependency
src/ SvelteKit app
worker/ Cloudflare Worker + container runtime
shared/ Shared helpers used by app and worker
migrations/ Better Auth / D1 migrations
old/ Archived pre-rebuild app for reference
alchemy.run.ts Dev + deploy orchestration
- Create a local env file.
cp .env.example .env- Fill in the required values:
ALCHEMY_PASSWORDBETTER_AUTH_SECRET
Optional:
BETTER_AUTH_URLBETTER_AUTH_TRUSTED_ORIGINSTERMINAL_TICKET_SECRETAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYR2_ACCOUNT_IDCLOUDFLARE_ACCOUNT_ID
- Start the app.
bun install
bun run devDefault local URLs:
- app:
http://localhost:5173 - worker:
http://localhost:1338
bun run dev
bun run build
bun run check
bun run test
bun run deploy
bun run destroyDatabase helpers:
bun run db:generate
bun run db:migrate
bun run db:local
bun run db:remote- Better Auth uses D1 for user and auth records.
- Runtime metadata stays in KV/R2, not D1.
- Terminal access uses app-origin websocket routing in production and a signed direct-worker ticket in local dev.
@xterm/xtermand@xterm/addon-fitare bundled from npm. There is no CDN-loaded terminal dependency.
Before shipping changes:
bun run check
bun run test
bun run buildFor worker container tests:
cd worker/container && go test ./...