Skip to content

feat(cli): BE_CLI_PLUGINS installs beplus CLI plugins at exact versions (BE-281) - #35

Merged
igorlamos merged 4 commits into
mainfrom
claude/cli-plugins
Nov 23, 2026
Merged

igorlamos merged 4 commits into
mainfrom
claude/cli-plugins

Conversation

@beplus-agent-claude

@beplus-agent-claude beplus-agent-claude Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

The cli action gets a BE_CLI_PLUGINS input: it installs beplus CLI plugins that the CLI doesn't bundle, each pinned to an exact version. This is the step before #34, whose desktop-release.yml will install @beplus/cli-plugin-electron this way instead of carrying Node scripts here (BE-281, I-34; the plugin is beplus/desktop#26).

What it does

- uses: beplus/setup-beplus/cli@v2
  env:
    BE_NPM_TARGET: ${{ vars.BE_NPM_TARGET }}
    BE_NPM_TOKEN: ${{ secrets.BE_NPM_TOKEN }}
  with:
    BE_NPM_AUTH: true
    BE_CLI_PLUGINS: "@beplus/cli-plugin-electron@0.1.0-next.1"
  • Every spec must be <package>@<exact version>, and every spec is checked before anything is installed. A range, a tag, a path or a missing version fails the run, for the same reason the CLI is pinned: a run must not change without a commit.
  • Each spec goes through beplus plugin install. It refuses a plugin whose @beplus/cli-sdk peer range this CLI isn't in, and a namespace that a bundled plugin or a core command already owns.
  • Then beplus plugin list --json must show that namespace loaded at that version. Otherwise the run fails, naming what is loaded instead.

Tested

  • Locally, against the released CLI 2.40.1 in a throwaway HOME:
    • five bad specs (@^0.1.0, @latest, no version, ./x.tgz, @0.1) are each refused, and nothing is installed;
    • a version the registry doesn't have fails with the CLI's own E404 message;
    • the success path (with the tarball swapped in for the registry spec) prints ✓ @beplus/cli-plugin-electron 0.0.0 → beplus electron;
    • a version mismatch fails, naming what the CLI loads.
  • In CI, test-cli.yml gets a plugins job:
    • three refusal legs, which need no token;
    • one leg that installs @beplus/cli-plugin-electron@0.1.0-next.1 from npm.beplus.cloud and runs beplus electron icons --dry-run.

⚠️ That last leg needs two things:

  1. The plugin published to prod (beplus/desktop#26, its first publish from dev, and the promotion to prod).
  2. The repository secret BE_NPM_TOKEN (prod's token) and the variable BE_NPM_TARGET=beplus.cloud. Without the secret, the leg fails and says why.

The test-cli.yml commits are Igor's to push, because the bot can't push .github/workflows: 4d55251 is pushed, and the rename to BE_CLI_PLUGINS (b5af43a) is local.

…BE-281)

A plugin the CLI does not bundle is installed after it: BE_PLUGINS takes
<package>@<exact version> specs, checks every one before anything is installed (a
range, a tag, a path or no version fails the run: CI does not float), runs
`beplus plugin install` for each, and fails unless `beplus plugin list` then
loads that namespace at that version. desktop-release.yml installs
@beplus/cli-plugin-electron this way, instead of carrying Node scripts here.

Co-Authored-By: Igor Lamos <igor@be.plus>
beplus-agent-claude Bot and others added 3 commits November 23, 2026 12:54
…alls a pinned plugin (BE-281)

Co-Authored-By: Igor Lamos <igor@be.plus>
… (Igor, A-1490)

Co-Authored-By: Igor Lamos <igor@be.plus>
Co-Authored-By: Igor Lamos <igor@be.plus>
@beplus-agent-claude beplus-agent-claude Bot changed the title feat(cli): BE_PLUGINS installs beplus CLI plugins at exact versions (BE-281) feat(cli): BE_CLI_PLUGINS installs beplus CLI plugins at exact versions (BE-281) Nov 23, 2026
@igorlamos igorlamos self-assigned this Nov 23, 2026
@igorlamos
igorlamos marked this pull request as ready for review November 23, 2026 20:04
@igorlamos
igorlamos merged commit 12068fe into main Nov 23, 2026
21 of 22 checks passed
@igorlamos
igorlamos deleted the claude/cli-plugins branch November 23, 2026 20:05
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