Skip to content

fix(cli): scaffolded projects validate/run with zero install (no bun required)#1113

Merged
buremba merged 2 commits into
mainfrom
feat/onboarding-followups
May 28, 2026
Merged

fix(cli): scaffolded projects validate/run with zero install (no bun required)#1113
buremba merged 2 commits into
mainfrom
feat/onboarding-followups

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 28, 2026

Why

User feedback after #1110: "we don't rely on people using bun when they have lobu."

A freshly-scaffolded lobu init project couldn't lobu validate (or lobu run) until the user ran bun install to populate node_modules so jiti could resolve @lobu/cli/config. That's a manual package-manager step we shouldn't require — the user already has the CLI.

What

  • packages/cli/src/commands/_lib/apply/desired-state.ts (loadProjectConfig): alias @lobu/cli/config and @lobu/connector-sdk to the running CLI's own copies via jiti's alias option (resolved with import.meta.resolve). The "Run bun install …" error message is removed; a fresh init project now validates/runs with zero install. Shared loader, so validate / run / chat / doctor / memory seed all benefit.
  • skills/lobu/SKILL.md — slim to existing-project + memory (drop First-Time Setup, now owned by the scaffolded AGENTS.md + landing prompt). This is the change that didn't land in the feat(cli): teach conventions via scaffolded AGENTS.md, drop skill-install from setup prompt #1110 squash (the slim commit was committed locally but never pushed before merge); reapplying here.
  • AGENTS.md.tmpl — align the provider example with what lobu init actually generates (id: "claude", not the anthropic alias) — the doc drift the live cold-start flagged.

How verified

Live test: a config under $HOME/.lobu-test-noinstall — confirmed zero node_modules anywhere in the ancestor treelobu validate returns "lobu.config.ts is valid". Before this PR the same setup errors with the manual bun install requirement.

Pre-commit tsc --noEmit + biome green.

…required)

Onboarding follow-ups to #1110, addressing user feedback that the lobu CLI
should not require users to invoke bun (or any package manager) by hand.

- desired-state.ts (loadProjectConfig): alias `@lobu/cli/config` and
  `@lobu/connector-sdk` to the running CLI's own copies via jiti's `alias`
  option (resolved with `import.meta.resolve`). A fresh `lobu init` project
  now validates/runs with no `bun install` step — the user has the CLI,
  that's enough. Drops the "Run `bun install` ..." error message; a real
  resolution failure still surfaces verbatim.
- skills/lobu/SKILL.md: slim to existing-project + memory; drop First-Time
  Setup (now owned by the scaffolded AGENTS.md + landing prompt). This is
  the change that didn't land in the #1110 squash (the slim commit didn't
  push before merge); reapplying here.
- AGENTS.md.tmpl: align the provider example with what `lobu init`
  generates (`id: "claude"`, not the `anthropic` alias; real model id).

Verified: `lobu validate` on a config under $HOME with no node_modules
anywhere in the ancestor tree → "lobu.config.ts is valid" (was: "Run `bun
install`..." error). tsc + biome green on rebuild.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@buremba, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 18 minutes and 37 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ac94b95-3949-4936-80fa-8ea02f04abf8

📥 Commits

Reviewing files that changed from the base of the PR and between 25abc9f and ec0f908.

📒 Files selected for processing (4)
  • Makefile
  • packages/cli/src/commands/_lib/apply/desired-state.ts
  • packages/cli/src/templates/AGENTS.md.tmpl
  • skills/lobu/SKILL.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/onboarding-followups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@buremba buremba merged commit d72d49a into main May 28, 2026
19 of 20 checks passed
@buremba buremba deleted the feat/onboarding-followups branch May 28, 2026 02:53
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

buremba added a commit that referenced this pull request May 28, 2026
Removes the last user-machine bun requirement. `lobu apply`'s connector-deps
install previously hard-failed with "install bun (https://bun.sh)" if bun
wasn't on PATH; this was the one path #1113 didn't cover.

ensure-deps-installed.ts: prefer bun (faster) when present, fall back to
`npm install --ignore-scripts --no-audit --no-fund` (Node ships npm so it's
always available). Honour an existing lockfile — `package-lock.json` keeps
npm, `bun.lock` keeps bun — so switching installers doesn't churn formats.
`installIsStale` now compares mtime against whichever lockfile exists.

Drop the `hasBun()`-or-throw branch and the "install bun" error message.

AGENTS.md: updated the Connectors line to reflect the fallback.

Aligns with the principle from #1113: users with the lobu CLI shouldn't be
required to install bun for any documented command path.
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.

2 participants