Skip to main content

GitHub Workflow Status PyPI version PyPI pyversions License: MIT

emoji-fzf

Small utility for manipulating emojis via fzf's --preview hook!

Installation

  1. Install fzf if you don't have it already to use its preview browser:

    https://github.com/junegunn/fzf#installation

  2. Install the latest release of emoji-fzf from pypi:

    pip install emoji-fzf
    

See emoji-fzf --help for supported commands.

This project allows you to install the tool in an isolated environment: https://github.com/pipxproject/pipx

zsh plugin

There's an excellent zsh plugin available, see here (thanks @pschmitt !): https://github.com/pschmitt/emoji-fzf.zsh

Manually

Shell alias

You could add a shell alias like the following to your shell init script:

# if you aren't installing to a virtual env, you may need to add this to path
# (if it wasn't already) to access the tool from a pip installation
export PATH=$PATH:~/.local/bin

# add me to your ~/.bashrc or ~/.zshrc or whatnot
alias emoj="emoji-fzf preview | fzf -m --preview "emoji-fzf get --name {1}" | cut -d " " -f 1 | emoji-fzf get"
# to copy to xclip system keyboard (on mac use pbcopy) after selecting
emoj | xclip -selection c

vim

You can also add the following to a ~/.vimrc file (apologies for the kludgy vimscript, I'm not great at it), to enable C-e to open the emoji picker and insert the selected emoji:

" Use emoji-fzf and fzf to fuzzy-search for emoji, and insert the result
function! InsertEmoji(emoji)
    let @a = system('cut -d " " -f 1 | emoji-fzf get', a:emoji)
    normal! "agP
endfunction

command! -bang Emoj
  \ call fzf#run({
      \ 'source': 'emoji-fzf preview',
      \ 'options': '--preview ''emoji-fzf get --name {1}''',
      \ 'sink': function('InsertEmoji')
      \ })
" Ctrl-e in normal and insert mode will open the emoji picker.
" Unfortunately doesn't bring you back to insert mode 😕
map <C-e> :Emoj<CR>
imap <C-e> <C-o><C-e>

Alternative setup

If you prefer not to use fzf's preview feature and have the emojis appear before their aliases you can use the following alias instead:

alias emoj="emoji-fzf preview --prepend | fzf | awk '{ print \$1 }'"

Custom emoji aliases

emoji-fzf uses a pre-defined set of aliases for every emoji. If you want to define your own, ie add custom aliases for some emojis you can do this via the --custom-aliases flag.

Please note that these aliases will be appended to the list of pre-defined aliases and not replace them.

  1. First you need to create a JSON file with the following structure:

    [
      {
        "👍": ["my-custom-alias", "good-boy"]
      },
      {
        "💯": ["epic-victory-royale"]
      }
    ]
    
  2. Now you can call emoji-fzf like so:

    emoji-fzf --custom-aliases /path/to/your-custom-aliases.json preview
    

Development/testing

The full test infrastructure is:

  • uv for Python version and environment management
  • tox to run the tests + build checks
  • check-wheel-contents for built wheel sanity

To run the full test suite locally (requires uv):

uvx --with tox-uv tox

Publishing

uv build && uv publish --token=$PYPI_TOKEN

Metadata

Release files for emoji-fzf 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emoji-fzf 0.12.0
File Size Uploaded
emoji_fzf-0.12.0.tar.gz 371.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for emoji-fzf 0.12.0
File Interpreter ABI Platform
emoji_fzf-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 457.5 kB

Release files / emoji_fzf-0.12.0.tar.gz

Download URL emoji_fzf-0.12.0.tar.gz
Size 371.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1341aab9a452d23a08fef5b1e52214d56bba60623c9d4f595a0e05bcbc4b10f5
BLAKE2b-256 checksum
How to use checksums
5b4a329fad48e11be47a94647dae34035c0a485a708bec8195d42931d016b535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / emoji_fzf-0.12.0-py3-none-any.whl

Download URL emoji_fzf-0.12.0-py3-none-any.whl
Size 85.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d484733b9e0e5accd919afd78e03b1497d32f7bb687eb06238eecc89525c9ab
BLAKE2b-256 checksum
How to use checksums
6c35cf1485700af813f7f41297931f9ed1b896a958e059ffffa862a10a3d6aa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.0

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page