Privacy-first search engine for developers
Project description
🔍 devLens
Privacy-first search engine for developers — right in your terminal.
devLens is a CLI tool built on a self-hosted SearXNG instance. It ranks results by developer relevance (official docs → GitHub → StackOverflow → blogs), reads the top pages, and uses AI to give you a direct answer — no ads, no tracking.
Table of Contents
- Installation
- Search (
dlens s) - Web Search (
dlens web) - Error Search (
dlens error) - Package Lookup (
dlens pkg) - Shortcuts (
dlens save/dlens look) - Piping Errors
- Configuration
Installation
From PyPI
pip install devlens-cli
From Source
git clone https://github.com/Arya-shivam/devLens.git
cd devLens
pip install -e .
Prerequisites
devLens needs a running SearXNG instance for search:
git clone https://github.com/searxng/searxng-docker.git
cd searxng-docker
docker compose up -d
By default, devLens connects to http://localhost:8080. Change this in Configuration.
🔎 Search · dlens s
The main command. Searches with developer-focused ranking and drops you into an interactive REPL.
dlens s "python asyncio gather"
What you see:
🔍 devLens · 5 results · 0.4s
1 asyncio.gather — Python docs · Docs
docs.python.org · https://docs.python.org/3/library/asyncio-task.html
Run awaitable objects concurrently. If any awaitable is a coroutine...
2 How to use asyncio.gather — Stack Overflow · Stack Overflow
stackoverflow.com · https://stackoverflow.com/questions/...
234 votes · The key difference between gather and wait is...
3 asyncio best practices — GitHub · GitHub
github.com · https://github.com/python/cpython/...
CPython source for asyncio.tasks — gather implementation.
── o <n> open · s summarize · / <query> search · q quit ──
>
Interactive commands:
| You type | What happens |
|---|---|
1 or o 1 |
Opens result 1 in your default browser |
o 3 |
Opens result 3 in your browser |
s |
AI reads the top pages and gives you a synthesized answer |
/ new query |
Starts a new search without leaving the session |
q or Ctrl+C |
Quit |
Options
dlens s "fastapi middleware" --open 2 # skip interactive, open result 2 directly
dlens s "rust ownership" --lang rust # filter by language
dlens s "react hooks" --source docs # filter: docs, github, stackoverflow
dlens s "python decorators" --json # output raw JSON (for scripting)
dlens s "async python" --no-ai # disable AI classification
dlens s "flask routes" --limit 5 # show only 5 results
🌐 Web Search · dlens web
General internet search — no developer-specific filtering or ranking. Good for non-code questions.
dlens web "what is QUIC protocol"
dlens web "best mechanical keyboards 2026"
dlens web "coffee shops near tokyo station"
Same interactive REPL as dlens s. Same --open, --json, --limit options.
🐛 Error Search · dlens error
Paste an error message and devLens finds solutions. Optimized for StackOverflow and GitHub Issues.
dlens error "TypeError: cannot unpack non-iterable NoneType object"
dlens error "ECONNREFUSED 127.0.0.1:5432" --lang node
dlens error "segfault at 0x0" --source stackoverflow
Options
dlens error "ModuleNotFoundError: No module named 'cv2'" --lang python
dlens error "error[E0382]: borrow of moved value" --lang rust --open 1
📦 Package Lookup · dlens pkg
Find docs, repos, and registry pages for any package.
dlens pkg httpx # searches PyPI, GitHub, docs
dlens pkg httpx --lang python # adds language context
dlens pkg tokio --lang rust # finds crates.io + docs.rs
dlens pkg express --lang node # finds npmjs.com + GitHub
⚡ Shortcuts
Save commands you'll forget. Find them later with fuzzy search.
Save a command
dlens save "<command>" "<memorable tag>" [--cat <category>]
Examples:
dlens save "git log --oneline --graph --all --decorate" "pretty git log" --cat git
dlens save "docker system prune -af --volumes" "nuke docker" --cat docker
dlens save "ffmpeg -i input.mp4 -vcodec h264 -acodec aac -crf 23 output.mp4" "compress video for web" --cat ffmpeg
dlens save "ssh -L 5432:localhost:5432 user@server" "tunnel postgres" --cat ssh
dlens save "curl -s https://api.github.com/repos/:owner/:repo/releases/latest | jq '.tag_name'" "latest github release" --cat curl
Find a command · dlens look
Fuzzy matches your tags — doesn't need to be exact:
dlens look "git graph" # → finds "pretty git log"
dlens look "docker clean" # → finds "nuke docker"
dlens look "video compress" # → finds "compress video for web"
dlens look "postgres tunnel" # → finds "tunnel postgres"
What you see:
1 pretty git log [git] (match: 52%)
git log --oneline --graph --all --decorate
used 0x · last used never · id 1aec7efe
── c copy · r run · e edit · d delete · q quit ──
>
Interactive commands:
| You type | What happens |
|---|---|
c or c 1 |
Copy command to clipboard |
r or r 1 |
Execute the command immediately |
e or e 1 |
Edit the command or tag |
d or d 1 |
Delete (asks for confirmation) |
q |
Quit |
List all shortcuts
dlens shortcuts # grouped by category
dlens shortcuts --cat git # show only git shortcuts
dlens shortcuts --top # sort by most used
dlens shortcuts --recent # sort by last used
Output:
devLens shortcuts · 3 saved
docker
── nuke docker docker system prune -af --volumes
ffmpeg
── compress video for web ffmpeg -i input.mp4 -vcodec h264 ...
git
── pretty git log git log --oneline --graph --all --decorate
Delete shortcuts
dlens rm "git graph" # fuzzy find → confirm → delete
dlens rm --cat docker # delete all docker shortcuts
dlens rm --all # nuclear option (confirms first)
🔀 Piping Errors
Pipe stderr from any command directly into devLens:
python myapp.py 2>&1 | dlens # pipe a crash
cargo build 2>&1 | dlens # pipe Rust compiler errors
cat error.log | dlens # pipe a log file
npm run build 2>&1 | dlens # pipe Node errors
devLens auto-detects the error, searches for solutions, and gives an AI-generated answer.
⚙️ Configuration
Settings live in ~/.devlens/config.toml:
[search]
engine_url = "http://localhost:8080" # your SearXNG instance
default_limit = 8 # results per search
[ai]
openrouter_api_key = "sk-or-..." # for AI answers (get one at openrouter.ai)
[browser]
command = "firefox" # optional: override default browser
# command = "open -a Arc" # macOS example
Shortcuts are stored separately in ~/.devlens/shortcuts.json — human-readable, easy to back up or sync.
All Commands at a Glance
| Command | What it does |
|---|---|
dlens s "query" |
Dev search (interactive) |
dlens web "query" |
General web search |
dlens error "message" |
Error/stacktrace search |
dlens pkg <name> |
Package lookup |
dlens save "cmd" "tag" |
Save a command shortcut |
dlens look "fuzzy tag" |
Fuzzy find a saved shortcut |
dlens shortcuts |
List all saved shortcuts |
dlens rm "tag" |
Delete a shortcut |
dlens --version |
Print version |
License
MIT
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 devlens_cli-0.2.0.tar.gz.
File metadata
- Download URL: devlens_cli-0.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca9c72850810605cd5d27ed0d126766b94d7fa0a9b3b722d10ee2616ce3db57a
|
|
| MD5 |
b714da5ae95dc8fd6869061feed23804
|
|
| BLAKE2b-256 |
c6ac17c7629c94efb83f956d96016ad62515020a54265949d35cd0198396ca99
|
File details
Details for the file devlens_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: devlens_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a132c8df967cc3b990f03e95d52465272ae644e664ce67c90f319e1baecb7874
|
|
| MD5 |
e54c7e17578b96661c9dd410ca023231
|
|
| BLAKE2b-256 |
37d3a2fad3e2f04bf8e305cb4f038910ffe97feef422cffe4a7a3167a02e2ca1
|