Skip to content

feat(macos): one install for the fl command and the Finder menu, with clearer output - #27

Merged
crcatala merged 2 commits into
mainfrom
feat/macos-one-install
Oct 22, 2026
Merged

crcatala merged 2 commits into
mainfrom
feat/macos-one-install

Conversation

@crcatala-vps

Copy link
Copy Markdown
Collaborator

Summary

On a Mac, the curl installer is now the install: it gives you the fl command in Terminal and the Finder menu, from the same standalone binary. Before, it installed only the Finder side and kept fl off PATH on purpose (it assumed you had fl from npm), so after installing, typing fl found nothing.

Changes

macos/install.sh

  • Links ~/.local/bin/fl and ~/.local/bin/flashlink to ~/.local/share/flashlink/bin/fl (the binary the Quick Actions already run). One copy, so Terminal and Finder are always the same version, and nothing depends on Node (a Node upgrade can't break it).
  • Never overwrites an fl/flashlink it didn't create (reports "left alone"); refreshes its own links, including on a re-run without options, so re-running fixes a 0.0.2 install.
  • Says which fl the terminal will run: ✓ this one / ~/.local/bin isn't on PATH (prints the exact line for ~/.zshrc or ~/.bash_profile) / another fl comes first (names it and its version, suggests npm uninstall -g flashlink).
  • Records the terminal's fl/node folders (quick-action-path) only when there is no standalone binary (the clone/dev setup); the binary needs none of it.
  • New output: grouped steps (==> The fl command, ==> Finder integration), ✓ / ! lines with ~/ paths, colors only on a terminal (NO_COLOR and TERM=dumb respected), and a Next steps list that includes fl init only while no endpoint is set and spells out the full path to fl if it isn't on PATH yet. Problems go to stderr.
  • Drops the redundant flashlink alias next to the binary (removed on upgrade).

macos/uninstall.sh: also removes the two links, but only when they point at the binary.

Docs: docs/MACOS.md restructured around the one-command install (what goes where, after installing, fl: command not found, coexisting with npm fl, update/uninstall); the own-fl + login-shell lookup moved to "From a clone (development)". README step 2 and docs/CLI.md now lead with the Mac installer and keep npm for Linux. ARCHITECTURE and CHANGELOG (Unreleased) updated. macos/qa.sh updated for the new layout.

Example output (on a terminal it's colored)

flashlink installer

==> Downloading the latest release (darwin-arm64)
  ✓ verified       against the release's SHA256SUMS

==> The fl command
  ✓ installed      fl 0.0.3 (abc1234), ~/.local/share/flashlink/bin/fl
  ✓ linked         ~/.local/bin/fl, ~/.local/bin/flashlink
  ✓ on your PATH   typing `fl` runs it

==> Finder integration
  ✓ Quick Action   Share via flashlink
  ✓ Quick Action   Share via flashlink (default lifetime)
  ✓ wrapper        ~/.local/bin/fl-quick
  ✓ notifier       ~/.local/share/flashlink/notify/flashlink.app
  ✓ checked        a Quick Action can run fl

Next steps
  1. Connect fl to your Worker (asks for your upload token):
       fl init --endpoint https://<your worker>
  2. Turn on the Finder menu (first time only):
       System Settings → Keyboard → Keyboard Shortcuts… → Services → Files and Folders,
       then tick "Share via flashlink" (and "(default lifetime)" if you want it).
  3. Share a file:
       Terminal: fl up FILE
       Finder:   right-click a file → Quick Actions → Share via flashlink
  The first notification may ask for permission (System Settings → Notifications → flashlink).
  Update: run the same install command again. Help: https://github.com/crcatala/flashlink/blob/main/docs/MACOS.md

Testing

  • pnpm verify passes (488 tests). New installer tests: on PATH; not on PATH (zsh and bash hints); another fl first; foreign ~/.local/bin/fl files/links left alone by install and uninstall; re-run over the 0.0.2 layout; next steps with and without an endpoint; no color codes in piped output.
  • Ran under bash --posix (macOS /bin/sh) and dash; under a pseudo-terminal: colors on, NO_COLOR=1: off. shellcheck clean on install, uninstall and qa.
  • Not run on a real Mac yet (this was built on Linux): worth one sh macos/install.sh --binary … or, after release, the curl command, plus sh macos/qa.sh.

🤖 Generated with Claude Code

crcatala-vps and others added 2 commits October 22, 2026 08:27
… clearer output

The installer now links fl and flashlink in ~/.local/bin to the standalone binary the Quick Actions run, so one install gives Terminal and Finder the same fl with no Node dependency. It never overwrites an fl it did not create, reports when ~/.local/bin is not on PATH (with the line to add) or another fl comes first, and records the terminal's fl/node folders only when there is no standalone binary. Output is grouped into steps with colors on a terminal (NO_COLOR respected) and ends with tailored next steps. Uninstall removes only links that point at the binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Christian Catalan <crcatala@gmail.com>
… setup to development

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Christian Catalan <crcatala@gmail.com>
@crcatala
crcatala merged commit 128a9d0 into main Oct 22, 2026
5 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