ggo 1.0.1

Smart git branch navigation with frecency-based ranking
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# 📦 Complete Guide: Package Manager Distribution for ggo

## Why This Matters

**Current state:** Users need Rust + cargo to install
- Blocks 95% of potential users
- High friction for trying the tool

**With package managers:**
```bash
brew install ggo        # macOS/Linux
winget install ggo      # Windows
```
- Zero friction
- Professional appearance
- Automatic updates
- Massive discoverability boost

## **Completed: curl Install Script**

**Status:** ✅ Implemented (install.sh)

A curl-based install script is now available:
```bash
curl -sSf https://raw.githubusercontent.com/XavierFabregat/ggo/master/install.sh | bash
```

**Features:**
- Detects OS and architecture
- Checks for Rust/cargo, offers to install if missing
- Tries crates.io first (fast), falls back to source build
- Installs to `~/.local/bin` (customizable via `GGO_INSTALL_DIR`)
- Provides clear error messages and PATH instructions
- Works on macOS, Linux, and Windows (Git Bash/WSL)

**Benefits:**
- Lowers barrier for users without Rust
- Professional appearance
- Common pattern (like rustup, homebrew, etc.)
- Bridges gap until official package managers

**Complements package managers** - Users can try ggo immediately while we work on Homebrew/Winget.

---

## 🍺 **1. Homebrew (macOS & Linux)** - HIGHEST PRIORITY

**Impact:** 10M+ active users, de-facto standard for macOS developers

### Step 1: Create a Homebrew Tap

```bash
# Create a new repo: homebrew-tap
mkdir homebrew-tap
cd homebrew-tap

# Create formula directory
mkdir Formula
```

### Step 2: Create Formula File

**Formula/ggo.rb:**
```ruby
class Ggo < Formula
  desc "Smart git branch navigation with frecency-based ranking"
  homepage "https://github.com/XavierFabregat/ggo"
  version "0.2.0"
  license "MIT"

  if OS.mac? && Hardware::CPU.arm?
    url "https://github.com/XavierFabregat/ggo/releases/download/v0.2.0/ggo-macos-arm64"
    sha256 "FILL_IN_SHA256_HERE"
  elsif OS.mac? && Hardware::CPU.intel?
    url "https://github.com/XavierFabregat/ggo/releases/download/v0.2.0/ggo-macos-amd64"
    sha256 "FILL_IN_SHA256_HERE"
  elsif OS.linux? && Hardware::CPU.intel?
    url "https://github.com/XavierFabregat/ggo/releases/download/v0.2.0/ggo-linux-amd64"
    sha256 "FILL_IN_SHA256_HERE"
  end

  def install
    bin.install "ggo-macos-arm64" => "ggo" if OS.mac? && Hardware::CPU.arm?
    bin.install "ggo-macos-amd64" => "ggo" if OS.mac? && Hardware::CPU.intel?
    bin.install "ggo-linux-amd64" => "ggo" if OS.linux?
  end

  test do
    system "#{bin}/ggo", "--version"
  end
end
```

### Step 3: Generate SHA256 Checksums

```bash
# After each release, generate checksums
shasum -a 256 ggo-macos-arm64
shasum -a 256 ggo-macos-amd64
shasum -a 256 ggo-linux-amd64
```

### Step 4: Push to GitHub

```bash
cd homebrew-tap
git init
git add Formula/ggo.rb
git commit -m "Add ggo formula v0.2.0"
git remote add origin git@github.com:XavierFabregat/homebrew-tap.git
git push -u origin main
```

### Step 5: Users Install

```bash
brew tap XavierFabregat/tap
brew install ggo

# Or in one command:
brew install XavierFabregat/tap/ggo
```

### Automation: Auto-Update Formula on Release

