Command-line utility for general web search without visiting google.com
Project description
dmos-search
A lightweight command-line interface that lets you search the web without opening google.com. It uses the ddgs library to talk to DuckDuckGo under the hood and presents results directly in your terminal, optionally opening a selected link in your browser.
Prerequisites
Install uv (0.8.0 or newer). uv manages the Python runtime, virtual environment, dependencies, and packaging workflow for this project.
Installation (development)
Sync the project into a local virtual environment managed by uv:
uv sync
This creates .venv/ (ignored by git) and installs all declared dependencies plus the project
package in editable mode. uv automatically downloads a compatible Python version if your system one
does not satisfy the requires-python constraint.
Usage
Invoke the CLI through uv so that the managed environment is used:
uv run dmos-search rust async runtimes
Options
-l, --limit— number of results to display (default: 10)--region— locale code such asus-en,uk-en,de-de--safesearch—off,moderate, orstrict--timeout— HTTP timeout in seconds (default: 10)--json-output— emit the raw JSON response--open N— open the N-th result in your default browser after printing--no-browser— suppress browser opening even when--openis supplied
Examples
Show five results and open the top hit automatically:
uv run dmos-search "postgres vector" -l 5 --open 1
Emit raw JSON for piping into other scripts:
uv run dmos-search --json-output "kubernetes pod restart policies"
Use a different locale and strict safe-search:
uv run dmos-search "best museums" --region uk-en --safesearch strict
Scripts
Common project tasks are collected in the scripts/ folder and invoke uv under the hood:
./scripts/lint— run Ruff checks./scripts/fmt— apply Ruff formatting./scripts/typecheck— execute mypy./scripts/test— run pytest./scripts/check— run lint, typecheck, and tests sequentially./scripts/build— build source and wheel distributions viauv build./scripts/publish— publish to PyPI withuv publish./scripts/publish-test— publish to TestPyPI (uv publish --repository testpypi)
These scripts assume uv sync has been run. Development dependencies live in the dev dependency
group, which is enabled by default through pyproject.toml.
Dependency management
- Add a runtime dependency:
uv add requests - Add a dev dependency:
uv add --group dev pytest - Remove one:
uv remove requests - Refresh the environment from the lockfile:
uv sync
The uv.lock file captures exact versions to ensure reproducible installs.
Packaging & publishing
Build distributions:
./scripts/build
Publish to PyPI (requires an API token in UV_PUBLISH_TOKEN or UV_PUBLISH_PASSWORD):
./scripts/publish
Test uploads go to TestPyPI:
./scripts/publish-test
Notes
- DuckDuckGo limits searches to around 200 results per query; this CLI caps the request at 50 for usability.
- Opening a result uses Python's
webbrowsermodule, which respects your system's default browser configuration. - On systems with older SSL stacks (for example, Python 3.9 builds without TLS 1.3), the tool warns when it falls back to disabling certificate verification. Upgrade Python/OpenSSL to restore strict verification.
uvx usage
Because the PyPI project name now matches the console script, the zero-flag invocation works once published:
uvx dmos-search "your query"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmos_search-0.2.0.tar.gz.
File metadata
- Download URL: dmos_search-0.2.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f1aff0e99111b4455107ea3cff896da979496a5fed22830eb1924561999b67
|
|
| MD5 |
7998952b3d3c969ddb6bca682c12bcf0
|
|
| BLAKE2b-256 |
7d0401b2238f2659d0782011cf5cb5b498519881bcc84b3c47db216721d36a8c
|
File details
Details for the file dmos_search-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dmos_search-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b95d3d076bcbf6f546d472117b65804fb55f9ceb2edb359b371ec36a0cbeb52
|
|
| MD5 |
4c5cacde1c780a9c507e45cf5231d748
|
|
| BLAKE2b-256 |
ce79db2251db7103719a02e8169091ef1c833f048bff9edf484ec3eb8242f953
|