Script FAHClient on macOS

Moderators: Site Moderators, FAHC Science Team

calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

/usr/local/bin/lufah is not right.
Did you use migration assistant from an intel Mac?

Try

Code: Select all

which -a lufah
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

I recommended pipx, although getting it installed is a headache for most.

pipx ensurepath
Appends ~/.local/bin to your path in a shell file.
You need to open a new shell to see commands there. You may need a rehash.
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

You might try
pip3 uninstall lufah
pipx install lufah
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

calxalot wrote: Tue Sep 16, 2025 11:08 pm /usr/local/bin/lufah is not right.
Did you use migration assistant from an intel Mac?

Try

Code: Select all

which -a lufah
/usr/local/bin/lufah
/Users/earthsaver/.local/bin/lufah
/Users/earthsaver/.local/bin/lufah
- Ben
M1 iMac
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

I uninstalled lufah and then used pipx to install it again. Same issues. How do I connect lufah to fahclient? That seems to be an underlying issue here.
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

By default, it should connect to the local client.

What do you get with
lufah --version
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

lufah --version surfaces 0.4.1. That doesn't sound like 0.11.0 which was the package just installed. Is the lufah command not calling the right process?
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

Nope. You still have more than one installed.
The one in /usr/local/bin is probably from using homebrew pip.
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

And you have a homebrew installation inherited from an intel Mac
On Apple silicon, brew installs to /opt/homebrew
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

I see. You are correct. I deleted lufah from /usr/local/bin. What's the appropriate way to uninstall homebrew from /usr/local, ideally without losing other installed packages, before reinstalling it?
- Ben
M1 iMac
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

Having removed the duplicate lufah, lufah -dv groups now results:

DEBUG:lufah:Created FahClient("localhost:7396")
DEBUG:asyncio:Using selector: KqueueSelector
INFO:lufah:localhost:7396:Opening ws://localhost:7396/api/websocket
DEBUG:lufah:Resolved ws://localhost:7396/api/websocket to ws://127.0.0.1:7396/api/websocket
WARNING:lufah:localhost:7396:Failed to connect to ws://127.0.0.1:7396/api/websocket
[]
- Ben
M1 iMac
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

Do you see fah-client in Activity Monitor with All Processes?

There is an uninstall script that lets you specify /usr/local that is in their github repository. I have not used it. Can’t guarantee that it won’t delete anything inappropriate. I will look and post a link.

Edit: uninstaller is here: https://github.com/homebrew/install
Somewhere else I read how to save a list of what is installed so things can be easily re-installed. I can't find it right now.

Found this https://tomlankhorst.nl/brew-bundle-restore-backup/
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

Did you install fah via homebrew?
calxalot
Site Moderator
Posts: 1634
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Script FAHClient on macOS

Post by calxalot »

AI slop. Use with caution.
Prompt: migrate homebrew "macos" intel silicon

Since it's the same machine, you must do the bundle dump and uninstall before new brew install.

To migrate Homebrew from an Intel Mac to an Apple Silicon Mac, first, install the ARM version of Homebrew by running the installation command for Apple Silicon. Then, you can use brew bundle dump on your Intel Mac to create a Brewfile, which you can use to reinstall your packages on the new system.
GitHub blog.smittytone.net

Migration Steps from Intel to Apple Silicon Homebrew

Preparation
Dump Installed Packages: On your Intel Mac, run the command brew bundle dump to create a Brewfile with your installed packages. Save this file for later use.
Transfer Data: If you no longer have your Intel Mac, you can skip this step and proceed to install Homebrew on your new Apple Silicon Mac.

Install Homebrew on Apple Silicon
Run the Installer: Open Terminal on your Apple Silicon Mac and execute the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homeb ... install.sh)"
Update PATH: After installation, add Homebrew to your PATH by running:

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Uninstall Intel Homebrew
Download Uninstall Script: Use the command below to download the uninstall script:

curl https://raw.githubusercontent.com/Homeb ... install.sh --output uninstall.sh
Run the Uninstaller: Execute the uninstall script with the command:

/bin/bash ./uninstall.sh -p /usr/local

Manual Cleanup: After running the uninstaller, manually delete any remaining files in /usr/local to ensure a clean migration.

Reinstall Packages
Use Brewfile: Navigate to the directory containing your Brewfile and run:

brew bundle

This will reinstall all your previously installed packages on the new Apple Silicon Homebrew.

Final Steps
Check for Compatibility: Some packages may not yet have ARM versions. You can keep the Intel version until all necessary tools are available natively.
Run Cleanup: After migrating, run brew cleanup to remove any unnecessary files from both installations.
Following these steps will help you successfully migrate Homebrew from an Intel-based Mac to an Apple Silicon Mac.
earthsaver
Posts: 40
Joined: Fri Feb 08, 2008 6:05 pm
Location: Berkeley, CA
Contact:

Re: Script FAHClient on macOS

Post by earthsaver »

After a macOS update to 15.7 and restart, fah-client is running again and lufah -dv groups resolves:

DEBUG:lufah:Created FahClient("localhost:7396")
DEBUG:asyncio:Using selector: KqueueSelector
INFO:lufah:localhost:7396:Opening ws://localhost:7396/api/websocket
DEBUG:lufah:Resolved ws://localhost:7396/api/websocket to ws://127.0.0.1:7396/api/websocket
DEBUG:websockets.client:= connection is CONNECTING
DEBUG:websockets.client:> GET /api/websocket HTTP/1.1
DEBUG:websockets.client:> Host: 127.0.0.1:7396
DEBUG:websockets.client:> Upgrade: websocket
DEBUG:websockets.client:> Connection: Upgrade
DEBUG:websockets.client:> Sec-WebSocket-Key: oXWXwDGKFSiWCdz3Dc7hFg==
DEBUG:websockets.client:> Sec-WebSocket-Version: 13
DEBUG:websockets.client:> Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
DEBUG:websockets.client:> User-Agent: Python/3.13 websockets/15.0.1
DEBUG:websockets.client:> EOF
DEBUG:websockets.client:< EOF
DEBUG:websockets.client:= connection is CLOSED
WARNING:lufah:localhost:7396:Failed to connect to ws://127.0.0.1:7396/api/websocket
[]
- Ben
M1 iMac
Post Reply