cheap-search
Lightweight, agent-facing CLI for provider-specific search. Wraps two backends behind one binary and ships two Claude Skills that teach a coding agent when and how to call it.
cheap-search
├── grok-search # xAI / Grok — web + X (Twitter)
└── codex-search # local Codex CLI passthrough
The agent picks the provider explicitly. There is no automatic routing.
Why
Built-in agent search (Claude WebSearch, etc.) is fine for generic lookups. cheap-search exists for the cases where you specifically want Grok's view of the web, Grok's read of X/Twitter, or Codex's grounding — and you want the agent to invoke the provider you asked for, not pick one for you.
Install
macOS (Apple Silicon) / Linux (x64, arm64)
curl -fsSL https://raw.githubusercontent.com/AirswitchAsa/cheap-search/main/scripts/install.sh | sh
Anywhere with Python 3.13
uv tool install cheap-search # or: pip install cheap-search
Ephemeral (no install)
uvx --from cheap-search cheap-search --help
Configure
Grok needs an xAI API key. Either:
export XAI_API_KEY=xai-...
or persist it locally with the CLI (stores at ~/.config/cheap-search/config.toml, mode 0600):
cheap-search grok apikey set # prompts with hidden input
echo "$KEY" | cheap-search grok apikey set -
cheap-search grok apikey status
cheap-search grok apikey unset
Env wins when both are set.
Codex handles its own auth — codex login once.
Use
cheap-search grok web "latest stable Python release"
cheap-search grok x "xAI announcements" --from 2026-05-01
cheap-search codex "look up the OpenAI Responses API web search syntax"
cheap-search doctor # verify local setup
cheap-search providers # list supported providers
Pass -o json for agent-parsable output:
{
"answer": "…",
"model": "grok-4.3",
"tool_kind": "web",
"citations": [{"url": "https://…", "title": "…"}]
}
For codex, trailing args after -- are forwarded:
cheap-search codex "<query>" -- --skip-git-repo-check -m gpt-5-codex
Skills
Two skills under skills/:
grok-search— fires only when the user explicitly names Grok / xAI / X / Twitter.codex-search— fires only when the user explicitly names Codex.
Each skill bundles scripts/ensure-cheap-search.sh which resolves the bundled binary, falls back to uvx --from cheap-search cheap-search, and only complains if neither is available.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Usage error |
| 2 | Missing configuration (no API key / no codex binary) |
| 3 | Provider failure (network, 4xx/5xx, codex non-zero) |
Agents can branch on these to choose between "tell user to configure" and "surface stderr."
Specification
The behavioral contract lives as a DOG document graph under docs/. Browse the project index for actors, behaviors, components, and data definitions. The implementation is built to match — lint stays clean: dog lint docs.
Development
git clone https://github.com/AirswitchAsa/cheap-search
cd cheap-search
uv sync
# Unit tests (no network):
uv run pytest -m "not live"
# Full matrix incl. live xAI + codex calls (costs ~$0.10 in xAI tool fees):
echo 'XAI_API_KEY=xai-...' > .env
uv run pytest
CI is build-only (manual workflow_dispatch); tests are run locally with a real API key. See .github/workflows/release.yml.
License
MIT. See LICENSE.
Metadata
Release files for cheap-search 2026.5.17
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 | Actions |
|---|---|---|---|---|
| cheap_search-2026.5.17.tar.gz | 68.4 kB | Without provenance | Details for cheap_search-2026.5.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cheap_search-2026.5.17-py3-none-any.whl | Python 3 | none | any | Details for cheap_search-2026.5.17-py3-none-any.whl |
Total release size: 82.1 kB
Release files / cheap_search-2026.5.17.tar.gz
| Download URL | cheap_search-2026.5.17.tar.gz |
|---|---|
| Size | 68.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7220872bd2573dc53d5055209fd22dc0332875c1daeb11e23018391c843f9e32
|
|
BLAKE2b-256 checksum How to use checksums |
c4869e8679358da49dcbc31ba63688a0f193ff91de1662abb12ab3e01d113902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cheap_search-2026.5.17-py3-none-any.whl
| Download URL | cheap_search-2026.5.17-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fbef7072b98115d320c6d67f0e2ac4b70c610b7207c7cd0ea31042128a14b63
|
|
BLAKE2b-256 checksum How to use checksums |
427850317694ee429f3aff1adde5d2d8fb2c858fa7cdb9ed7109051080bdf01c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for cheap-search 2026.5.17
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.