This is a Proof-of-Concept for a browser-based Git environment using ZenFS, isomorphic-git, and xterm.js.
- IndexedDB-backed FileSystem: Files persist across reloads.
- Git Operations:
clone,status,diff,files. - Terminal Interface: Basic shell commands (
ls,cd,cat,pwd,help). - File Editing: Simple modal editor.
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
-
Clone a repo:
git clone https://github.com/isomorphic-git/isomorphic-git
(Note: Large repos might take time. Use small repos for testing.)
-
List files:
ls cd isomorphic-git ls -
Check status:
git status
-
Edit a file:
edit README.md
Make changes and save.
-
Check diff:
git diff README.md
- FileSystem:
@zenfs/corewith@zenfs/dom(IndexedDB). - Git:
isomorphic-gitusing the ZenFS instance. - Terminal:
xterm.jsrendered in a React component. - Shell: Custom command parser in
lib/shell.ts. - Framework: Next.js (App Router).
- The filesystem is mounted at
/. - The default working directory is
/repo. - CORS proxy is used for GitHub cloning (
https://cors.isomorphic-git.org).