Skip to content

fix(installer): install maestro-relay CLI shim on PATH#43

Merged
chr1syy merged 3 commits into
mainfrom
fix/install-cli-shim
May 29, 2026
Merged

fix(installer): install maestro-relay CLI shim on PATH#43
chr1syy merged 3 commits into
mainfrom
fix/install-cli-shim

Conversation

@chr1syy

@chr1syy chr1syy commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #42. The curl-pipe installer was only symlinking the *-ctl service wrappers, so the user-facing maestro-relay send … CLI was missing from PATH on a fresh install — even though README and CLAUDE.md document it as the agent → chat entrypoint. The bin entries in package.json only materialize via npm install -g / npm link, not the tarball-based curl installer.

This PR adds a new install_cli step to install.sh that:

  • chmod +x's dist/cli/maestro-relay.js (which already declares #!/usr/bin/env node)
  • symlinks maestro-relay, maestro-bridge, and maestro-discord from $BIN_DIR to that entrypoint

The path table in the README gains a row for the new binary.

Test plan

  • bash -n install.sh — syntactically valid
  • Isolated smoke-test of install_cli() in a temp dir: all three shims (maestro-relay, maestro-bridge, maestro-discord) executed and forwarded argv correctly
  • Missing-entrypoint path: install_cli correctly dies with CLI entrypoint missing at …
  • npm run build produces dist/cli/maestro-relay.js with the expected #!/usr/bin/env node shebang
  • npm test — 211/211 tests pass
  • End-to-end: a fresh curl-pipe install on a clean machine puts maestro-relay on PATH

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Introduced the maestro-relay CLI for agent-to-chat use with send, notify, and status commands; also available as maestro-bridge and maestro-discord.
  • Documentation

    • Quick start updated to document the new CLI path and commands; obsolete back-compat note removed.
  • Chores

    • Installer now creates CLI shims/aliases earlier in setup and removes legacy *_ctl aliases.

Review Change Stack

The curl-pipe installer was only symlinking the *-ctl service wrappers,
leaving the user-facing CLI (`maestro-relay send …`) unreachable on a
fresh install — even though README and CLAUDE.md document it as the
agent → chat entrypoint. `npm install -g` would publish the package.json
`bin` entries, but tarball-based installs skip that path.

Wire the shim ourselves in install.sh: chmod +x the dist/cli entrypoint
(which already declares `#!/usr/bin/env node`) and symlink
`maestro-relay`, `maestro-bridge`, and `maestro-discord` into BIN_DIR.

Fixes #42.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

More reviews will be available in 20 minutes and 54 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b5fed34c-e18b-4571-af8d-77c084cb1c0d

📥 Commits

Reviewing files that changed from the base of the PR and between 056f59c and 57cbdc8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • AGENTS.md
  • README.md
  • bin/maestro-relay-ctl.sh
  • docs/api.md
  • install.sh
  • package.json
  • src/cli/maestro-relay.ts
📝 Walkthrough

Walkthrough

The installer now creates executable symlinks for the maestro-relay CLI and its aliases (maestro-bridge, maestro-discord) in BIN_DIR, ensuring they are available on PATH after installation. The README documents the newly installed binary location and its subcommands.

Changes

CLI Installation

Layer / File(s) Summary
CLI shim installation function
install.sh
install_cli() makes dist/cli/maestro-relay.js executable and creates symlinks for maestro-relay, maestro-bridge, and maestro-discord in BIN_DIR.
CLI installation in installer flow
install.sh
main() invokes install_cli after install_ctl and before setup_voice to wire the user-facing CLI early in the install sequence.
CLI path documentation & ctl usage text
README.md, bin/maestro-relay-ctl.sh
Quick start table adds a row documenting the ~/.local/bin/maestro-relay binary path, subcommands (send, notify, status), and aliases (maestro-bridge, maestro-discord). The ctl script usage output removes the now-omitted preserved-legacy-aliases line.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A shim and a symlink, now bound to the path,
The CLI takes flight with a clean aftermath,
From dist to ~/.local/bin the relay shall go,
With aliases dancing, both bridge and maestro! 🎭

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(installer): install maestro-relay CLI shim on PATH' directly summarizes the main change—adding CLI shim installation to the installer.
Linked Issues check ✅ Passed The PR fulfills the primary coding requirements from issue #42: it installs the maestro-relay CLI shim on PATH by symlinking the executable JS entrypoint into BIN_DIR with proper aliases.
Out of Scope Changes check ✅ Passed All changes directly address the linked issue: install.sh gains CLI shim installation, README is updated to document the new CLI binary location, and legacy alias references are cleaned up from help text.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/install-cli-shim

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.

@chr1syy

chr1syy commented May 28, 2026

Copy link
Copy Markdown
Collaborator Author

The direction here conflicts with the current naming decision: we only want maestro-relay-ctl as the supported control entrypoint, and both maestro-discord and maestro-bridge are stale now.

This PR adds or continues support for legacy control aliases in the wrong direction:

  • install.sh still provisions maestro-bridge-ctl and maestro-discord-ctl alongside maestro-relay-ctl
  • README.md still documents those aliases as supported

I think we should tighten this instead:

  • install only maestro-relay-ctl for the control surface
  • remove legacy *-ctl aliases from installer, uninstall, help text, and docs

Separate question: the agent-facing chat CLI (maestro-relay send|notify|status) can be decided independently. But if the rename is meant to be complete there too, then the same cleanup should apply to maestro-discord / maestro-bridge non-ctl shims as well.

chr1syy and others added 2 commits May 29, 2026 10:00
Chris flagged on PR #43 that maestro-relay-ctl is the single supported
control entrypoint; the maestro-bridge-ctl and maestro-discord-ctl
aliases should not be provisioned or documented.

- install.sh: stop creating the *-ctl alias symlinks; scrub any
  leftover ones on upgrade, mirroring the existing systemd/launchd
  legacy-unit cleanup pattern
- bin/maestro-relay-ctl.sh: drop the "(Aliases: …)" line from usage()
  (uninstall still removes leftover *-ctl symlinks)
- README.md: drop the "legacy aliases still work" sentence

The maestro-bridge / maestro-discord non-ctl shims on the agent-facing
CLI side are left alone for now; that direction is still open per the
review comment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per Chris's follow-up on PR #43: only maestro-relay remains; the
non-ctl shims are dropped to complete the rename started by the
previous *-ctl cleanup.

- install.sh: install_cli() symlinks only maestro-relay and scrubs
  leftover maestro-bridge / maestro-discord symlinks on upgrade
- package.json: drop maestro-bridge / maestro-discord from bin and
  scripts (package-lock.json regenerated)
- src/cli/maestro-relay.ts: remove the "Aliases: …" line from
  ROOT_USAGE
- bin/maestro-relay-ctl.sh::cmd_uninstall: also rm -f the legacy
  maestro-bridge / maestro-discord shims (plus the new maestro-relay
  shim) so uninstall leaves no stale binaries
- README.md, AGENTS.md (CLAUDE.md symlink), docs/api.md: drop "alias
  preserved for back-compat" mentions; migration note now points
  callers at maestro-relay

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chr1syy chr1syy merged commit 67e737c into main May 29, 2026
2 of 3 checks passed
@chr1syy chr1syy deleted the fix/install-cli-shim branch May 29, 2026 21:14
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.

install.sh does not install the maestro-relay CLI shim; docs assume it is on PATH

1 participant