Automate WorkBuddy Points: macOS launchd Service for Unlimited Free Credits
This tutorial shows how to install the WorkBuddy Points Assistant skill and configure a macOS launchd service to automatically claim daily check-in points and cat travel rewards every 30 minutes without keeping the WorkBuddy client open, using local authentication tokens and a custom Python script.
Install WorkBuddy Points Assistant
First, locate the "WorkBuddy Points Assistant" skill in the WorkBuddy Expert Skill Connector and install it. The skill reads the local login state, calls the daily check-in API, dispatches the cat travel task, and claims the rewards, then pushes the results to IM terminals.
How the Points Assistant Works
The assistant only requires a token stored locally. WorkBuddy's login state resides in a file on the machine. On first run, the assistant saves the decryption key to ~/.workbuddy/scripts/atrest.key. Subsequent runs read the file, decrypt the token, and directly invoke the check-in and cat travel APIs without interacting with the client. The token expires in about 28 days and is refreshed each time the client opens.
Set Up launchd Background Service
To run the assistant without the WorkBuddy client open, use macOS's built-in launchd. Place a plist file in ~/Library/LaunchAgents/; it takes effect on login, independent of the client.
Generate the plist by sending the following prompt to WorkBuddy:
Help me set up the 'WorkBuddy Points Assistant' as a macOS launchd background service, so that WorkBuddy client can be closed while still auto check-in and dispatch cat travel.
Note three points:
1. Use local login state directly (buddy_station.py checkin --travel-auto), do not configure long-lived token channel.
2. Use WorkBuddy's bundled Python absolute path, run every 30 minutes.
3. Add environment variable WORKBUDDY_ATREST_CDP=0, so that when key fails, it errors out directly, do not launch client in background.
After installation, run once and tell me the result.Parameter Explanations
checkin --travel-auto: Performs both check-in and cat travel in one run: checks status first, skips if already checked in, claims rewards if cat returned, and dispatches cat again if attempts remain. Safe to run repeatedly. WORKBUDDY_ATREST_CDP=0: Prevents the assistant from launching a background WorkBuddy instance to retrieve the decryption key when the key is unreadable. In a background task, failing fast is preferable; the error log signals when to open the client manually.
Test and Remove Service
After installation, launchd runs the script immediately. The output shows successful check-in and cat travel dispatch.
To uninstall, run:
launchctl bootout gui/$(id -u)/com.workbuddy.creditsAlternatively, ask WorkBuddy to delete the launchd service.
Remote Deployment Option
For remote servers, deploy WorkBuddy and the script to the cloud for seamless automation.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
