CLI ยท Shell

findcmd

CLI tool for fast command-history search with interactive mode, multi-term search, and clipboard support for Bash and Zsh.

v1.0.1 GitHub
Shell
Script
Bash + Zsh
Supported Shells
Linux + macOS
Platforms
50
Results
01

Features

  • Fast keyword matching with multi-term search
  • Interactive selection mode
  • Auto-deduplication of results
  • Case-insensitive search (with case-sensitive option)
  • Color-coded output
  • Clipboard integration
02

Usage

# Basic search
findcmd docker

# Multi-term search (AND logic)
findcmd git commit push

# Interactive mode - select and copy to clipboard
findcmd -i kubectl

# Case-sensitive search
findcmd -c MyFunction

# Limit results
findcmd -n 20 npm
03

How It Works

  • Reads shell history file (.bash_history or .zsh_history)
  • Applies filtering based on search terms
  • Displays matching commands with interactive selection
  • Uses system clipboard tools (xclip/xsel on Linux, pbcopy on macOS)
04

Installation

# Clone the repository
git clone https://github.com/abhijitkrm/findcmd.git
cd findcmd

# Run the install script
./install.sh

# Or manually copy to your PATH
cp findcmd /usr/local/bin/
chmod +x /usr/local/bin/findcmd
05

Dependencies

  • Bash or Zsh shell
  • Standard Unix utilities (grep, sed)
  • xclip or xsel on Linux for clipboard
  • pbcopy on macOS (built-in)