Skip to content

feat: dev cli in go#367

Closed
Nikhil (shadowfax92) wants to merge 1325 commits intomainfrom
feat/dev-cli-in-go
Closed

feat: dev cli in go#367
Nikhil (shadowfax92) wants to merge 1325 commits intomainfrom
feat/dev-cli-in-go

Conversation

@shadowfax92
Copy link
Copy Markdown
Contributor

No description provided.

Felarof (felarof99) and others added 30 commits December 31, 2025 21:07
* feat: new extension installer + bundle support

* feat: support bundle extension download in cli

* chore: update release yaml to include new bundle_extensions module
* feat: ota release

* chore: clean-up old binaries

* fix: ota cli sub-commands, path fixes

* chore: browseros server binary update

* fix: add sparkle sign_update path as ENV

* fix: CLOUDFLARE_API_TOKEN to env

* fix: use same upload r2 module

* feat: upload appcast is separate

* feat: write sparkle sign in python

* fix: handle appcast update

* fix: add missing sparkle.py file

* fix: remove redudant cli options in ota

* chore: 0.0.37 macos signed release

* chore: linux browseros server ota

* fix: copy binaries to temp file and then sign
Felarof (felarof99) and others added 24 commits February 5, 2026 23:10
* feat: new apply --force

* chore: update chromium version

* feat: chromium 145 updated patches

* fix: disable series patches for nwo

* chore: bump offset + version

---------

Co-authored-by: Nikhil <shadowfax@mac.local.meter>
* feat: bros dev cli for better management

* fix: minor

* fix: review fixes
* feat: cookie import fix

* chore: bump offset + version

* feat: fixes to keychain macos signing
@shadowfax92
Copy link
Copy Markdown
Contributor Author

Greptile (@greptileai) review pls

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 16, 2026

Greptile Summary

This PR implements a comprehensive Go-based CLI tool (bros) to replace existing build and development tooling, adding ~9000 lines of production-quality code across 59 files.

Major Components:

  • Build Pipeline: Complete Chromium build orchestration with modular phases (setup, prep, build, sign, package, upload)
  • Dev Tools: Patch development workflow with feature classification, annotation, and git integration
  • Release Automation: GitHub release creation, artifact management, and R2 storage integration
  • OTA Updates: Sparkle-based update system with appcast generation and binary signing
  • Cross-Platform Signing: macOS notarization, Windows eSigner integration, and Linux packaging

Code Quality:

  • Well-structured with clear separation of concerns
  • Comprehensive error handling with custom exit codes
  • Unit tests for critical components (R2 client, appcast generation, version comparison)
  • Proper resource cleanup with defer statements throughout
  • Environment variable management with .env file support

Key Features:

  • Modular build system with 19+ configurable modules
  • Multi-platform support (macOS arm64/x64, Windows, Linux)
  • Universal binary creation for macOS
  • Cloudflare R2 integration for artifact storage
  • GitHub CLI integration for release automation

Confidence Score: 4/5

  • This PR is safe to merge with minor considerations for production deployment
  • The implementation is well-structured with good error handling, proper resource cleanup, and unit tests for critical components. Code follows Go best practices with clear separation of concerns. Score is 4 (not 5) due to the large scope (~9000 lines), sensitive credential handling in signing operations, and platform-specific code that requires testing across all target environments before production use
  • Pay close attention to credential-handling files (sign_macos.go, sign_windows_impl.go, sign_binary.go) and ensure proper secrets management in production environments

Important Files Changed

Filename Overview
packages/browseros/tools/bros/cmd/root.go Implements root command using Cobra with proper silence settings for clean output
packages/browseros/tools/bros/cmd/build.go Adds build command with comprehensive flags for phases, modules, and configuration
packages/browseros/tools/bros/cmd/dev.go Implements patch development commands with feature management and annotation support
packages/browseros/tools/bros/cmd/release.go Implements release automation with GitHub, appcast, and OTA commands
packages/browseros/tools/bros/internal/native/r2/client.go Implements Cloudflare R2 client with S3-compatible operations and version sorting
packages/browseros/tools/bros/internal/native/build/run.go Orchestrates build pipeline with module execution and phase-based organization
packages/browseros/tools/bros/internal/native/build/modules.go Implements all build modules from git setup through compilation and packaging
packages/browseros/tools/bros/internal/native/build/sign_macos.go Implements macOS code signing and notarization with proper credential handling
packages/browseros/tools/bros/internal/native/build/sign_windows_impl.go Implements Windows code signing using eSigner with TOTP authentication
packages/browseros/tools/bros/internal/native/ota/sign_binary.go Signs and notarizes binaries for all platforms with proper credential validation
packages/browseros/tools/bros/internal/native/release/github.go Creates GitHub releases with artifact uploads using gh CLI

