You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📋 Installer Architecture Reference: installer/README.md - Read this first for complete context on installation system, versioned paths, and build process.
Context & Problem
dotvibe is a developer toolbox that provides coding agents with superpowers. Currently, our release process is manual and painful:
Users want simple GitHub releases with platform-specific installers that just work
Developers want version bumps to automatically trigger releases
Maintainers are manually building cross-platform binaries and installers
Installation Architecture
Two-Layer System:
Deno Binary: Core CLI compiled with deno compile (handles all logic)
Go Installer: Downloads binary + WASM assets, sets up environment
User Installation Flow:
# What users do:# 1. Visit https://github.com/vhybzOS/dotvibe/releases# 2. Download install-dotvibe-{platform}-{arch} for their OS# 3. Run the installer
./install-dotvibe-linux-amd64
# Behind the scenes (installer does):# 1. Downloads vibe-{version}-{platform}-{arch} from same release# 2. Downloads tree-sitter-typescript.wasm from unpkg.com# 3. Sets up ~/.vibe/data/ directory structure # 4. Creates symlinks, adds to PATH
Developer Experience:
# Local development & testing:
./install-dotvibe-linux-amd64 --dev # Symlinks local ./vibe to PATH
vibe index src/ # Now uses local development binary# What should trigger everything:
git commit -m "bump: v0.7.29" deno.json
git push
# Should automatically result in:# - Cross-platform builds (Linux, macOS, Windows) # - Go installers for all platforms# - GitHub release with all assets# - Users can immediately download new version
Solution Overview
Implement automated release workflow that detects version changes in deno.json, builds cross-platform binaries, creates Go installers, and publishes GitHub releases with comprehensive error handling and validation.
🔗 Integration with Issue #1: This release pipeline provides the vibe-{version}-{platform}-{arch} binaries that the modern installer architecture (#1) expects to download from GitHub releases. The two issues are complementary:
This Issue: Builds and publishes vibe binaries to GitHub releases
📁 Unified Installation Structure: Both issues now use consistent versioned directories where vibe and data/ are co-located, enabling simple ./data/ relative path resolution in all environments (development and production).
Workflow Architecture
flowchart TD
A[Version Change in deno.json] --> B[detect-version]
B --> C{Version Changed?}
C -->|No| D[Skip Release]
C -->|Yes| E[build-binaries]
E --> F[Linux Build]
E --> G[macOS Build]
E --> H[Windows Build]
F --> I[Upload Linux Artifact]
G --> J[Upload macOS Artifact]
H --> K[Upload Windows Artifact]
I --> L[build-installers]
J --> L
K --> L
L --> M[Download All Artifacts]
M --> N[Build Linux Installer]
M --> O[Build macOS Installer]
M --> P[Build Windows Installer]
N --> Q[create-release]
O --> Q
P --> Q
Q --> R[Create GitHub Release]
R --> S[Upload All Assets]
S --> T[Validate Release]
T --> U[Notify Success]
Purpose: Generate Go-based installers for all platforms Dependencies: detect-version, build-binaries Artifacts: Platform-specific installers
Job 4: create-release
Purpose: Create GitHub release with all assets Dependencies: All previous jobs Assets: Binaries + Installers + Checksums
Required Implementation Details
1. Workflow Structure
name: Releaseon:
push:
branches: [main]paths: ['deno.json']workflow_dispatch:
jobs:
detect-version:
# Extract version from deno.json, set as output# Skip if version unchanged from latest releasebuild-binaries:
needs: detect-versionstrategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]include:
- os: ubuntu-latesttarget: linux-amd64
- os: macos-latest target: darwin-amd64
- os: windows-latesttarget: windows-amd64# Use deno compile commands from scripts/build.ts# Upload artifacts with consistent namingbuild-installers:
needs: [detect-version, build-binaries]# Use go run installer/cmd/build.go commands# Download all binary artifacts first# Build installers for all platformscreate-release:
needs: [detect-version, build-binaries, build-installers]# Create GitHub release with all assets# Use version from detect-version job
2. Integration Points
Deno Build System: Reference deno.json tasks and scripts/build-all-platforms.sh
Use existing deno task build:cross-platform command
Deno compile commands already configured with correct flags
Data directory inclusion patterns already set
Go Installer System: Reference installer/Taskfile.yml (post-Issue #1 rewrite)
Use task build:all command from installer directory
Modern binary download architecture (no more Rust/Cargo dependencies)
Privilege-aware installation with elevate.go and paths.go
SHA256 validation via download.go
Downloads vibe binaries from GitHub releases + external dependencies
Testing: Reference tests/ directory and deno.json tasks
Pre-build validation steps
Binary smoke tests
Installation verification
3. Critical Implementation Specifics
Version Detection:
# Extract version from deno.json
jq -r '.version' deno.json
# Compare with latest GitHub release tag# Set skip=true if versions match
🔗 Note: The binary naming pattern vibe-{version}-{platform}-{arch} matches exactly what the modern installer architecture (Issue #1) expects to download. The installer will use GitHub API to detect the latest version and download the appropriate binary for the user's platform.
📁 Installation Structure: The installer places vibe and data/ in the same versioned directory (e.g., /usr/local/dotvibe/0.9.0/), ensuring consistent ./data/ relative paths in both development and production environments.
Environment Requirements:
Deno 2.1.4+ (from deno.json)
Go 1.21+ (from installer/go.mod)
GitHub token with release permissions
Cross-Platform Build Commands:
# Linux/macOS
deno compile --allow-all --target x86_64-unknown-linux-gnu
# Windows
deno compile --allow-all --target x86_64-pc-windows-msvc
# Include data directory for all platforms
--include data/
Create data/.gitignore with *.wasm pattern (prevent binary assets in git)
Create .github/workflows/release.yml
Implement version detection logic
Set up cross-platform build matrix
Configure artifact upload/download
Integrate Go installer build
Add release creation step
Test installer --dev mode workflow (symlinks local binary)
Test with manual workflow dispatch
Validate with version bump
Critical Setup: Data Directory
Why data/.gitignore is essential:
WASM files are downloaded by Go installer at install time (installer/modules.go)
Binary assets (like tree-sitter-typescript.wasm) shouldn't be committed to git
Prevents accidental commits of large downloaded files during development
Required content for data/.gitignore:
# Ignore everything in data/ directory*# But keep README.md for documentation!README.md
Development Workflow Integration
Developer --dev Mode:
The Go installer supports a --dev flag that enables local development:
# Setup: Point system to use local development binary
./install-dotvibe-linux-amd64 --dev
# What --dev does:# 1. Detects ./vibe executable in current directory (repo clone)# 2. Downloads tree-sitter-typescript.wasm to ./data/ (in repo)# 3. Symlinks ./vibe (local repo binary) to ~/.local/bin/vibe# 4. Adds ~/.local/bin to PATH if needed# Result: Developers use vibe normally but execute local code
vibe index src/ # Uses ./vibe from repo location via symlink
vibe query "functions"# Same local binary, ./data/ assets available
Developer Mode (--dev) Implementation
Purpose: Enable developers to use local development builds with production installer infrastructure. Assumes knowledge of installer architecture.
# .github/workflows/release.yml integrationtest-dev-mode:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]steps:
- name: Test dev mode installationrun: | deno task build ./install-dotvibe-${{ matrix.platform }} --dev --verbose vibe --version # Should use local build vibe index src/ --limit 1 # Smoke test WASM
- name: Test dev mode uninstallrun: | ./install-dotvibe-${{ matrix.platform }} --uninstall ! which vibe # Should be removed from PATH
Uninstall Behavior
// Dev mode uninstall preserves repo, restores backupsfuncuninstallDevMode() error {
// Remove symlinks only, preserve ./data/ and ./vibehomeDir, _:=os.UserHomeDir()
vibeLink:=filepath.Join(homeDir, ".local", "bin", "vibe")
// Restore backup if it existsbackupPattern:=vibeLink+".backup.*"ifbackups, _:=filepath.Glob(backupPattern); len(backups) >0 {
latest:=findLatestBackup(backups)
os.Rename(latest, vibeLink)
log.Printf("Restored backup: %s", latest)
} else {
os.Remove(vibeLink)
}
// Don't touch ./data/ - developer might be using itlog.Printf("Dev mode uninstalled. Local ./data/ preserved.")
returnnil
}
Complete
release.ymlWorkflow Implementation Guide📋 Installer Architecture Reference: installer/README.md - Read this first for complete context on installation system, versioned paths, and build process.
Context & Problem
dotvibe is a developer toolbox that provides coding agents with superpowers. Currently, our release process is manual and painful:
Installation Architecture
Two-Layer System:
deno compile(handles all logic)User Installation Flow:
Developer Experience:
Solution Overview
Implement automated release workflow that detects version changes in
deno.json, builds cross-platform binaries, creates Go installers, and publishes GitHub releases with comprehensive error handling and validation.🔗 Integration with Issue #1: This release pipeline provides the
vibe-{version}-{platform}-{arch}binaries that the modern installer architecture (#1) expects to download from GitHub releases. The two issues are complementary:vibebinaries to GitHub releases📁 Unified Installation Structure: Both issues now use consistent versioned directories where
vibeanddata/are co-located, enabling simple./data/relative path resolution in all environments (development and production).Workflow Architecture
flowchart TD A[Version Change in deno.json] --> B[detect-version] B --> C{Version Changed?} C -->|No| D[Skip Release] C -->|Yes| E[build-binaries] E --> F[Linux Build] E --> G[macOS Build] E --> H[Windows Build] F --> I[Upload Linux Artifact] G --> J[Upload macOS Artifact] H --> K[Upload Windows Artifact] I --> L[build-installers] J --> L K --> L L --> M[Download All Artifacts] M --> N[Build Linux Installer] M --> O[Build macOS Installer] M --> P[Build Windows Installer] N --> Q[create-release] O --> Q P --> Q Q --> R[Create GitHub Release] R --> S[Upload All Assets] S --> T[Validate Release] T --> U[Notify Success]Directory Structure
Job Breakdown & Implementation
Job 1: detect-version
Purpose: Extract version from deno.json, compare with latest release, set outputs
Outputs:
version,should_releaseDependencies: None
Job 2: build-binaries
Purpose: Cross-platform binary compilation using deno compile
Strategy: Matrix build (Linux, macOS, Windows)
Dependencies: detect-version
Artifacts: Platform-specific binaries
Job 3: build-installers
Purpose: Generate Go-based installers for all platforms
Dependencies: detect-version, build-binaries
Artifacts: Platform-specific installers
Job 4: create-release
Purpose: Create GitHub release with all assets
Dependencies: All previous jobs
Assets: Binaries + Installers + Checksums
Required Implementation Details
1. Workflow Structure
2. Integration Points
Deno Build System: Reference
deno.jsontasks andscripts/build-all-platforms.shdeno task build:cross-platformcommandGo Installer System: Reference
installer/Taskfile.yml(post-Issue #1 rewrite)task build:allcommand from installer directoryelevate.goandpaths.godownload.govibebinaries from GitHub releases + external dependenciesTesting: Reference
tests/directory anddeno.jsontasks3. Critical Implementation Specifics
Version Detection:
Artifact Naming Convention:
🔗 Note: The binary naming pattern
vibe-{version}-{platform}-{arch}matches exactly what the modern installer architecture (Issue #1) expects to download. The installer will use GitHub API to detect the latest version and download the appropriate binary for the user's platform.📁 Installation Structure: The installer places
vibeanddata/in the same versioned directory (e.g.,/usr/local/dotvibe/0.9.0/), ensuring consistent./data/relative paths in both development and production environments.Environment Requirements:
deno.json)installer/go.mod)Cross-Platform Build Commands:
4. Error Handling Strategy
5. Dependencies & Actions
Required GitHub Actions:
actions/checkout@v4denoland/setup-deno@v2actions/setup-go@v5actions/upload-artifact@v4actions/download-artifact@v4ghCLI for release managementCaching Strategy:
~/.cache/deno~/go/pkg/mod6. Security Considerations
GITHUB_TOKENfor releases7. Testing Integration
Pre-release validation:
Post-build verification:
Implementation Checklist
data/.gitignorewith*.wasmpattern (prevent binary assets in git).github/workflows/release.yml--devmode workflow (symlinks local binary)Critical Setup: Data Directory
Why
data/.gitignoreis essential:installer/modules.go)tree-sitter-typescript.wasm) shouldn't be committed to gitRequired content for
data/.gitignore:Development Workflow Integration
Developer
--devMode:The Go installer supports a
--devflag that enables local development:Developer Mode (
--dev) ImplementationPurpose: Enable developers to use local development builds with production installer infrastructure. Assumes knowledge of installer architecture.
Prerequisites Validation
WASM Asset Management
Symlink Strategy Differences
Conflict Resolution
Error Handling & Recovery
CI/CD Integration Requirements
Uninstall Behavior
References
deno.jsontasks,scripts/build-all-platforms.shinstaller/Taskfile.yml,installer/main.go(post-Issue Modern Installer Architecture: Privilege-Aware Binary Distribution #1 modern architecture)tests/,deno.jsontasksdeno.json,installer/go.mod.github/workflows/docs.yml(for action patterns)Success Criteria
deno.json