Skip to content

Update bettertouchtool extension #17660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions extensions/bettertouchtool/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ raycast-env.d.ts
.raycast-swift-build
.swiftpm
compiled_raycast_swift

.aider*
.idea*
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding a comment above these lines to indicate they are for editor/tool specific files, similar to how other sections are labeled with comments

7 changes: 7 additions & 0 deletions extensions/bettertouchtool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# BetterTouchTool Changelog

## AI Tools & Variable Commands - {PR_MERGE_DATE}

- Add Raycast AI Extension tools: search-named-triggers, run-named-trigger, get-variable-value, set-variable-value, search-action, run-action
- Rewrite of named triggers page for better performance and usability
- Add commands to get and set variables: get-variable, set-string-variable, set-number-variable
- Add new preferences for Most Used Count, Default Action for Named Trigger, and Default Action for Set Variable

## Error handling - 2024-04-28

- Update dependencies and use `runAppleScript` function from utils
Expand Down
32 changes: 27 additions & 5 deletions extensions/bettertouchtool/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# BetterTouchTool

Run [BTT](https://folivora.ai/) actions from Raycast. Be sure to activate external scripting in the BetterTouchTool preferences and optionally configure a shared secret to block unauthorized applications from scripting BTT.
This extension connects [Raycast](https://raycast.com) with [BetterTouchTool](https://folivora.ai/) (BTT), allowing you to seamlessly control and interact with BTT's powerful automation features directly from Raycast. Run named triggers, execute actions, and manage BTT variables without leaving your keyboard.

To get started, activate external scripting in the BetterTouchTool preferences. You can also configure a shared secret to prevent unauthorized applications from scripting BTT. Visit the extension preferences to enter the optional shared secret and customize your experience.

## Features

### Run BTT actions
### Commands

- **Search Named Triggers**: Find and run named triggers. The type of associated action will be displayed and in some cases you can hover over the action to see a preview of the code/file that will be executed.
- **Search Actions**: Search for predefined BTT actions and run them.
- **Get Variable Value**: Get the value of a variable from BTT (string or number).
- **Set String Variable**: Set a string variable in BTT (persistent or temporary).
- **Set Number Variable**: Set a number variable in BTT (persistent or temporary).
Comment on lines +11 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Command descriptions are inconsistent - some end with periods, others don't


### AI Tools

The extension provides several AI tools that can be used with Raycast AI:

Search for predefined BTT actions and run them.
- **Search Named Triggers**: Search for Named Triggers in BetterTouchTool.
- **Run Named Trigger**: Run a Named Trigger.
- **Get Variable Value**: Get the value of a variable from BetterTouchTool.
- **Set Variable Value**: Set the value of a variable in BetterTouchTool.
- **Search Actions**: Search for Actions in BetterTouchTool.
- **Run Action**: Run an Action in BetterTouchTool.
Comment on lines +21 to +26
Copy link
Contributor

Choose a reason for hiding this comment

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

style: AI tool descriptions are duplicates of command names without additional context or differentiation


### Named triggers
## Usage with Raycast AI

You can use natural language to interact with BetterTouchTool through Raycast AI. For example:

Find and run named triggers. The type of associated action will be displayed and in some cases you can hover over the action to see a preview of the code/file that will be executed.
- "Get the value of myVariable"
- "Set myVariable to hello world"
- "Run the trigger named 'Open Safari'"
- "Find all disabled triggers in the Helpers folder"
- "Run the Finder action"
Loading
Loading