Skip to content

howdoi

Command-line tool that answers coding questions by searching programming Q&A sites.

Stars
10.8k
Forks
859
Licence
MIT
Language
Python
Last update
1 months ago
Type
CLI

What it is

howdoi is a Python command-line tool where you type a plain-language question, such as how to format a date in bash, and it returns a code answer without opening a browser. The README says it draws answers from Stack Overflow-style sites by default, and it can search other StackExchange sites or use Google, Bing, or DuckDuckGo. It is aimed at people who often look up basic programming tasks.

  • Ask how to format a date in bash and get a one-line answer
  • Look up how to print a stack trace in Python
  • Find a tar command to create an archive with exclusions
  • Search another StackExchange site by setting HOWDOI_URL
  • Save useful answers to a local stash with --save

Great for

  • Developers who frequently search the web for small syntax questions
  • Students looking up common shell or language snippets from the terminal
  • People who want to stay in the terminal instead of switching to a browser
  • Users who want answers piped into scripts via its JSON output option

Not ideal for

  • Complex architecture or debugging questions, since it returns short snippets from existing answers rather than reasoning about your code
  • Offline use, because the README describes querying online sites
  • Users on Python 2.7, which the README says is no longer supported
Step-by-step guide: how to use howdoiInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Python 3.7 or newer · pip

    Install with pip

    pip install howdoi

    Or install with Homebrew

    brew install howdoi
  2. 2

    Run it

    • Install howdoi with pip or Homebrew
    • Ask a question in plain words, for example: howdoi format date bash
    • Add -n 5 to see more answers or -c for colored output
    • Use -a to see the full answer text if the default is cut short
  3. 3

    Get the most out of it

    • Create a shell alias with -c and -n 5 to get colored, multiple results every time
    • Set HOWDOI_URL to query another StackExchange site, such as cooking.stackexchange.com
    • Use --save to stash useful answers and --view to review them later
    • Set HOWDOI_SEARCH_ENGINE to choose google, bing, or duckduckgo
    • Try the Slack, Telegram, Discord, Emacs, or VSCode integrations listed in the README

Downloads

Strengths

  • Simple, one-line usage for common questions
  • Has an MIT license and a large community with many integrations listed
  • Offers several search engines and a stash feature for saving answers

Trade-offs

  • Answers come from third-party sites, so quality and correctness vary and should be checked
  • Depends on internet access and on the availability of the sites it queries
  • The README is truncated and does not fully document how answers are ranked

How it compares

ProjectStarsTypeLevelUpdatedBest for
howdoi (this)10.8kCLIbeginner1 months agoDevelopers who frequently search the web for small syntax questions
cheat.sh41.8kCLIbeginner2 months agoDevelopers who look up command flags and syntax often from the terminal

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.