Skip to content

feat(install): add --with-gbrain flag to install gbrain alongside fleet#267

Closed
yashrajsapra wants to merge 1 commit into
mainfrom
feat/install-with-gbrain
Closed

feat(install): add --with-gbrain flag to install gbrain alongside fleet#267
yashrajsapra wants to merge 1 commit into
mainfrom
feat/install-with-gbrain

Conversation

@yashrajsapra
Copy link
Copy Markdown
Contributor

Summary

  • Adds --with-gbrain flag to apra-fleet install
  • One-command setup: apra-fleet install --with-gbrain clones gbrain, runs bun install + bun link, and prints next steps
  • Idempotent — skips gracefully if already installed, re-links if dir exists but CLI not in PATH
  • Non-breaking — flag is opt-in, existing installs unaffected

Usage

apra-fleet install --with-gbrain
# Step 9: clones https://github.com/garrytan/gbrain → ~/gbrain
# Step 9: bun install + bun link
# Step 9: ✓ gbrain 0.33.1.0
# Next: run `gbrain init` to create your brain database.

Why this flag, not automatic

gbrain is opt-in (gbrain: true per member). Not every fleet user needs it. The flag makes the happy path easy without forcing a ~300MB download on everyone.

Failure modes handled

Scenario Behaviour
bun not found Warning + skip (non-fatal)
Already cloned + in PATH Skip with "already installed"
Already cloned, not in PATH Re-links via bun link
bun install postinstall fails (Windows) Caught — benign, packages still installed

Test plan

  • 5 new unit tests (all mocked — no network): bun-not-found, already-installed, clone, install+link, flag parsing
  • All 12 install tests passing
  • CI green

Related: part of the gbrain integration story (see PR #266)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yashrajsapra
Copy link
Copy Markdown
Contributor Author

Folding into #266 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant