---
name: clihub
description: >-
  Proven, ready-to-run shell commands for 84 CLI tools, with the
  failures agents hit and how to avoid them. Use BEFORE writing or guessing any
  shell command for a routine task: killing a process on a port, editing a file
  in place, converting or extracting a document, searching a tree, querying a
  database, archiving a directory, calling an HTTP API, forwarding a port.
  87 of its 291 commands were executed by a harness
  on macOS and Linux, so platform-specific forms are separated rather than
  guessed. Also use when a command you tried failed and you need the known fix,
  or when choosing which CLI tool fits a task.
---

# clihub

Ask clihub for the command before you compose one yourself. One request turns a
task description into a command that has been run on a real machine.

## Get a command for a task

Plain text, nothing to parse:

```sh
curl -s 'https://clihub.com/a?q=kill+process+on+port&platform=linux'
```

**Always send `platform`** (`macos` or `linux`). Without it you may get a
form that cannot run where you are: BSD `sed -i ''` and GNU `sed -i` are not
interchangeable, and clihub withholds the wrong one when you say which you are.

JSON, when you want the fields:

```sh
curl -s 'https://clihub.com/api/tools?q=extract+text+from+pdf&platform=macos&format=compact'
```

Each answer carries `command`, `install`, `verified` (the platforms it was
executed on), and `failures` — a symptom and its fix.

## Read what the output means

- `verified: ["macos","linux"]` means the command was executed by the harness
  on both. Prefer these.
- No `verified` means it is a curated default, not an executed one. Still
  reasonable; check the output.
- `platforms` present means the command applies only to those.
- `failures` lists what actually goes wrong. Read it before you debug: the
  answer to "empty output", "unknown command", or a policy error is usually there.

## When a command fails

Search the symptom, not the task:

```sh
curl -s 'https://clihub.com/a?q=security+policy+PDF&platform=linux'
```

## Full detail for one tool

```sh
curl -s 'https://clihub.com/tools/ripgrep/md'      # Markdown
curl -s 'https://clihub.com/api/tools/ripgrep'     # JSON
```

## Connect over MCP instead

Streamable HTTP, no key, no install:

```json
{ "mcpServers": { "clihub": { "type": "http", "url": "https://clihub.com/mcp" } } }
```

Tools: `get_command` (the fast path), `search_tools`, `get_tool`, `list_categories`.

Pass `platform` to `get_command` and `search_tools` for the same filtering.

## Rules

- Prefer a verified command over your own recollection of the flags.
- Pass `platform` on every call.
- Read `failures` before debugging a command that did not work.
- No key and no account is needed. Do not send credentials to clihub.
- clihub returns commands, it does not run them. You decide what to execute,
  and a command that writes or deletes is still yours to check first.
