mcpField
D
ddgr

ddgr

github.com/ysm-devProductivity2394 installsUpdated 39w ago
Repository

About ddgr

ddgr is a skill for searching DuckDuckGo from the terminal using the ddgr command. It supports JSON results, time and region filters, site-specific searches, and DuckDuckGo Bangs for finding current information and resources.

Key features

  1. 01Terminal-based DuckDuckGo search
  2. 02JSON-formatted results
  3. 03Time and region filters
  4. 04Search limited to a site
  5. 05DuckDuckGo Bang searches

Use cases

  1. 01Looking up current information
  2. 02Finding documentation and tutorials
  3. 03Searching a specific site or service

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ysm-dev/ddgr-skill --skill ddgr

After installing, type/ddgrin Claude Code to confirm it loaded.

Bundled filesREADME.md

Details

From the project README

ddgr Web Search

Search DuckDuckGo from the terminal using ddgr.

When to Use

  • User asks to search the web or look something up
  • Need current/real-time information not in training data
  • User wants to find documentation, tutorials, or resources
  • DuckDuckGo Bang searches (Wikipedia, StackOverflow, GitHub, etc.)

Prerequisites

ddgr must be installed: brew install ddgr or pip install ddgr

Basic Usage

ddgr --noua --np --json "search query"

Required flags:

  • --noua: Disable user agent (always use this)
  • --np (noprompt): Exit after showing results, no interactive prompt
  • --json: Output in JSON format for parsing (implies --np)

Options

FlagDescription
-n NNumber of results (0-25, default 10)
-t SPANTime filter: d (day), w (week), m (month), y (year)
-w SITESearch within a specific site
-r REGRegion-specific search (e.g., us-en, uk-en, in-en)
-xShow full URLs instead of domain only
-j"I'm Feeling Ducky" - open first result in browser
-iRetrieve instant answer only
--unsafeDisable safe search
--revList results in reversed order
-p URIHTTPS proxy (also reads https_proxy env var)

DuckDuckGo Bangs

Bangs redirect searches to other sites. Escape ! in bash/zsh:

ddgr --noua --np \!w "search term"      # Wikipedia
ddgr --noua --np \!so "python error"    # StackOverflow  
ddgr --noua --np \!gh "repo name"       # GitHub
ddgr --noua --np \!yt "video topic"     # YouTube
ddgr --noua --np \!a "product"          # Amazon

Full bang list: https://duckduckgo.com/bang

Search Keywords

ddgr --noua --np --json "filetype:pdf annual report"
ddgr --noua --np --json "site:reddit.com python tips"

Examples

Basic search:

ddgr --noua --np --json "python asyncio tutorial"

Recent results (last week):

ddgr --noua --np --json -t w "latest news topic"

Site-specific search:

ddgr --noua --np --json -w stackoverflow.com "parse JSON"

Region-specific (India, English):

ddgr --noua --np --json -r in-en "IPL cricket"

Instant answer:

ddgr --noua --np -i "weather new york"

Limit to 5 results:

ddgr --noua --np --json -n 5 "quick query"

JSON Output Structure

Each result contains:

  • title: Page title
  • url: Full URL
  • abstract: Description/snippet

Parse with jq:

ddgr --noua --np --json "query" | jq '.[].title'
ddgr --noua --np --json "query" | jq -r '.[0].url'  # First result URL

Comments

Markdown supported