**.github/workflows/update-homebrew.yaml:**
```yaml
name: Update Homebrew Formula

on:
  release:
    types: [published]

jobs:
  update-formula:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout homebrew-tap
        uses: actions/checkout@v4
        with:
          repository: XavierFabregat/homebrew-tap
          token: ${{ secrets.HOMEBREW_TAP_TOKEN }}

      - name: Download release assets
        run: |
          VERSION=${GITHUB_REF#refs/tags/v}
          curl -L -o ggo-macos-arm64 \
            "https://github.com/XavierFabregat/ggo/releases/download/v${VERSION}/ggo-macos-arm64"
          curl -L -o ggo-macos-amd64 \
            "https://github.com/XavierFabregat/ggo/releases/download/v${VERSION}/ggo-macos-amd64"
          curl -L -o ggo-linux-amd64 \
            "https://github.com/XavierFabregat/ggo/releases/download/v${VERSION}/ggo-linux-amd64"

      - name: Calculate checksums
        id: checksums
        run: |
          echo "arm64=$(shasum -a 256 ggo-macos-arm64 | awk '{print $1}')" >> $GITHUB_OUTPUT
          echo "amd64=$(shasum -a 256 ggo-macos-amd64 | awk '{print $1}')" >> $GITHUB_OUTPUT
          echo "linux=$(shasum -a 256 ggo-linux-amd64 | awk '{print $1}')" >> $GITHUB_OUTPUT

      - name: Update formula
        run: |
          VERSION=${GITHUB_REF#refs/tags/v}
          sed -i "s/version \".*\"/version \"${VERSION}\"/" Formula/ggo.rb
          sed -i "s|download/v[0-9.]\+/|download/v${VERSION}/|g" Formula/ggo.rb
          # Update SHA256 hashes (you'll need a more sophisticated approach here)

      - name: Commit and push
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"
          git add Formula/ggo.rb
          git commit -m "Update ggo to ${GITHUB_REF#refs/tags/v}"
          git push
```

---

## 🪟 **2. Winget (Windows Package Manager)** - HIGH PRIORITY

**Impact:** Built into Windows 11, 100M+ potential users

### Step 1: Create Manifest

Winget uses manifest files in the **winget-pkgs** repository.

**manifests/x/XavierFabregat/ggo/0.2.0/XavierFabregat.ggo.yaml:**
```yaml
PackageIdentifier: XavierFabregat.ggo
PackageVersion: 0.2.0
PackageLocale: en-US
Publisher: Xavier Fabregat
PublisherUrl: https://github.com/XavierFabregat
PublisherSupportUrl: https://github.com/XavierFabregat/ggo/issues
Author: Xavier Fabregat
PackageName: ggo
PackageUrl: https://github.com/XavierFabregat/ggo
License: MIT
LicenseUrl: https://github.com/XavierFabregat/ggo/blob/master/LICENSE
ShortDescription: Smart git branch navigation with frecency-based ranking
Description: |
  ggo makes git branch navigation as intuitive as zoxide makes directory
  navigation. Uses fuzzy matching and frecency algorithm to intelligently
  rank branches based on your usage patterns.
Tags:
  - git
  - cli
  - productivity
  - developer-tools
ReleaseNotesUrl: https://github.com/XavierFabregat/ggo/releases/tag/v0.2.0
ManifestType: defaultLocale
ManifestVersion: 1.6.0
```

**manifests/x/XavierFabregat/ggo/0.2.0/XavierFabregat.ggo.installer.yaml:**
```yaml
PackageIdentifier: XavierFabregat.ggo
PackageVersion: 0.2.0
Platform:
  - Windows.Desktop
MinimumOSVersion: 10.0.0.0
Scope: user
InstallModes:
  - silent
UpgradeBehavior: install
Installers:
  - Architecture: x64
    InstallerType: portable
    InstallerUrl: https://github.com/XavierFabregat/ggo/releases/download/v0.2.0/ggo-windows-amd64.exe
    InstallerSha256: FILL_IN_SHA256_HERE
    Commands:
      - ggo
ManifestType: installer
ManifestVersion: 1.6.0
```

### Step 2: Submit to winget-pkgs

```bash
# Fork https://github.com/microsoft/winget-pkgs
git clone https://github.com/YOUR_USERNAME/winget-pkgs.git
cd winget-pkgs

# Create branch
git checkout -b add-ggo-0.2.0

# Add your manifests
mkdir -p manifests/x/XavierFabregat/ggo/0.2.0
cp XavierFabregat.ggo.yaml manifests/x/XavierFabregat/ggo/0.2.0/
cp XavierFabregat.ggo.installer.yaml manifests/x/XavierFabregat/ggo/0.2.0/

# Commit and create PR
git add .
git commit -m "Add XavierFabregat.ggo version 0.2.0"
git push origin add-ggo-0.2.0

# Open PR to microsoft/winget-pkgs
```

### Step 3: Automation with winget-releaser

