
DuckDuckGo Terminal Interface - LucasLarson
https://duckduckgo.com/tty/
======
robgibbons
I thought maybe this would be an actual terminal client, as in a way to search
DDG via the terminal.

~~~
tracerbulletx
[https://github.com/jarun/ddgr](https://github.com/jarun/ddgr)

~~~
dredmorbius
Nice, though I suspect a bunch of the parameters can be submitted with the
request.

I've got a bash function wrapper around w3m that fires off searches from the
shell. It's not a dedicated DDG client, but then again, after you hit the
search results, the goal is to view the results page. This _does_ use the
"lite" page, which is console-browser friendly-er

    
    
        ddg () 
        { 
            w3m https://duckduckgo.com/lite?q="$*&fd=-1"
        }
    

Full params list:
[https://duckduckgo.com/params](https://duckduckgo.com/params)

Nothing for number of results on page, that I see, though I've just added the
toggle for no redirect ("&fd=-1", included above now).

~~~
dredmorbius
NB: that should be "&kd=-1", not "fd".

    
    
        ddg () 
            { 
                w3m https://duckduckgo.com/lite?q="$*&kd=-1"
            }

------
big_chungus
This could be an excellent way to convert those who enjoy the command line
(including me). I get awfully sick of google's garbage, "We've detected
automated traffic from your systems." I don't scrape stuff, but if I did, so
what? This is worse on things like tor or if I can't use JS. Why can't I just
type in a query and get back a result?

Now, please make this an actual CLI. I want to type `search "performant c hash
table"` from my command line and get back results. I can open the resultant
link in something like lynx, as all I need is probably textual. This is
perfect for development use cases.

~~~
IggleSniggle
[https://github.com/jarun/ddgr](https://github.com/jarun/ddgr)

------
jhoechtl
I liked DDG a lot .. but when I discovered that it is effectively an UI over
Bing (Yahoo?), I am a lot less impressed.

Is there any search engine which is NOT backed by an extremely heavyweight
player?

~~~
nemasu
Seems people can't find your source, so I did some digging and found this:

"We also of course have more traditional links in the search results, which we
also source from a variety of partners, including Verizon Media (formerly
Yahoo) and Bing."[0]

[0][https://help.duckduckgo.com/duckduckgo-help-
pages/results/so...](https://help.duckduckgo.com/duckduckgo-help-
pages/results/sources/)

~~~
mda
But what percentage of it comes from which partner? They never say this.

~~~
hnarn
And more importantly, what percentage does not come from _any_ partner.

------
adjkant
So I'm sure this is cool to programmers, but this feels like if DDG wants to
go towards popular use it should be going in the opposite direction, yeah? I
guess this probably wasn't much work (maybe even an internal hackathon
project) but still feels like DDG isn't really headings towards popular
adoption and I'm curious what their internal focus is.

~~~
PostOnce
It's one of the most popular sites on the internet already.

[https://www.alexa.com/siteinfo/duckduckgo.com](https://www.alexa.com/siteinfo/duckduckgo.com)

It's also built into browsers. So, whatever they're doing, it's working.

~~~
adjkant
Come on, we all know that doesn't mean it's getting as wide use as a search
engine as Google let's say. And popularity doesn't mean that it's not leaving
things on the table. I'm just trying to give feedback as a potential user from
a non-technical perspective, which I think most developers overlook.

~~~
PostOnce
You can't beat Google by trying to be Google without having Google level
money, and even then, you still probably can't, Microsoft and Yahoo tried.

So, do something different. It's possible to grow by endearing yourself to
geeks first. How'd Firefox catch on to begin with? Geeks, then they recommend
to family and friends etc.

Hell, even if geeks were their only users, it'd likely be viable. There are a
lot of us.

~~~
godelski
> Geeks, then they recommend to family and friends etc.

Or, in my case, parents ask their kids to set up their computers and they
install firefox and add things like adblockers.

------
sigmonsays
I can't seem to search for "kubernetes" or "kubernetes linux"; with or without
quotes.

~~~
Nicksil
That's a feature.

------
kbd
Somehow the input on this doesn't register as an actual textbox. Many of my
keystrokes are read by Vimium instead, making this unusable.

~~~
keithnz
in vimium you can go i and you will be in insert mode ( till you hit escape )
and you will be fine.

~~~
kbd
TIL, thanks.

------
etaioinshrdlu
Just earlier today I thought it would be very cool to use Google assistant in
a terminal. It looks like there is an example python project that is close to
working with some polishing.

Google assistant is also lacking a client for web browsers, or desktops in
general...

It appears free to use the assistant API for non commerical purposes. Until it
gets randomly deprecated.

------
BLanen
The search results are ddg pages suggesting search terms based on the input?

Why can't I just search normally and the list is a list of the actual results
of my query.

Now you navigate to the ddg search results page and have to then browse as
usual. Almost useless. You'd think this would be made to skip that step.

------
njsubedi
Fedback (see #1) from my use on Firefox 70 on Mac OS Catalina

1\. Feedback isn't being sent anywhere (looking at the network requests.)

2\. Searching for sum or difference of numbers (eg. 2-1) returns [Object].

3\. Typing / or ' invokes the browser's quick find option

4\. I can never search for the letter M (or m, or 'm' inside quotes) because
it always gives "\-- End of search results." instead of the search results.

5\. I can never search for a URL (say,
[http://duckduckgo.com](http://duckduckgo.com)) as a keyword. No results at
all.

6\. Pressing CTRL-L after typing some text clears the text as well (unlike any
other terminal)

7\. Pronounce doesn't work at all (audio plays well on Forvo)

Discoveries:

1\. Searching for \anything takes you to the first result (on a popup that's
blocked by the browser).

2\. [Added] A `duck` CLI would be useful.

~~~
addandsubtract
Re: 6. I found that annoying as well. I use CTRL+L to jump to the address bar,
not clear the terminal. MacOS uses CTRL+K to clear it and I'd assume that be
the case on linux as well.

~~~
fouc
Hmm? ctrl-L clears the terminal in iTerm (and in linux terminals too I
believe)

Ok looks like CMD-L and CMD-K also clear the terminal in iTerm. But we're
talking about "ctrl" here

------
exikyut
Various comments are noting that certain queries are not working.

I think this is hitting a caching/prefetch layer and not actually querying the
main index.

My theory:

\- this was a hackathon/weekend/20%(ish) project...

\- ...using JSON for simplicity...

\- ...said JSON endpoint needs to be exposed in a straightforward way...

\- ...without implementing authentication/obfuscation (which would have blown
the allotted time budget)...

\- ...and so the decision was made to "break" the results in some way instead,
so that once you realize
[https://duckduckgo.com/?q=test&o=json](https://duckduckgo.com/?q=test&o=json)
is EXTREMELY easy to parse, it's of no value.

~~~
shakna
> :why

> Because Devdas uses vimperator with Google?? I don't think they mix well.
> Devdas, you should try this instead.

I'm not sure this was ever intended to be more than just a quick project. It
breaks because parsing has a lot of edge cases, and this was done quickly.

------
dxxvi
It can be a little bit better if the url's are dimmed a little bit (they can
be still green to mimic the mono-color terminals, but dimmer).

------
bitpush
1+1 returns [Object object]

[https://imgur.com/les9QqQ](https://imgur.com/les9QqQ)

------
rinchik
Doesn't work in FF with "Search for text when you start typing". I expected
better implementation.

JS hijacks pretty much every event, and cursor is just a styled span, not a
real input, which introduces a bunch of usability bugs.

------
vector_spaces
Weirdly this doesn't seem to work using their own Android DDG Privacy Browser
app

------
sdan
Nice.

Could I use this on my Terminal now?

~~~
dredmorbius
Not unless your terminal interprets Javascript.

Though you might appreciate
[https://duckduckgo.com/lite](https://duckduckgo.com/lite)

------
isatty
The default keypress for / isn't captured and makes it difficult to type in an
URL to search for (not that the URL search returned anything).

------
corecoder
It sucks so much! I tried typing but apparently was typing too fast and more
than half of the letters didn't appear on the screen?

~~~
keithnz
do you have vimium installed? I had similar symptoms till I realized, then
realized what was going on. If this is the case, press i to go into insert
mode, and you should be good from there

------
Lio
This is a lot of fun. Right now I'm hitting a few issues with the Vimium
plugin in Firefox.

Pretty sure that can be fix though.

------
shmerl
For some reason it doesn't work for me (nothing happens after typing a search
term).

~~~
sk0g
Same here, was pretty excited to try it out too! Help and the likes work, but
not just searching.

~~~
YeGoblynQueenne
Wait, help? When I type help I gest a list of search results for help. Did you
actually get help text?

~~~
shmerl
It's :help

~~~
YeGoblynQueenne
Ah.

Thanks for the er, help.

------
tretiy3
it doesn't work. today i was asking ddg why sys.maxint is no longer works in
python3. got immediate answer. but this terminal app just keep silent about
that.

------
jakeogh
relatedish:
[https://gitlab.com/surfraw/Surfraw](https://gitlab.com/surfraw/Surfraw)

~~~
dredmorbius
Trivium: written by some guy named Julian Assange.

~~~
jakeogh
I think they are trying to kill him in Belmarsh.
[https://finance.yahoo.com/news/mumbling-assange-tells-
judge-...](https://finance.yahoo.com/news/mumbling-assange-tells-
judge-t-121202397.html)

------
trpc
DDG coincidentally makes almost every post to the frontpage as if it was a
trillion dollar company meanwhile almost all interesting SHOW HN threads upon
which the entire future of livelihood of many indie devs and micro startups
depend are buried without even getting the slightest chance to get any
coverage.

