Skip to content

feat: replace grafanactl+logcli installers with unified gcx installer - #112

Merged
fank merged 2 commits into
mainfrom
claude/gcx-installer
Aug 11, 2026
Merged

feat: replace grafanactl+logcli installers with unified gcx installer#112
fank merged 2 commits into
mainfrom
claude/gcx-installer

Conversation

@fank

@fank fank commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

Replaces the two old Grafana installers with the new unified gcx CLI.

  • Adds lib/installers/gcx.js — installs gcx from grafana/gcx GitHub release tarballs (gcx_<v>_<os>_<arch>.tar.gz) to ~/.local/bin (no Go toolchain needed), plus browser-OAuth login/config. Handles gcx's JSON current-context output in agent mode.
  • Deletes grafanactl.js and logcli.js.
  • Rewires exports (lib/index.js, lib/installers/index.js), CLI (bin/cli.js: menu entry, --gcx flag, 12→11 steps), agent docs (lib/llm/index.js), and README.md.
  • Bumps version to 1.12.0 (1.11.0 is already published without these changes).

Verification

  • npm run lint ✅ · npm run check-format
  • Smoke-tested isGcxInstalled / isGcxConfigured / getCurrentContext against local gcx
  • Documented gcx syntax verified against real CLI (gcx logs|metrics|traces|dashboards)

Follow-up

  • Publish @enthus-appdev/llm-cli-setup@1.12.0 so consumers (environment-setup) can install the gcx installer.

Add lib/installers/gcx.js (binary tarball install from grafana/gcx +
browser-OAuth login), remove the grafanactl and logcli installers, and
rewire exports, CLI menu/flags (--gcx), LLM docs, and README. Bump to
1.12.0 since 1.11.0 is already published without these changes.
@fank
fank marked this pull request as ready for review August 11, 2026 18:44

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the legacy grafanactl and logcli tools with the unified Grafana Cloud CLI (gcx), updating the installation scripts, documentation, and LLM configuration templates accordingly. The review feedback focuses on improving the robustness of the new gcx installer by handling HTTP download failures in curl, preventing cross-device link errors (EXDEV) when moving the downloaded binary, and wrapping configuration view executions in try-catch blocks to avoid CLI crashes.

Comment thread lib/installers/gcx.js Outdated
Comment thread lib/installers/gcx.js Outdated
Comment thread lib/installers/gcx.js
Address PR review feedback:
- curl -sLf so HTTP errors fail the download instead of writing an error page
- fs.copyFileSync + chmod instead of renameSync to avoid EXDEV across filesystems
- wrap 'gcx config view' in try-catch so a bad config can't crash the CLI
@fank
fank merged commit d9ab328 into main Aug 11, 2026
6 checks passed
@fank
fank deleted the claude/gcx-installer branch August 11, 2026 18:50
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