The magic of Google Autocomplete while you're typing. Anywhere.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The magic of Google Autocomplete while you're typing. Anywhere.


Anycomplete is an extension for Hammerspoon. Once Hammerspoon is installed (see install Hammerspoon below) you can run the following script to install Autocomplete.

$ curl -sSL | bash just clones this repository into ~/.hammerspoon, loads it into Hammerspoon and sets ⌃⌥⌘G as the default keybinding.

Manual installation

$ git clone ~/.hammerspoon/anycomplete

To initialize, add to ~/.hammerspoon/init.lua (creating it if it does not exist):

local anycomplete = require "anycomplete/anycomplete"

Alternatively, copy anycomplete.lua from this repository to wherever you keep other Hammerspoon modules and load it appropriately.

Reload the Hammerspoon config.

Install Hammerspoon

Hammerspoon can be installed using homebrew/caskroom.

$ brew cask install hammerspoon
$ open -a /Applications/

Accessibility must be enabled for Anycomplete to work.


Trigger with the hotkey ⌃⌥⌘G. Once you start typing, suggestions will populate. They can be choosen with ⌘1-9 or by pressing the arrow keys and Enter. Pressing ⌘C copies the selected item to the clipboard.

The hotkey can be changed by passing in arguments to registerDefaultBindings call (in your ~/.hammerspoon/init.lua file) such as:

anycomplete.registerDefaultBindings({"cmd", "ctrl"}, 'L')


Google might block your IP address if you use this. See #26.


No keystrokes are sent to Google until you trigger the hotkey and start typing. If you prefer DuckDuckGo, replace GOOGLE_ENDPOINT with: '' and the imap function with this:

choices = hs.fnutils.imap(results, function(result)
    return {
        ["text"] = result["phrase"],