Skip to content

bamaas/Hunt

Repository files navigation

Hunt

Hunt down anything, fast ⚡

Stop juggling find, grep, and cd. Hunt gives you one command to search files, grep content, browse directories, and jump anywhere. Preview instantly and open any file straight into your editor. Built on fzf, switch modes with a keystroke. Hunt keeps you in the flow.

hunt demo

Install

With mise (recommended)

curl -fsSL https://raw.githubusercontent.com/bamaas/Hunt/main/install.sh | bash

Or manually with mise:

# 1. Clone
git clone https://github.com/bamaas/Hunt.git ~/.hunt

# 2. Symlink config into mise conf.d to install dependencies
mkdir -p ~/.config/mise/conf.d
ln -sf ~/.hunt/.mise/config.toml ~/.config/mise/conf.d/hunt.toml
mise trust ~/.config/mise/conf.d/hunt.toml
mise install

# 3. Source
echo 'source ~/.hunt/hunt.sh' >> ~/.zshrc

Docker

docker run --rm -it -e EDITOR=vim -v "$PWD":/workspace ghcr.io/bamaas/hunt:latest

Without mise

Install the dependencies with your package manager, then:

git clone https://github.com/bamaas/Hunt.git ~/.hunt
echo 'source ~/.hunt/hunt.sh' >> ~/.zshrc

Update

curl -fsSL https://raw.githubusercontent.com/bamaas/Hunt/main/install.sh | bash

Usage

# Search in current directory
hunt

# Search in a specific directory
hunt ~/projects

Dependencies

Modes

Mode Description
files Fuzzy find files by name
grep Live ripgrep search across file contents
recent Files modified in the last 7 days
explore Browse directories with tree preview
jump Quick directory jump via zoxide

Keybindings

Keybindings adapt automatically: ctrl- on macOS/Linux, alt- in Windows Terminal.

Key Action
ctrl-f / alt-f Switch to files mode
ctrl-g / alt-g Switch to grep mode
ctrl-r / alt-r Switch to recent mode
ctrl-e / alt-e Switch to explore mode
ctrl-j / alt-j Jump to directory (zoxide)
ctrl-p / alt-p Toggle preview
enter Open file in editor (or cd into directory in explore)
esc Go up a directory (explore mode)
ctrl-y / alt-y Copy selected file path to clipboard
ctrl-c Exit

Configuration

Environment variables (all optional):

Variable Default Description
HUNT_EDITOR $EDITOR or vim Editor to open files with
HUNT_PREVIEW_POSITION right Preview position: right, left, up, down
HUNT_PREVIEW_SIZE 40 Preview size as percentage (1-99)
HUNT_DIR ~/.hunt Installation directory for Hunt

Optionally, add a short alias to your ~/.zshrc:

alias h="hunt "

Uninstall

~/.hunt/uninstall.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors