Command-line utility to search DuckDuckGo from the terminal with customizable results and Tor support
ddgr is a command-line utility that allows users to search DuckDuckGo directly from the terminal. It provides access to DuckDuckGo's HTML interface, enabling privacy-focused search without leaving the command line. The tool supports DuckDuckGo Bangs, which allow users to search specific sites directly (e.g., !w hello world searches Wikipedia).
The utility offers several advantages over web-based searching, including customizable result counts per page (0-25 results), instant answers, and the ability to filter results by time span, region, or specific sites. Users can open results in text-based browsers like w3m or lynx, or use GUI browsers through the omniprompt interface. The tool includes a REPL mode for continuous searching and supports various output formats including JSON.
ddgr works over the Tor network, making it suitable for privacy-conscious users. It includes features like HTTPS proxy support, custom color schemes, search keyword completion for Bash/Fish/Zsh, and clipboard integration for copying URLs. The tool supports advanced search operators like filetype: and site: modifiers, and can disable safe search or user agent strings when needed.
# via PyPI
pip3 install ddgr
# via Snap
snap install ddgr
# via Source
sudo make install