how-2
    Overview
    Issues
    Discussions
    API Reference
    Versions
    Alternatives
    Code
    Playground
    Contributors

how-2

Uses Google and Stackoverflow to find how to do things on a Unix commmand line

1.7.1  •  Updated 1 years ago  •  by Claudio Santini  •  MIT License

how2: stackoverflow from the terminal

NPM Version

how2 finds the simplest way to do something in a unix shell. It’s like man, but you can query it in natural language:

Demo of using how2

Install

You can install it via npm:

npm install -g how-2

if it gives you EACCES errors, you need to fix npm permissions. Or you can just use sudo npm install -g how-2 if you don’t care.

Usage

If you don’t specify a language it defaults to Bash unix command line. how2 tries to give you immediately the most likely answer:

how2 unzip bz2

After that you can press SPACE to go to the interactive mode, where you can choose a different stackoverflow question/answer.

how2 interactive mode

how2 interactive mode 2

You can use -l lang to find answers for other languages:

-l python

Copy-Paste with mouse

When you are in “interactive mode” (after you press SPACE), if you want to copy-paste more than one line you can use block-select:

With Ubuntu try holding Ctrl+Alt before you select, or Alt+Cmd if you’re in iTerm on Mac.

(thanks to @danielkop for this suggestion).

Can i use it behind Proxy ?

Yes, you need to use HTTP_PROXY or HTTPS_PROXY environment variables.

For example, you could alias the proxy seetings in your ~/.bash_profile:

alias how2="HTTPS_PROXY='your_proxy:8888' how2"

How does it work?

It uses Google and Stackoverflow APIs, because Stackoverflow search on its own doesn’t works as well.

Why?

Because I can never remember how to do certain things. And reading man pages always takes too long.

XKCD

Taken from https://xkcd.com/1168/

Popularity

Stars
5.0K

Maintenance

Development

Last ver 1 year ago
Created 3 years ago
Last commit 5 months ago
9 days between commits

Technology

Node version: 8.9.4
27.1K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

14 contributors
Claudio Santini
Maintainer, 97 commits, 16 merges
Paolo Cifariello
Maintainer, 23 commits, 5 merges, 2 PRs
Works at Cuebiq
Dany Shaanan
8 commits, 8 PRs
Tao
4 commits, 1 PRs
NathanEpstein
2 commits, 1 PRs
Daniel Kopitchinski
2 commits

Tags

how2
howto
man
google
stackoverflow
stack overflow
stackexchange
stack exchange
Ready for the next level?
Join Openbase's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookLinkedIn
© 2020 Devstore, Inc.