How pandyapreet/gitcontext works
Git Context is a local Tauri desktop app for managing multiple Git identities and SSH keys. The main workflow is: create a provider profile, select it for a repository or as the global identity, preview the resulting Git/SSH configuration changes, apply them, and verify or undo the result. The graph also preserves documented capabilities for environment detection, key generation, account checks, history, tray switching, launch-in-context, and settings. Backend ownership beyond the sampled excerpts is limited to the README and source-index references; uncertain internal links are omitted.
Main entry points: App.tsx App shell · service.rs Configuration service · lib.rs Tauri command runtime · api.ts Desktop command API
Components 25
Desktop experience
- App shell
src/App.tsx - Workspace state
src/hooks/use-workspace.ts - Profile and settings screens
src/components/screens.tsx - Change preview and management
src/components/manage-dialog.tsx - Command palette
src/components/quick-switcher.tsx - Application updates
src/components/updates.tsx
Profiles and keys
- Profile editor
src/components/profile-form.tsx - SSH key setup
src/components/key-setup.tsx - Identity health
src/components/identity-health.tsx - Provider and profile rules
src/lib/providers.ts
Configuration operations
- Desktop command API
src/lib/api.ts
Rust backend
- Configuration service
src-tauri/src/service.rs - Git repository operations
src-tauri/src/git.rs - SSH operations
src-tauri/src/ssh.rs - Provider checks and remotes
src-tauri/src/provider.rs - Environment detection
src-tauri/src/detection.rs - System process execution
src-tauri/src/process.rs - Global profile and tray
src-tauri/src/global.rs - Local app storage
src-tauri/src/storage.rs - Domain models
src-tauri/src/model.rs - Tauri command runtime
src-tauri/src/lib.rs
Other components
- Developer
- GitHub and GitLab
- Git, OpenSSH and OS
- Git and SSH config files
Connections 29
- Developer → App shell: uses
README.md - App shell → Workspace state: reads state
src/App.tsx - App shell → Profile and settings screens: renders
src/App.tsx - App shell → Change preview and management: renders
src/App.tsx - App shell → Command palette: offers actions
src/App.tsx - App shell → Application updates: renders
src/App.tsx - Profile and settings screens → Profile editor: edits profiles
src/components/screens.tsx - Profile editor → SSH key setup: embeds
src/components/profile-form.tsx - Profile editor → Provider and profile rules: uses defaults
src/components/profile-form.tsx - Profile and settings screens → Desktop command API: requests actions
src/components/screens.tsx - Workspace state → Desktop command API: loads and mutates
src/hooks/use-workspace.ts - Change preview and management → Workspace state: uses workspace
src/components/manage-dialog.tsx - Identity health → Desktop command API: requests verification
src/components/identity-health.tsx - Desktop command API → Tauri command runtime: invokes commands
src/lib/api.ts - Tauri command runtime → Configuration service: dispatches operations
src-tauri/src/lib.rs - Tauri command runtime → Environment detection: dispatches detection
src-tauri/src/lib.rs - Tauri command runtime → Global profile and tray: dispatches global actions
src-tauri/src/lib.rs - Tauri command runtime → Local app storage: dispatches persistence
src-tauri/src/lib.rs - Configuration service → System process execution: runs system commands
src-tauri/src/service.rs - Configuration service → Provider checks and remotes: uses provider logic
src-tauri/src/service.rs - Configuration service → Git repository operations: handles repository config
- Configuration service → SSH operations: handles SSH config
- Environment detection → Git, OpenSSH and OS: inspects environment
README.md - System process execution → Git, OpenSSH and OS: runs tools
README.md - SSH operations → Git, OpenSSH and OS: uses OpenSSH
README.md - Provider checks and remotes → GitHub and GitLab: checks accounts
README.md - Configuration service → Git and SSH config files: previews and applies
README.md - Local app storage → Git and SSH config files: journals backups
README.md - Developer → GitHub and GitLab: provides username
README.md