English | Русский
A fast, standalone terminal search and AI assistant for Linux and macOS.
Zero external dependencies. Pure Python 3.10+.
One command downloads the standalone script to ~/.local/bin/search and makes it executable:
curl -fsSL https://raw.githubusercontent.com/ivanchik-byte/search-bash/main/install.sh | bashOther install options (pipx, npm, manual)
pipx install git+https://github.com/ivanchik-byte/search-bash.gitInstall globally via npm:
npm install -g github:ivanchik-byte/search-bashOr run directly with npx without installing:
npx github:ivanchik-byte/search-bash "how to configure nginx websocket"mkdir -p ~/.local/bin
curl -fsSL https://raw.githubusercontent.com/ivanchik-byte/search-bash/main/search -o ~/.local/bin/search
chmod +x ~/.local/bin/searchgit clone https://github.com/ivanchik-byte/search-bash.git ~/.search-bash
mkdir -p ~/.local/bin
ln -sf ~/.search-bash/search ~/.local/bin/searchMake sure ~/.local/bin is in your $PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrcRun the setup wizard on your first run:
search --setupIt walks you through selecting a provider and prompts for your API key securely (input is hidden without terminal echo).
Settings and keys are saved locally in ~/.config/search/config.json with strict 0600 file permissions.
| Provider | Default Model | Live Web Search | Best For |
|---|---|---|---|
| Google Gemini | gemini-3.5-flash-lite |
Yes (Google Search Grounding) | Fast lookups, current docs, free tier |
| Nvidia NIM | nvidia/nemotron-3.5-lightning-30b-a3b |
No | Deep reasoning and fast coding inference |
| OpenRouter | meta-llama/llama-3.3-70b-instruct |
Optional | Access to 200+ models (Claude, Llama, DeepSeek) |
| Custom / Local | User specified | No | Local Ollama, Groq, vLLM, private endpoints |
Ask technical questions right from your shell. With Gemini, responses come grounded with real Google Search results:
search "how to configure nginx reverse proxy for websockets"Use -c when you know what you want to do, but forget the syntax. It outputs the command and asks if you want to execute it:
search -c "find all files over 500MB modified in the last 7 days"find . -type f -size +500M -mtime -7 -exec ls -lh {} +
Execute command? [y/N]:
Use -a (or -d <path>) to inspect folders. It groups files, highlights the largest disk consumers, collapses clutter like node_modules or .git, and suggests what is safe to delete:
search -aAfter the overview is displayed, you can inspect candidate files directly by rank number or file path:
Inspect file content? [1-10 or file path, Enter to finish]: 1
... [AI checks file purpose and safety] ...
Delete 'dump_2026.sql'? [y/N]: y
Pipe stdout or log files directly into search to diagnose errors and stack traces:
cat /var/log/nginx/error.log | search "explain why this connection dropped"Pass files or glob patterns with -f. It handles large files with intelligent tail sampling:
search -f "*.log" "summarize errors from the last 24 hours"| Option | Description |
|---|---|
-c, --cmd |
Generate an executable shell command with confirmation prompt |
-a, --all-files |
Scan current directory and highlight cleanup candidates |
-d, --dir PATH |
Scan a specific folder structure |
-f, --file PATH |
Attach file or glob pattern (-f "*.log", -f file.txt:tail:100) |
-p, --provider NAME |
Override provider for one query (gemini, nvidia, openrouter, custom) |
-m, --model NAME |
Override model identifier for one query |
-s, --site DOMAIN |
Scope web search to a specific domain (e.g. docs.docker.com) |
-i, --interactive |
Launch interactive wizard session |
-w, --no-web |
Disable web search grounding |
-r, --raw |
Output plain text without borders or boxes |
-y, --yes |
Auto-execute generated command without confirmation |
--setup |
Run interactive provider and key setup |
--clear-cache |
Clear cached query responses in ~/.cache/search_cli/ |
I wrote search-bash because I needed to turn on my PC and log into a VM. But before doing that, I had to check something in the browser. Since I use Firefox, I just didn't want to open the browser, wait for all my tabs to restore, open a new tab, google what I needed, close that tab, kill the process via pkill (so that my previous tabs wouldn't get wiped out and force me to hit Ctrl+Shift+T later), and only then start logging into the VM. So, I built this simple and fun little CLI tool instead.
- Contributing: Read CONTRIBUTING.md for local development guidelines.
- Code of Conduct: See CODE_OF_CONDUCT.md.
- Security: For private vulnerability reporting, see SECURITY.md.
MIT