Use the **winget-releaser** GitHub Action:

**.github/workflows/winget-release.yaml:**
```yaml
name: Publish to WinGet

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: windows-latest
    steps:
      - name: Publish to WinGet
        uses: vedantmgoyal2009/winget-releaser@v2
        with:
          identifier: XavierFabregat.ggo
          installers-regex: 'ggo-windows-amd64\.exe$'
          token: ${{ secrets.WINGET_TOKEN }}
```

**Users install:**
```powershell
winget install XavierFabregat.ggo
```

---

## 📦 **3. Cargo (Rust Users)** - MEDIUM PRIORITY

**Impact:** Rust developers (smaller audience but easy to set up)

### Publish to crates.io

```bash
# One-time setup
cargo login

# Before each release
cargo publish --dry-run
cargo publish
```

**Update Cargo.toml with metadata:**
```toml
[package]
name = "ggo"
version = "0.2.0"
edition = "2021"
authors = ["Xavier Fabregat <your.email@example.com>"]
description = "Smart git branch navigation with frecency-based ranking"
repository = "https://github.com/XavierFabregat/ggo"
homepage = "https://github.com/XavierFabregat/ggo"
documentation = "https://github.com/XavierFabregat/ggo"
readme = "README.md"
keywords = ["git", "cli", "productivity", "frecency"]
categories = ["command-line-utilities", "development-tools"]
license = "MIT"
```

**Users install:**
```bash
cargo install ggo
```

---

## 🐧 **4. Linux Package Managers**

### Option A: cargo-deb (Debian/Ubuntu .deb)

**Install:**
```bash
cargo install cargo-deb
```

**Add to Cargo.toml:**
```toml
[package.metadata.deb]
maintainer = "Xavier Fabregat <your.email@example.com>"
copyright = "2025, Xavier Fabregat <your.email@example.com>"
license-file = ["LICENSE", "4"]
extended-description = """\
ggo makes git branch navigation as intuitive as zoxide makes directory \
navigation. Uses fuzzy matching and frecency algorithm to intelligently \
rank branches based on your usage patterns."""
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
    ["target/release/ggo", "usr/bin/", "755"],
    ["README.md", "usr/share/doc/ggo/", "644"],
]
```

**Build .deb package:**
```bash
cargo deb
# Creates target/debian/ggo_0.2.0_amd64.deb
```

**Add to GitHub releases:**
```yaml
# In release.yaml
- name: Build .deb package
  run: |
    cargo install cargo-deb
    cargo deb

- name: Upload .deb to release
  uses: softprops/action-gh-release@v2
  with:
    files: target/debian/*.deb
```

### Option B: cargo-rpm (Fedora/RHEL .rpm)

```bash
cargo install cargo-rpm
cargo rpm init
cargo rpm build

# Add to release workflow similar to .deb
```

### Option C: AUR (Arch Linux)

Create **PKGBUILD** in a separate `ggo-bin` AUR repo:

```bash
# Maintainer: Xavier Fabregat <your.email@example.com>
pkgname=ggo-bin
pkgver=0.2.0
pkgrel=1
pkgdesc="Smart git branch navigation with frecency-based ranking"
arch=('x86_64')
url="https://github.com/XavierFabregat/ggo"
license=('MIT')
depends=('gcc-libs')
provides=('ggo')
conflicts=('ggo')
source_x86_64=("$url/releases/download/v$pkgver/ggo-linux-amd64")
sha256sums_x86_64=('FILL_IN_SHA256')

package() {
    install -Dm755 "$srcdir/ggo-linux-amd64" "$pkgdir/usr/bin/ggo"
}
```

**Users install:**
```bash
yay -S ggo-bin
# or
paru -S ggo-bin
```

---

## 🪣 **5. Scoop (Windows Alternative)**

**Impact:** Popular alternative to Winget for developers

### Create Scoop Bucket

**ggo.json:**
```json
{
    "version": "0.2.0",
    "description": "Smart git branch navigation with frecency-based ranking",
    "homepage": "https://github.com/XavierFabregat/ggo",
    "license": "MIT",
    "architecture": {
        "64bit": {
            "url": "https://github.com/XavierFabregat/ggo/releases/download/v0.2.0/ggo-windows-amd64.exe",
            "hash": "FILL_IN_SHA256",
            "bin": [
                ["ggo-windows-amd64.exe", "ggo"]
            ]
        }
    },
    "checkver": {
        "github": "https://github.com/XavierFabregat/ggo"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/XavierFabregat/ggo/releases/download/v$version/ggo-windows-amd64.exe"
            }
        }
    }
}
```

