README.md

July 14, 2024 ยท View on GitHub

dexe

License People Stars Forks Watches Last Updated

The exe launcher ๐Ÿš๐Ÿš€

dexe in action
dexe in action

dexe, pronounced the E X E or dexy is a nix CLI launcher that helps you run any executable, alias, and function on your system.

โœจ Features

  • List all executables in yqur PATH
  • List all aliases and functions defined in your shell
  • Powerful fuzzy finding with fzf
  • Glance over help info for any available executable
  • Easily integrates with neovim, shell, tmux and other tools

โšก Setup

โš™๏ธ Requirements

  • bash, fzf

๐Ÿ’ป Installation

git clone https://github.com/2kabhishek/dexe
cd dexe
# Link dexe to a directory that's in PATH (~/.local/bin here)
ln -sfnv "$PWD/dexe.sh" ~/.local/bin/dexe

๐Ÿš€ Usage

dexe: Execute and Launch CLI Tools ๐Ÿš€โœจ

Usage: dexe [optional pass-through args]

dexe --wait-before-exit -- Wait for input before exiting
dexe -h, --help -- Display this help menu

dexe README.md -- Run selected command with README.md
dexe --verbose -- Run selected command with --verbose flag

Use the --wait-before-exit flag when you want to "hold" the session even after the command completes, useful in situations where the shell exits after command finishes.

Integrations

  • neovim:

I use dexe mapped to Leader t d in my neovim which-key config with termim.nvim

You can add it using this in your which-key config:

    t = {
        name = 'Terminal',
        d = { '<cmd>Sterm dexe<cr>', 'Exe Launcher' },
        w = { '<cmd>Sterm dexe --wait-before-exit<cr>', 'Exe Launcher, Wait' },
    },
  • tmux:

dexe is mapped to Alt + d using tmux-tilit

You can add it using this in your tmux.conf:

bind-key -n M-d run-shell "dexe"
  • zsh:

dexe is mapped to Ctrl + d in my zsh config

You can add it using this in your .zshrc

bindkey -s "^d" ' dexe^M ^M'

๐Ÿ—๏ธ What's Next

You tell me!

๐Ÿง‘โ€๐Ÿ’ป Behind The Code

๐ŸŒˆ Inspiration

Needed a quick way to run tools that runs both on macOS and Linux.

๐Ÿ’ก Challenges/Learnings

  • Writing pipes to parse all of the executables in PATH
  • Figuring out that configured aliases and functions only show up in interactive mode

๐Ÿงฐ Tooling

  • dots2k โ€” Dev Environment
  • nvim2k โ€” Personalized Editor
  • sway2k โ€” Desktop Environment
  • qute2k โ€” Personalized Browser

๐Ÿ” More Info


โญ hit the star button if you found this useful โญ

Source | Blog | Twitter | LinkedIn | More Links | Other Projects