Skip to main content

Search and run shell history with a Textual TUI

Project description

CmdFinder

CmdFinder is a handy 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:
    • Zsh: ~/.zsh_history
    • Bash: ~/.bash_history
  • Instant Execution: Pick a command and run it straight away in your shell.
  • 🧭 Vim-like Navigation: Move around with j / k.
  • 🕒 Timestamps: Toggle timestamps on or off.
  • 🎨 Modern Interface: Built with Textual for a clean look.

Requirements

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

Installation

1. Install via pip

pip install cmdfinder

2. Setup Background Service (One-time)

Run this after installation:

cmdfinder-setup

3. Run the App

cmdfinder

or simply:

cf

Troubleshooting

If your system can't find cmdfinder or cf, add ~/.local/bin to your PATH.

Bash:

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

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 Virtual Environment

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

Install in Editable Mode

pip install -e .

After installing from source, run:

cmdfinder-setup

Usage

Start the TUI with:

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

License

CmdFinder is released under the MIT License. Enjoy!

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.1.0.tar.gz (10.6 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.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cmdfinder-2.1.0.tar.gz
Algorithm Hash digest
SHA256 ed83cda661f64e0287bcef044f6b96dfafd614a4e567d57017eaa974029a24b0
MD5 99c5cf5f62935cc2c47a695362f9bbe3
BLAKE2b-256 62c106a2f59030f5f306e29b1db4bc8f3c966460ba6788d27e3e7858df4b73fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdfinder-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d62aa4d782a0ae742a8ea03db5c08d6203124194d1a8f647fa4f93a7cee6f968
MD5 240e8d2a46e72b19b0c9e84b2a31b19e
BLAKE2b-256 a29fff25b7461107d4e1e274c13a07864e48d54a216040f6bac1622c2fc532fd

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