lean-ctx icon indicating copy to clipboard operation
lean-ctx copied to clipboard

bug: minor textual inaccuracy in restart hint

Open teadatuntud opened this issue 6 months ago • 1 comments

lean-ctx version: (run lean-ctx --version) lean-ctx 3.6.24 (official, https://github.com/yvgude/lean-ctx)

OS: (macOS / Linux / Windows) Linux

AI tool: (Cursor / Claude Code / Copilot / Crush / other) N/A -- this is run directly in the terminal

What happened: This is a follow-up to #309. Background information: I use bash exclusively, I don't have zsh installed.

Updated the version via the normal procedure. The init routine correctly advises to restart the shell or source ~/.bashrc (emphasis mine).

Then another restart hint gets printed, which seems to be out-of-sync with the previous one: Run 'source ~/.zshrc' (or restart terminal) for updated shell aliases.

What you expected: lean-ctx to not advise to source ~/.zshrc when I don't have it installed. If the last hint is a generic one (with no actual is-this-installed check), then perhaps this can simply be re-worded to not default to or only mention ~/.zshrc.

Steps to reproduce:

  1. Run lean-ctx update when update is available
  2. Read the output from the terminal

Relevant output: Note: I stripped the username from the output.

  ◆ lean-ctx updater  v3.6.23
  Checking github.com/yvgude/lean-ctx …
  Update available: v3.6.23 → v3.6.24
  Downloading lean-ctx-x86_64-unknown-linux-gnu.tar.gz …

  ✓ Updated to lean-ctx v3.6.24
  Binary: /home/<redacted_username>/.local/lib/node_modules/lean-ctx-bin/bin/lean-ctx

  Refreshing setup (shell hook, MCP configs, rules)…
  Backup: ~/.bashrc.lean-ctx.bak
  Binary: /home/<redacted_username>/.local/bin/lean-ctx
  env.sh: /home/<redacted_username>/.lean-ctx/env.sh

lean-ctx init complete (24 aliases installed)

  Disable temporarily:  lean-ctx-off
  Re-enable:            lean-ctx-on
  Check status:         lean-ctx-status
  Full uninstall:       lean-ctx uninstall
  Diagnose issues:      lean-ctx doctor
  Preview changes:      lean-ctx init --global --dry-run

  Restart your shell or run: source ~/.bashrc

For AI tool integration: lean-ctx init --agent <tool> [--mode <mode>]
  Supported: aider, amazonq, amp, antigravity, antigravity-cli, augment,
    claude, cline, codex, continue, copilot, crush, cursor, emacs, gemini,
    hermes, jetbrains, kiro, neovim, openclaw, opencode, pi, qoder,
    qoderwork, qwen, roo, sublime, trae, verdent, vscode, windsurf, zed
  Modes: mcp, hybrid  (auto-detected per agent, override with --mode)
  Updated shell hook in ~/.bashenv
  Updated agent aliases in ~/.bashrc
Neovim (mcphub.nvim) MCP already configured at ~/.config/mcphub/servers.json



  ██╗     ███████╗ █████╗ ███╗   ██╗     ██████╗████████╗██╗  ██╗
  ██║     ██╔════╝██╔══██╗████╗  ██║    ██╔════╝╚══██╔══╝╚██╗██╔╝
  ██║     █████╗  ███████║██╔██╗ ██║    ██║        ██║    ╚███╔╝ 
  ██║     ██╔══╝  ██╔══██║██║╚██╗██║    ██║        ██║    ██╔██╗ 
  ███████╗███████╗██║  ██║██║ ╚████║    ╚██████╗   ██║   ██╔╝ ██╗
  ╚══════╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝     ╚═════╝   ╚═╝   ╚═╝  ╚═╝
             Context Runtime for AI Agents


  ⟳ Restart your IDE and shell to activate the new version.
    Close and re-open Cursor, VS Code, Claude Code, etc. completely.
    The MCP server must reconnect to use the updated binary.
    Run 'source ~/.zshrc' (or restart terminal) for updated shell aliases.

teadatuntud avatar May 30 '26 11:05 teadatuntud

Fixed: Shell hints now use shell-aware detection via $SHELL env var. No more hardcoded ~/.zshrc for bash users.

yvgude avatar May 30 '26 19:05 yvgude