Skip to main content

Search and run shell history with a Textual TUI

Project description

CmdFinder

CmdFinder is a terminal-based user interface (TUI) that lets you fuzzy-search, browse, and execute commands from your shell history. It’s built with Textual and RapidFuzz.

CmdFinder TUI demo

CmdFinder search view


Features

  • 🔍 Fuzzy Search: Quickly find commands even if you don’t remember the exact syntax.
  • 🐚 Shell Support: Reads history from:
    • Zsh: ~/.zsh_history
    • Bash: ~/.bash_history
  • Instant Execution: Select a command and run it immediately in your shell.
  • 🧭 Vim-like Navigation: Navigate with j / k.
  • 🕒 Timestamps: Toggle timestamps on/off.
  • 🎨 Modern TUI: Built using Textual.

Requirements

  • Python 3.10+
  • Bash/Zsh or compatible shell
  • Read access to history files

Installation

pip install cmdfinder

Run:

cmdfinder

or

cf

If the command is not found, add ~/.local/bin to PATH:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Or for zsh:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Install from Source

git clone https://github.com/pranav5127/CmdFinder.git
cd cmdfinder

(Optional) create a virtual environment:

python -m venv .venv
source .venv/bin/activate

Install in editable mode:

pip install -e .

Run:

cmdfinder

Usage

To start the TUI:

cmdfinder

Key Bindings

Key Action
j Move down
k Move up
/ Move cursor
Ctrl+s Focus search
l / Ctrl+l Focus list
t Toggle timestamps
Enter Run selected command
q Quit

Run locally:

cmdfinder

or

python -m cmdfinder.app

or

cf

License

CmdFinder is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdfinder-2.0.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdfinder-2.0.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file cmdfinder-2.0.0.tar.gz.

File metadata

  • Download URL: cmdfinder-2.0.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for cmdfinder-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a84b25a4691a689cb4aec1b7c774ce1e89839f1565236fbf422452ae58dbecff
MD5 22014134667baa50daf7af07f75994fe
BLAKE2b-256 5f4a7d2b54a8d8b5e6843ccc76097da13385596ab66c127004b3f636c90d3309

See more details on using hashes here.

File details

Details for the file cmdfinder-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: cmdfinder-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for cmdfinder-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5df9d66376ff17374042a98350a17c3dc9a241f3b01679c901101bcd701e35e4
MD5 3ab276855ae1d6e09f36e2574485bf6f
BLAKE2b-256 6ff09de34b27eb1d7c98bbcd86c84941ee8f0b92c3745ac743a9b0a5539220c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page