Community actions for Typefu, the macOS text expander with a selection bar. Select text in any app, and an action searches it, rewrites it, or sends it to another app.
Each action is one JSON file in actions/, named after its id. Typefu ships with every action in this repository; you can also install one yourself, or write your own and send a pull request.
- Download the action's
.json file (open it, then Download raw file).
- In Typefu, open Library ▸ Custom Actions and choose Import Actions… in the toolbar.
- Arrange it in Settings ▸ Selection Bar ▸ Layout.
Actions in this repository also appear in the Gallery sections of Library ▸ Custom Actions in the next Typefu release. Choose one and click the + button (Add to My Actions).
Typefu asks before importing an action that runs a shell script or AppleScript. Those run with your user account's access, so only import ones you trust.
{
"$schema": "https://raw.githubusercontent.com/indiegoodies/Typefu/main/schema.json",
"schemaVersion": 1,
"id": "reverse-words",
"version": "1.0.0",
"name": "Reverse Words",
"summary": "Reverses the order of the words.",
"icon": "arrow.left.arrow.right",
"category": "text",
"author": "Your Name",
"kind": "javaScript",
"script": "text.split(/\\s+/).reverse().join(\" \")",
"output": "replace"
}
| Key |
Required |
Meaning |
schemaVersion |
yes |
Always 1 for now. |
id |
yes |
A kebab-case name that never changes, such as reverse-words. The file is actions/<id>.json. |
version |
yes |
The action's version. Bump it when you change the action. |
name, summary |
yes |
Shown in the selection bar and the gallery. |
icon |
yes |
An SF Symbol name. |
category |
yes |
text, markdown, developer, search, reference, maps or apps. Groups the action in Typefu's gallery and the list below. |
author |
yes |
Your name. |
kind |
yes |
url, javaScript, shell, appleScript or shortcut. |
script |
yes |
The URL, code or Shortcut name. See below. |
output |
no |
replace (default for scripts), insertAfter, copy, show or none (default for URLs). |
requirements |
no |
When the action is offered: minLength, maxLength, regex (must match the whole selection), isURL, isEmail, isPath, includeApps, excludeApps. |
timeout |
no |
Seconds before a shell, AppleScript or Shortcut action is stopped. Default 10. |
minAppVersion |
no |
The oldest Typefu that can run the action. |
schema.json describes the format. Editors that understand JSON Schema check your file as you type when it has the $schema line.
- url: opens a URL.
{text} becomes the selection, URL-encoded. Add Typefu pipes to change it first, like {text | lower}.
- javaScript: runs in JavaScriptCore with no file or network access. The selection is in
text, and the value of the last expression is the result. You can also return a value, or define function run(text) { … }. A typefu object offers typefu.input.text, typefu.openURL(url) and typefu.copy(text). Throw an error to fail without changing the text. If the script uses return anywhere, Typefu runs it as a function body, so a return inside a callback isn't enough: return the final value at the top level, or use function run(text).
- shell: runs with
zsh. The selection is on standard input and in $EXPANDER_TEXT; standard output is the result.
- appleScript: the selection is in
selectedText; the script's result is the result.
- shortcut: runs the named Shortcut with the selection as input; its output is the result.
python3 scripts/validate.py
The same check runs on every pull request.
| Action |
What it does |
Kind |
| Alternating Case |
wRiTeS tHe SeLeCtIoN lIkE tHiS. |
JavaScript |
| Comma List |
Turns lines into a comma-separated list, or a comma-separated list into lines. |
JavaScript |
| Join Lines |
Joins the lines into one, separated by spaces. |
JavaScript |
| Remove Empty Lines |
Removes blank lines. |
JavaScript |
| Reverse Lines |
Reverses the order of the lines. |
JavaScript |
| ROT13 |
Shifts letters by 13 places. Run it again to undo. |
JavaScript |
| Shuffle Lines |
Puts the lines in random order. |
JavaScript |
| Slugify |
Turns the selection into a URL slug. |
JavaScript |
| Straighten Quotes |
Replaces curly quotes with straight ones. |
JavaScript |
| Sum Numbers |
Adds up every number in the selection. |
JavaScript |
| Wrap in Parentheses |
Wraps the selection in parentheses. |
JavaScript |
| Wrap in Quotes |
Wraps the selection in curly quotes. |
JavaScript |
| Action |
What it does |
Kind |
| Blockquote |
Quotes the selection in Markdown. |
JavaScript |
| Bullet List |
Turns lines into a Markdown bullet list. |
JavaScript |
| Checklist |
Turns lines into a Markdown checklist. |
JavaScript |
| Code Block |
Wraps the selection in a fenced code block. |
JavaScript |
| Inline Code |
Wraps the selection in backticks. |
JavaScript |
| Markdown Link |
Turns a link into a Markdown link. |
JavaScript |
| Numbered List |
Turns lines into a numbered Markdown list. |
JavaScript |
| Action |
What it does |
Kind |
| Amazon |
Searches Amazon for the selection. |
URL |
| Bing |
Searches Bing for the selection. |
URL |
| DuckDuckGo |
Searches DuckDuckGo for the selection. |
URL |
| Google |
Searches Google for the selection. |
URL |
| IMDb |
Searches IMDb for the selection. |
URL |
| Kagi |
Searches Kagi for the selection. |
URL |
| Reddit |
Searches Reddit for the selection. |
URL |
| YouTube |
Searches YouTube for the selection. |
URL |
| Action |
What it does |
Kind |
| Google Translate |
Translates the selection to English in Google Translate. |
URL |
| Merriam-Webster |
Looks up a word in Merriam-Webster. |
URL |
| Open DOI |
Opens the paper for a DOI like 10.1000/182. |
URL |
| Urban Dictionary |
Looks up slang on Urban Dictionary. |
URL |
| Wayback Machine |
Shows archived copies of a link on the Wayback Machine. |
URL |
| Wikipedia |
Looks up the selection on English Wikipedia. |
URL |
| Wolfram Alpha |
Asks Wolfram Alpha about the selection. |
URL |
| Action |
What it does |
Kind |
| Apple Maps |
Finds the selection in Apple Maps. |
URL |
| Google Maps |
Finds the selection in Google Maps. |
URL |
| OpenStreetMap |
Finds the selection on OpenStreetMap. |
URL |
| Action |
What it does |
Kind |
| Add to Things |
Adds the selection as a to-do in Things. |
URL |
| New Bear Note |
Creates a Bear note with the selection. |
URL |
| New Draft |
Creates a draft in Drafts with the selection. |
URL |
| New Mail Message |
Starts a new email with the selection as the body. |
URL |
| Run in Terminal |
Runs the selection as a command in a new Terminal window. |
AppleScript |
See CONTRIBUTING.md. By sending a pull request you agree that your action is released under the MIT License and may ship inside Typefu.