Emoji Searcher
I have been googling emojis and manually copying them to my clipboard.
Except for Slack + GitHub, there the : + autocomplete works great. For other tools, for example Facebook or plain blog / email writing, I needed a better way.
So here is a tool to look up emojis by text from the command line and automatically copy matching ones to the clipboard (using the awesome pyperclip tool).
By default it takes the first match in case there are multiple matching emojis. However if you append a dot (.) to a word you get to choose which emoji gets copied. You can also use a .preferences file to store overriding emojis or ones this tool does not provide.
I hope you enjoy this tool and don't hesitate to reach out to me by email: bob@pybit.es or just open an issue / open a PR if you see any opportunity for improvements.
How to install and run it
It's published on PyPI, so the easiest way to run it is with uvx — no clone, no virtualenv:
# search from the cli (copies the match to your clipboard)
$ uvx --from emojisearcher emo bicep
Copied 💪 to clipboard
$ uvx --from emojisearcher emo snake
Copied 🐍 to clipboard
$ uvx --from emojisearcher emo tada
Copied 🎉 to clipboard
Run it without arguments for interactive mode (handy when there are multiple matches and you want to pick one):
$ uvx --from emojisearcher emo
------------------------------------------------------------------------------------
Type one or more emoji related words ...
End a word with a . if you want to select an emoji if there are multiple
matches, otherwise the first match will be picked. Type 'q' to exit.
> snake
Copied 🐍 to clipboard
> grin.
1 😺
2 😸
3 😀
4 😃
5 😄
6 😅
7 😆
8 😀
9 😁
Select the number of the emoji you want: 4
Copied 😃 to clipboard
> q
Bye
Ease of use: make a shell alias
Typing uvx --from emojisearcher emo every time is a mouthful, so wrap it in a shell alias (same idea as uvx --from pybites-search search):
# .zshrc
function emo {
uvx --from emojisearcher emo "$@"
}
$ source ~/.zshrc
$ emo snake
Copied 🐍 to clipboard
# or get multiple emojis at once
$ emo snake bicep tada heart fire
Copied 🐍 💪 🎉 💓 🔥 to clipboard
After sourcing your .zshrc you can get emojis copied to your clipboard fast using emo bicep, emo tada etc.
Preferred emojis
Sometimes you don't get a match:
$ emo ninja
No matches for ninja
Or you get way too many:
$ emo heart.
1 💓
2 🖤
...
...
35 😻
36 😍
Select the number of the emoji you want: 36
Copied 😍 to clipboard
For these cases you can create a .preferences file to map words to specific emojis — missing ones, or overrides that take precedence over the default match.
Since you run the tool with uvx from any directory, point the EMOJI_PREFERENCES environment variable at an absolute path:
$ export EMOJI_PREFERENCES=$HOME/.emoji_preferences
A preferences file looks like this:
$ cat $EMOJI_PREFERENCES
ninja:🥷 # missing (and much needed)
# overrides
eyes:😍 # replaces default 😁
heart:❤️ # replaces default 💓
hearts:💕 # replaces default 💞
# easier to remember
idea:💡 # also matches "bulb"
# words in another language
bliksem:⚡️ # this is Dutch
faster:🏃
Note that you can use (inline) comments.
Now with the preferences in place your shiny new emojis kick in first 🎉
$ emo heart
Copied ❤️ to clipboard
(no more 💓)
Enjoy!
Running the tests and other tools
To hack on the code, clone the repo and use uv:
$ git clone git@github.com:bbelderbos/emojisearcher.git
$ cd emojisearcher
$ uv run pytest
$ uv run ruff format .
$ uv run ruff check .
$ uv run ty check .
Rich
Around 0.0.5 we started using rich to retrieve the list of emojis, it seems a bit more accurate (e.g. our beloved tada 🎉 emoji was missing before!).
OS alternatives
While sharing this on Twitter I learned about other ways to get emojis (thanks Matt Harrison):
-
Windows: Windows logo key + . (period)
-
Mac: CTRL + CMD + Space
Trying this on Mac, this does require the mouse though and it does not copy the emoji to your clipboard.
Metadata
Release files for emojisearcher 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| emojisearcher-0.7.0.tar.gz | 4.7 kB | Without provenance | Details for emojisearcher-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emojisearcher-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for emojisearcher-0.7.0-py3-none-any.whl |
Total release size: 10.9 kB
Release files / emojisearcher-0.7.0.tar.gz
| Download URL | emojisearcher-0.7.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75a9c4ba1347cdc497b2f69995c1cf6022bd5b8082b1c53beb37298868602acb
|
|
BLAKE2b-256 checksum How to use checksums |
54ce3578b4e4ef9cb1fa027a848cf3c50a5b10dee7ac8fd4a253a89357b0c13f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / emojisearcher-0.7.0-py3-none-any.whl
| Download URL | emojisearcher-0.7.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
963b2eda663d3a9d9fc13217a584a2ff30634fb45ebb956a061bc05e7cb70687
|
|
BLAKE2b-256 checksum How to use checksums |
e030c2e47c22815540dec08abbbc858e1bd4d6608a3bb0af582e1c936d171dcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for emojisearcher 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.