How adnanpal/remote-git works
Remote-Git lets a user pair a phone/web UI with a laptop agent, choose configured workspace repositories, inspect Git status, history and diffs, then commit selected files and push using the laptop’s Git credentials. The UI coordinates relay connections; the relay routes messages, while Git execution and workspace discovery remain local. The map preserves authentication and device/workspace selection as supporting capabilities. Source excerpts establish the main agent dispatch and UI orchestration; relay internals are only partly sampled, so its routing link is documented by the README.
Main entry points: src/index.ts Agent Runtime · App.tsx App Workflow · src/index.ts WebSocket Relay · relay.ts Relay Client
Components 25
Phone and Web UI
- App Workflow
apps/mobile/src/App.tsx - Account Auth
apps/mobile/src/components/auth/Login.tsx - QR Pairing Scan
apps/mobile/src/components/QRScanner.tsx - Workspace List
apps/mobile/src/components/Workspacelist.tsx - Repository List
apps/mobile/src/components/Repositorylist.tsx - Repository Dashboard
apps/mobile/src/components/Repositorydashboard.tsx - Status View
apps/mobile/src/components/GitStatus.tsx - Relay Client
apps/mobile/src/services/relay.ts
Relay Transport
- WebSocket Relay
apps/relay/src/index.ts - Connection Registry
apps/relay/src/connections.ts
Local Agent
- Agent Runtime
apps/agent/src/index.ts - Pairing Credentials
apps/agent/src/pairing/token.ts - Machine Metadata
apps/agent/src/machine/machine-info.ts - Workspace Config
apps/agent/src/workspace/config.ts
Local Git Operations
- Repository Discovery
apps/agent/src/git/repositories.ts - Git Status
apps/agent/src/git/status.ts - Git Diff
apps/agent/src/git/diff.ts - Commit History
apps/agent/src/git/log.ts - Commit Changes
apps/agent/src/git/commit.ts - Push Changes
apps/agent/src/git/push.ts
Other components
- Phone User
- Supabase Auth
- Message Protocol
packages/protocol/src/messages.ts - Local Git Repositories
- GitHub Remote
Connections 35
- Phone User → App Workflow: uses
apps/mobile/src/App.tsx - App Workflow → Account Auth: shows
apps/mobile/src/App.tsx - Account Auth → Supabase Auth: authenticates
apps/mobile/src/components/auth/Login.tsx - App Workflow → QR Pairing Scan: starts scanning
apps/mobile/src/App.tsx - App Workflow → Relay Client: connects through
apps/mobile/src/App.tsx - App Workflow → Workspace List: renders
apps/mobile/src/App.tsx - App Workflow → Repository List: renders
apps/mobile/src/App.tsx - App Workflow → Repository Dashboard: renders
apps/mobile/src/App.tsx - Repository Dashboard → Status View: renders
apps/mobile/src/components/Repositorydashboard.tsx - Relay Client → Message Protocol: encodes messages
apps/mobile/src/services/relay.ts - Relay Client → WebSocket Relay: sends WebSocket messages
README.md - WebSocket Relay → Connection Registry: tracks peers
apps/relay/src/index.ts - WebSocket Relay → Agent Runtime: routes messages
README.md - Agent Runtime → Pairing Credentials: loads token
apps/agent/src/index.ts - Agent Runtime → Machine Metadata: reads metadata
apps/agent/src/index.ts - Agent Runtime → Workspace Config: loads workspaces
apps/agent/src/index.ts - Agent Runtime → QR Pairing Scan: provides pairing QR
- Agent Runtime → Message Protocol: uses messages
apps/agent/src/index.ts - Agent Runtime → WebSocket Relay: connects to
apps/agent/src/index.ts - WebSocket Relay → Relay Client: forwards messages
README.md - Agent Runtime → Repository Discovery: dispatches discovery
- Agent Runtime → Workspace Config: dispatches workspace list
apps/agent/src/index.ts - Agent Runtime → Git Status: dispatches status
- Agent Runtime → Commit History: dispatches history
- Agent Runtime → Git Diff: dispatches diff
- Agent Runtime → Commit Changes: dispatches commit
- Agent Runtime → Push Changes: dispatches push
- Repository Discovery → Workspace Config: reads configured roots
apps/agent/src/git/repositories.ts - Git Status → Local Git Repositories: reads status
- Commit History → Local Git Repositories: reads commits
- Git Diff → Local Git Repositories: reads changes
- Commit Changes → Local Git Repositories: stages and commits
- Push Changes → Local Git Repositories: pushes repository
- Push Changes → GitHub Remote: pushes via Git
README.md - Repository Dashboard → Relay Client: requests Git actions