Flowchart

flowchart TD
    Start([bros CLI]) --> Root{Command}
    
    Root -->|build| Build[Build Command]
    Root -->|dev| Dev[Dev Command]
    Root -->|release| Release[Release Command]
    Root -->|ota| OTA[OTA Command]
    
    Build --> BuildMode{Mode}
    BuildMode -->|--config| ConfigMode[YAML Config]
    BuildMode -->|--modules| ModulesMode[Module List]
    BuildMode -->|phase flags| PhaseMode[Phase Flags]
    
    ConfigMode --> BuildCtx[Build Context]
    ModulesMode --> BuildCtx
    PhaseMode --> BuildCtx
    
    BuildCtx --> Pipeline[Module Pipeline]
    Pipeline --> Setup[Setup Phase]
    Pipeline --> Prep[Prep Phase]
    Pipeline --> BuildPhase[Build Phase]
    Pipeline --> Sign[Sign Phase]
    Pipeline --> Package[Package Phase]
    Pipeline --> Upload[Upload Phase]
    
    Setup --> GitSetup[Git Setup]
    Setup --> SparkleSetup[Sparkle Setup]
    
    Prep --> Patches[Apply Patches]
    Prep --> Resources[Copy Resources]
    Prep --> Configure[GN Configure]
    
    BuildPhase --> Compile[Autoninja Compile]
    
    Sign --> SignOS{OS}
    SignOS -->|macOS| SignMac[Code Sign + Notarize]
    SignOS -->|Windows| SignWin[eSigner + TOTP]
    SignOS -->|Linux| SignLinux[No-op]
    
    Package --> PackageOS{OS}
    PackageOS -->|macOS| DMG[Create DMG]
    PackageOS -->|Windows| Installer[Mini Installer]
    PackageOS -->|Linux| AppImage[AppImage + deb]
    
    Upload --> R2Upload[Upload to R2]
    
    Dev --> DevCmd{Subcommand}
    DevCmd -->|status| DevStatus[Show Status]
    DevCmd -->|annotate| DevAnnotate[Create Commits]
    DevCmd -->|feature| DevFeature[Feature Mgmt]
    
    DevFeature --> FeatureList[List Features]
    DevFeature --> FeatureShow[Show Feature]
    DevFeature --> FeatureAdd[Add/Update]
    DevFeature --> FeatureClassify[Classify Patches]
    
    Release --> ReleaseCmd{Subcommand}
    ReleaseCmd -->|list| ReleaseList[List Versions]
    ReleaseCmd -->|appcast| Appcast[Generate XML]
    ReleaseCmd -->|publish| Publish[Publish to CDN]
    ReleaseCmd -->|download| Download[Download Artifacts]
    ReleaseCmd -->|github| GitHub[GitHub Release]
    
    GitHub --> GHCreate[Create Release]
    GHCreate --> GHUpload[Upload Assets]
    
    OTA --> OTACmd{Subcommand}
    OTACmd -->|server release| ServerRelease[Server OTA]
    OTACmd -->|publish-appcast| PublishAppcast[Publish Appcast]
    OTACmd -->|test-signing| TestSign[Test Signing]
    
    ServerRelease --> SignBinary[Sign Binary]
    ServerRelease --> CreateZip[Create Zip]
    ServerRelease --> SparkleSign[Sparkle Sign]
    ServerRelease --> UploadOTA[Upload to R2]
    
    R2Upload --> R2[Cloudflare R2]
    UploadOTA --> R2
    Publish --> R2
    Download --> R2
Loading

Last reviewed commit: d215ff5

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 13, 2026
@shadowfax92 Nikhil (shadowfax92) deleted the feat/dev-cli-in-go branch April 13, 2026 16:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants