Skip to content

feat: add CLI wrapper script#3

Merged
send merged 3 commits intomainfrom
feat/cli-wrapper
Mar 1, 2026
Merged

feat: add CLI wrapper script#3
send merged 3 commits intomainfrom
feat/cli-wrapper

Conversation

@send
Copy link
Copy Markdown
Owner

@send send commented Mar 1, 2026

Summary

  • Add bin/macnotifier shell script that wraps open -n macnotifier.app --args ... for convenient CLI usage
  • Handle -h/--help and -m validation in the wrapper so output is visible in the terminal (open -n does not connect stdout/stderr)
  • Convert --icon relative paths to absolute paths (needed because open -n changes CWD)
  • Remove /macnotifier from .gitignore (wrapper is now a checked-in source file, not a build artifact)
  • Add CLI wrapper tests to scripts/test.sh

Test plan

  • ./scripts/build.sh succeeds
  • ./scripts/test.sh passes (11/11)
  • ./bin/macnotifier -h shows usage in terminal
  • ./bin/macnotifier -m "test" sends a notification
  • ./bin/macnotifier -m "test" --icon relative/path.png resolves relative path correctly

🤖 Generated with Claude Code

Add bin/macnotifier shell script that wraps `open -n macnotifier.app
--args ...` so users can simply run `./bin/macnotifier -m "test"`
instead of invoking `open -n` directly.

The wrapper handles -h/--help and -m validation directly so that
output is visible in the terminal (open -n does not connect the
app's stdout/stderr). It also converts --icon relative paths to
absolute paths since open -n changes the working directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a checked-in CLI wrapper script to launch the macnotifier.app bundle via open -n ... --args, and extends the repo’s shell-based test suite to exercise the wrapper behavior.

Changes:

  • Introduce bin/macnotifier wrapper for open -n macnotifier.app --args ..., with help handling and --icon relative-path normalization.
  • Add wrapper-focused assertions to scripts/test.sh.
  • Stop ignoring the (now source-controlled) wrapper by removing the /macnotifier entry from .gitignore.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.

File Description
scripts/test.sh Adds basic tests to verify the wrapper exists and prints help / errors in-terminal.
bin/macnotifier New Bash wrapper that pre-handles -h and -m presence and rewrites --icon relative paths before calling open.
.gitignore Removes an ignore rule for a previously generated wrapper script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

send and others added 2 commits March 1, 2026 15:29
Golden ratio grid: bubble 672×416 (21:13≈φ), top margin 272=34B
(Fibonacci), rx=64=8B. Background #2d2d2d, bubble #c8beb4.

Add CFBundleIconFile to Info.plist so macOS recognizes the icon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Resolve symlinks so the wrapper works when invoked via symlink
  (e.g. Homebrew)
- Validate that -m has a value, not just that the flag is present
- Add tests for both cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@send send merged commit 81af639 into main Mar 1, 2026
7 checks passed
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