Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 45 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,52 @@
<div align="center">
<img width="1200" height="475" alt="GHBanner" src="https://github.com/user-attachments/assets/0aa67016-6eaf-458a-adb2-6e31a0763ed6" />
</div>
# Git Watcher Pro

# Run and deploy your AI Studio app
Git Watcher Pro is a lightweight, proactive Git repository monitor for Windows. It sits in your system tray and monitors your local repositories for changes, keeping you synced with your remote servers.

This contains everything you need to run your app locally.
![Dashboard](docs/images/dashboard.png)

View your app in AI Studio: https://ai.studio/apps/drive/1NNtM1N_9cpRVQ7KoDZrJoSs90I9ZMeCA
## Features

## Run Locally
- **Real-time Monitoring:** Automatically checks for changes in your Git repositories.
- **Smart Status:** Shows if you are ahead, behind, or have dirty files.
- **Auto-Pull:** Optionally configure repositories to automatically pull changes when behind.
- **System Tray Integration:** Runs quietly in the background; minimize to tray to keep your taskbar clean.
- **Smart Auth:** Easily connect to private GitHub repositories using the clipboard-based Smart Connect feature.
- **Portable:** No installation required. Just run the executable.
- **Startup:** Can be configured to launch automatically with Windows.

**Prerequisites:** Node.js
![Settings](docs/images/settings.png)

## Getting Started

1. Install dependencies:
`npm install`
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
3. Run the app:
`npm run dev`
### Prerequisites

- Windows 10/11
- Git installed and available in PATH.

### Installation

1. Download the latest release (Portable .exe).
2. Run `Git Watcher Pro.exe`.

### Development

1. **Install dependencies:**
```bash
npm install
```

2. **Run in development mode:**
```bash
npm run dev
```
*Note: In a headless environment, use `npm run preview` to see the UI.*

3. **Build:**
```bash
npm run build
```
This produces an installer and a portable executable in `dist/`.

## License

MIT
Binary file added docs/images/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified electron/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 23 additions & 3 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const PRELOAD_PATH = join(ROOT_PATH, 'dist-electron/preload.cjs')
const store = new Store({
defaults: {
repos: [],
settings: { checkInterval: 60, githubToken: '', launchAtStartup: true }
settings: { checkInterval: 60, githubToken: '', launchAtStartup: true, startMinimized: false }
}
})

Expand Down Expand Up @@ -163,10 +163,12 @@ function startClipboardWatcher() {
// --- App Lifecycle ---

function createWindow(): void {
const startMinimized = store.get('settings.startMinimized') as boolean;

mainWindow = new BrowserWindow({
width: 950,
height: 700,
show: false,
show: false, // Always start hidden, we show it later if not startMinimized
frame: false,
backgroundColor: '#1e1e1e',
autoHideMenuBar: true,
Expand All @@ -179,7 +181,9 @@ function createWindow(): void {
})

mainWindow.on('ready-to-show', () => {
mainWindow?.show()
if (!startMinimized) {
mainWindow?.show()
}
})

mainWindow.on('close', (event) => {
Expand Down Expand Up @@ -236,6 +240,13 @@ app.whenReady().then(() => {
app.setAppUserModelId('com.gitwatcher.app')
}

// Ensure startup setting is applied on launch
const launchAtStartup = store.get('settings.launchAtStartup') as boolean;
app.setLoginItemSettings({
openAtLogin: launchAtStartup,
path: app.getPath('exe')
});

createWindow()
createTray()

Expand Down Expand Up @@ -285,6 +296,15 @@ app.whenReady().then(() => {
if (checkIntervalTimer) clearInterval(checkIntervalTimer);
checkIntervalTimer = setInterval(checkRepos, newSettings.checkInterval * 1000);
}

// Handle Launch at Startup
if (newSettings.launchAtStartup !== undefined) {
app.setLoginItemSettings({
openAtLogin: newSettings.launchAtStartup,
path: app.getPath('exe')
});
}

return true;
});

Expand Down
Loading