Skip to Content
⌨️ TypefuYour Own Actions

Your Own Actions

An action takes the selected text, does something with it, and gives you a result. Add your own to the action menu.

Make an action

Open Actions in the sidebar, click New Action, and pick a kind. Test it on sample text under Try It.

KindGets the selection asExample
Open URL{text}, URL-encoded. Pipes work: {text | lower}https://github.com/search?q={text}
Shell ScriptStandard input and $EXPANDER_TEXT (zsh). Output is the result.tr a-z A-Z
AppleScriptThe variable selectedText. The script’s result is the result.return "Hi " & selectedText
JavaScriptThe variable text. The last expression is the result.text.split("").reverse().join("")
ShortcutThe shortcut’s input. Its output is the result.A shortcut name
  • Result: Replace the selection, insert after it, copy it, show it, or do nothing.
  • Show When: Any text, a link, an email address, a file path, or a regular expression. Also a length range and the apps it runs in (bundle identifiers, separated by commas).

New actions start hidden. Right-click one and choose Show in Action Menu; a star marks the ones in the menu.

Ready-made actions

Typefu comes with 56 actions. Show the ones you want in the menu, edit any of them, and choose Restore Original to undo your edits.

ActionWhat it does
Google, Bing, DuckDuckGo, KagiSearches the web.
YouTube, Reddit, Amazon, IMDbSearches that site.
WikipediaLooks it up on English Wikipedia.
Wolfram AlphaAsks Wolfram Alpha.

Reference

ActionWhat it does
Merriam-WebsterLooks up a word.
Urban DictionaryLooks up slang.
Google TranslateTranslates to English.
Wayback MachineShows archived copies of a link.
Open DOIOpens the paper for a DOI like 10.1000/182.

Maps

ActionWhat it does
Apple Maps, Google Maps, OpenStreetMapFinds the place on the map.

Apps

ActionWhat it does
New Mail MessageStarts an email with the selection as the body.
New Bear NoteCreates a note in Bear.
New DraftCreates a draft in Drafts.
Add to ThingsAdds a to-do in Things.
Run in TerminalRuns the selection as a command in a new Terminal window.

Markdown

ActionWhat it does
Markdown LinkTurns a link into [](link).
Bullet List, Numbered List, ChecklistTurns lines into a list.
BlockquoteQuotes each line with > .
Inline CodeWraps in backticks.
Code BlockWraps in a fenced code block.

Text

ActionWhat it does
Join LinesJoins lines with spaces.
Comma ListTurns lines into a, b, c, or back into lines.
Reverse Lines, Shuffle LinesReverses or shuffles the line order.
Remove Empty LinesRemoves blank lines.
SlugifyHello World! → hello-world
Wrap in Quotes, Wrap in ParenthesesWraps in “curly quotes” or (parentheses).
Straighten QuotesReplaces curly quotes with straight ones.
Alternating CasewRiTeS lIkE tHiS.
ROT13Shifts letters by 13. Run it again to undo.
Sum NumbersAdds up every number in the selection.

Developer

ActionWhat it does
Search GitHub, Stack Overflow, MDN, Apple DeveloperSearches that site.
Open GitHub RepoOpens owner/repo on GitHub.
Escape HTML, Unescape HTMLConverts <, >, & and quotes to and from entities.
Validate JSONShows whether the selection is valid JSON.
Toggle // Comment, Toggle # CommentComments or uncomments lines.
Unicode Code PointsShows U+0041 for each character.
Unix Timestamp to DateShows a timestamp as an ISO 8601 date.
Extract Email Addresses, Extract LinksCopies each one, one per line.

More are shared in the GitHub repo .

Share actions

Right-click an action and choose Export…. Use Import Actions… to add .json or .js files. A .js action keeps its settings in comments at the top:

// @name Reverse Text // @icon arrow.left.arrow.right // @output replace // @regex .+ // @apps com.apple.TextEdit, com.apple.Notes return text.split("").reverse().join("")

@icon is an SF Symbol name. @output is replace, insertAfter, copy, show or none. @regex and @apps are optional.

Last updated on