1 unstable release
new 0.1.0 | Jan 17, 2025 |
---|
#1882 in Command line utilities
48KB
1.5K
SLoC
Korah: A CLI Utility for Natural Language Queries
Korah is a powerful yet user-friendly command-line utility that simplifies complex tasks using natural language queries. Currently, it includes tools for file searching and process monitoring, with plans to expand its capabilities in the future.
Currently Supported Tools
Find Files
Quickly locate files and directories on your local file system using flexible search criteria:
- Name patterns: Match files or directories by name.
- Content patterns: Search within file contents using regular expressions.
- Search directory: Specify the directory to search in.
- File type: Filter by files, directories, or symlinks.
- Size range: Define minimum or maximum file sizes.
- Timestamps: Filter by creation or modification time within a specified range.
Find Processes
Easily filter and monitor running processes on your operating system, with options for detailed or summarized output:
- Name patterns: Match processes by name using regular expressions.
- CPU usage: Specify minimum or maximum CPU consumption percentages.
- Memory usage: Filter by RAM usage range.
- Disk I/O: Set limits on data read from or written to disk.
- Network ports: Filter processes using specific TCP or UDP ports.
Examples
korah 'find videos on the desktop'
{"path":"/Users/john.smith/Desktop/foo.mkv"}
{"path":"/Users/john.smith/Desktop/bar.avi"}
korah 'find processes with "gram" in name'
{"name":"Telegram","pid":25537}
Installation
- Run
cargo install korah
. - Copy
korah.toml
into~/.config
.
With Ollama LLM Backend
- Install Ollama.
- Choose and install a model to be used, e.g.
qwen2.5
. - Make sure the
ollama
LLM API and the model are configured inkorah.toml
.
With OpenAI LLM Backend
- Make sure the
open_ai
LLM API, model and key are configured inkorah.toml
.
Dependencies
~10–20MB
~281K SLoC