**Users install:**
```powershell
scoop bucket add xavierfabregat https://github.com/XavierFabregat/scoop-bucket
scoop install ggo
```

---

## 📊 **Priority & ROI Matrix**

| Package Manager | Users | Setup Effort | Maintenance | ROI | Priority |
|----------------|-------|--------------|-------------|-----|----------|
| **Homebrew** | 10M+ | 2 hours | Low | ⭐⭐⭐⭐⭐ | **HIGH** |
| **Winget** | 100M+ | 3 hours | Low | ⭐⭐⭐⭐⭐ | **HIGH** |
| **Cargo** | 500K+ | 30 min | Very Low | ⭐⭐⭐⭐ | MEDIUM |
| **AUR** | 1M+ | 1 hour | Low | ⭐⭐⭐ | MEDIUM |
| **Scoop** | 500K+ | 1 hour | Low | ⭐⭐⭐ | LOW |
| **.deb/.rpm** | 10M+ | 2 hours | Medium | ⭐⭐⭐ | LOW |

---

## 🚀 **Recommended Implementation Order**

### Week 1: Core Package Managers (5 hours)
1. **Homebrew** (2 hours)
   - Create tap repo
   - Add formula
   - Test installation
   - Update README

2. **Winget** (3 hours)
   - Create manifests
   - Submit first PR to winget-pkgs
   - Set up winget-releaser action

### Week 2: Automation (2 hours)
3. **Automate updates** (2 hours)
   - Homebrew formula auto-update
   - Winget releaser GitHub Action
   - Add checksums to release workflow

### Week 3: Additional Channels (3 hours)
4. **Cargo** (30 min)
   - Add metadata to Cargo.toml
   - Publish to crates.io

5. **AUR** (1 hour)
   - Create PKGBUILD
   - Submit to AUR

6. **Scoop** (1 hour)
   - Create bucket
   - Add manifest

### Week 4: Documentation (1 hour)
7. **Update README** with all installation methods
8. **Create INSTALLATION.md** with troubleshooting

---

## 📝 **Update README.md**

```markdown
## Installation

### macOS & Linux (Homebrew)
```bash
brew install XavierFabregat/tap/ggo
```

### Windows (Winget)
```powershell
winget install XavierFabregat.ggo
```

### Windows (Scoop)
```powershell
scoop bucket add xavierfabregat https://github.com/XavierFabregat/scoop-bucket
scoop install ggo
```

### Rust Users (Cargo)
```bash
cargo install ggo
```

### Arch Linux (AUR)
```bash
yay -S ggo-bin
```

### From Source
```bash
git clone https://github.com/XavierFabregat/ggo.git
cd ggo
cargo install --path .
```
```

---

## 🎯 **Success Metrics**

Track these after distribution setup:

- **Downloads per package manager** (GitHub releases analytics)
- **Stars/watchers** (increases with discoverability)
- **Issues about installation** (should decrease dramatically)
- **Homebrew analytics** (if you opt in)

---

## 💡 **Final Thoughts**

**Distribution > Performance optimization.**

**Before package managers:**
- 100 GitHub stars
- 50 actual users (Rust developers only)
- High barrier to trying

**After package managers:**
- 1000+ stars (discoverable via `brew search git`)
- 500+ users (low friction to try)
- Professional appearance

**Total effort:** ~10 hours spread over a month
**Impact:** 10x increase in potential users

This is **high-leverage work** that directly impacts adoption.

---

## 📚 **Additional Resources**

- [Homebrew Formula Cookbook]https://docs.brew.sh/Formula-Cookbook
- [Winget Package Manifest Guide]https://learn.microsoft.com/en-us/windows/package-manager/package/
- [crates.io Publishing Guide]https://doc.rust-lang.org/cargo/reference/publishing.html
- [AUR Submission Guidelines]https://wiki.archlinux.org/title/AUR_submission_guidelines
- [Scoop App Manifest Guide]https://github.com/ScoopInstaller/Scoop/wiki/App-Manifests

---

**Created:** 2025-12-16
**Last Updated:** 2025-12-16
**Status:** Ready for implementation