Skip to content

Lightweight terminal-based search tool for your own [SearXNG](https://searxng.org) instance. Works on Windows, Linux, and macOS.

Notifications You must be signed in to change notification settings

socalit/searx-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

searx-cli

Buy Me a Coffee Linux CLI Search Privacy SearXNG License

searx-cli

searx-cli demo

A fast, no-API terminal search tool for your own SearXNG instance. Works on Linux, macOS, and Windows.

This script scrapes HTML from SearXNG instead of using the JSON API (which is often rate-limited or disabled).
** IMPORTANT:** Update the DEFAULT_ENGINE in searx.py to point to your own instance.


Features

  • Search directly from your terminal
  • Clean, readable output (title, link, snippet)
  • Works on public or private SearXNG instances
  • Lightweight: no browser, no API key
  • Works even when JSON API is blocked (scrapes HTML results)

Quick Start


Install it with:

curl -s https://raw.githubusercontent.com/socalit/searx-cli/main/install-searx-cli.sh | sudo bash 

Clone + run manually:

git clone https://github.com/socalit/searx-cli cd searx-cli sudo ./install-searx-cli.sh 
  1. Clone this repo:
git clone https://github.com/socalit/searx-cli cd searx-cli 

(Optional) Edit searx.py and change this line: DEFAULT_ENGINE = "https://your-searx-instance.net"

Open the installed file:

sudo nano /usr/local/bin/searx

Find this line: DEFAULT_ENGINE = "https://your-searx-instance.net" Replace it with your server:

Run a search:

python3 searx.py "open source firewall" 

Or specify the engine dynamically:

python3 searx.py "hotel wifi audit" --engine https://your-searx-instance.net 

Install System-Wide (Linux/macOS)

chmod +x install-searx-cli.sh sudo ./install-searx-cli.sh

Then use it from anywhere:

searx "opnsense vs pfsense"

⚠️ If You See: /usr/bin/env: ‘python3\r’: No such file or directory

Run this to fix line endings:

sed -i 's/\r$//' searx.py chmod +x searx.py

Star the GitHub repo

Share it with communities

Open issues or request features

If this project saved you time or solved a problem, consider supporting development:

Buy Me a Coffee

About

Lightweight terminal-based search tool for your own [SearXNG](https://searxng.org) instance. Works on Windows, Linux, and macOS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published