Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 24, 2026·2 min de lectura

howdoi — Instant Coding Answers from the Command Line

Search Stack Overflow and programming documentation from your terminal and get concise code snippets without leaving your workflow.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
howdoi Overview
Comando CLI universal
npx tokrepo install 4dd1c181-576b-11f1-9bc6-00163e2b0d79

Introduction

howdoi fetches concise answers to programming questions directly from your terminal. It scrapes top-voted Stack Overflow responses and returns code snippets, saving developers from context-switching to a browser.

What howdoi Does

  • Answers free-form programming questions with code snippets from Stack Overflow
  • Returns the top-voted answer by default or all answers with the -a flag
  • Supports colorized output with syntax highlighting
  • Provides a REPL mode for interactive question sessions
  • Caches responses locally to speed up repeated queries

Architecture Overview

howdoi is a Python CLI that uses search engines to find relevant Stack Overflow threads, then parses the HTML to extract the highest-scored code blocks. It employs a local cache (file-based or optional Redis) to avoid repeated network calls. The tool can use Google, Bing, or DuckDuckGo as the search backend.

Self-Hosting & Configuration

  • Install via pip install howdoi or pipx install howdoi
  • Set HOWDOI_SEARCH_ENGINE to choose between google, bing, or duckduckgo
  • Configure cache directory with HOWDOI_CACHE environment variable
  • Use HOWDOI_COLORIZE=1 to enable syntax-highlighted output
  • Integrate into editors via the included Emacs and Vim plugins

Key Features

  • Answers returned as ready-to-paste code snippets
  • Multiple search engine backends for reliability
  • Local caching reduces latency for repeated lookups
  • Colorized terminal output with language detection
  • Importable as a Python library for programmatic use

Comparison with Similar Tools

  • cheat.sh — serves curated cheat sheets; howdoi searches live Stack Overflow answers
  • tldr-pages — short man-page alternatives for commands; howdoi answers arbitrary coding questions
  • Stack Overflow CLI — official SO search; howdoi extracts code snippets rather than full pages
  • ShellGPT — LLM-powered answers; howdoi uses proven human-written solutions from SO

FAQ

Q: Does howdoi require an API key? A: No. It uses web scraping to retrieve answers without authentication.

Q: How accurate are the answers? A: howdoi returns the top-voted Stack Overflow answer, which reflects community consensus but may not always fit your exact context.

Q: Can I use howdoi in scripts? A: Yes. Import it as a Python library with from howdoi import howdoi and call howdoi.howdoi(query).

Q: Does it support languages other than English? A: Queries work best in English since it searches English-language Stack Overflow.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados