terch
A modular, lightning-fast CLI search engine built with Rich UI formatting and interactive keyboard navigation.
Features
- Modular Architecture: Easily plug in custom search engines (Google Custom Search API, DuckDuckGo, Tavily, etc.).
- Interactive Terminal Navigation: Move between search results using arrow keys (
Up/Down) or Vim keybindings (k/j) and pressEnterto open links in your browser. - Rich Terminal UI: Formatted result cards with ANSI hyperlinks (
OSC 8), domain badges, and custom padding. - Automatic Fallbacks: Defaults to DuckDuckGo (zero setup required) if Google API keys are not provided.
- Built with Modern Python Tooling: Managed via
uvand packaged usinghatchling.
Quickstart
Global Installation via uv (Recommended)
uv tool install terch
Global Installation via pipx
pipx install terch
Usage
Run terch (or search) directly from your command line:
# Quick search (uses DuckDuckGo by default if no keys configured)
terch "IIIT Hyderabad"
# Specify provider explicitly
terch "python rich cli" -p duckduckgo
# Limit result count
terch "latest machine learning papers" -n 3
Configuration & API Keys
terch works out-of-the-box using DuckDuckGo without requiring any API keys.
To use Google Custom Search API, set your credentials in a .env file or export them to your shell environment:
export GOOGLE_API_KEY="your_google_api_key"
export GOOGLE_CX_ID="your_custom_search_engine_id"
Or create a .env file in your working directory:
GOOGLE_API_KEY=your_google_api_key
GOOGLE_CX_ID=your_custom_search_engine_id
Adding Custom Search Providers
terch uses an extensible plugin architecture. To add a new search provider:
- Create a new class subclassing
BaseSearchProviderinsearch_cli/providers/:
from search_cli.providers.base import BaseSearchProvider
from search_cli.models import SearchResult
from typing import List
class MyProvider(BaseSearchProvider):
@property
def name(self) -> str:
return "my_provider"
@property
def display_name(self) -> str:
return "My Search Engine"
def is_configured(self) -> bool:
return True
def search(self, query: str, max_results: int = 5) -> List[SearchResult]:
# Implement API or search fetch here
return []
- Add your provider to the
REGISTRYinsearch_cli/providers/__init__.py.
Local Development
Clone & Install Dependencies
git clone [https://github.com/shrey715/search_cli.git](https://github.com/shrey715/search_cli.git)
cd search_cli
# Install dependencies and setup virtual environment
uv sync
Run Locally
uv run terch "python terminal tools"
License
Distributed under the MIT License
Metadata
Release files for terch 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| terch-0.2.0.tar.gz | 16.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| terch-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.9 kB
Release files / terch-0.2.0.tar.gz
| Download URL | terch-0.2.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cde00cade43ce1a9efda1a098f0b7e7258133e0661272c5d9d56706dd1f6576c
|
|
BLAKE2b-256 checksum How to use checksums |
7ad8b66fa2a327f7b5e05e46d74d4361684201026fd05a0f2e8620f24e6768dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / terch-0.2.0-py3-none-any.whl
| Download URL | terch-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10174b76006f2e2c34a31afe47420df99bd5816f8f62414cfda4135ab8deb553
|
|
BLAKE2b-256 checksum How to use checksums |
db08852a6817f6f6fd46d3b29d4930d7e9e58c144fe6def3265f7d0e8eb9caaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for terch 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.