Home CLI Command

gxwf tool-search

Free-text Tool Shed search returning candidate tools as JSON; first step in the discover-and-pin sequence.

Revised
2026-05-06
Rev
2
cli gxwf tool-search @galaxy-tool-util/cli @ 1.4.0 upstream ↗

gxwf tool-search

Search the Galaxy Tool Shed for tools matching a query

gxwf tool-search [options] <query>

Arguments

name req variadic description
query Search text (e.g. 'fastqc')

Options

flag arg description
--page-size <n> <n> Server-side page size default: "20"
--max-results <n> <n> Hard cap on hits returned default: "50"
--page <n> <n> Starting page (1-indexed) default: "1"
--owner <user> <user> Filter hits to a single repo owner (client-side)
--match-name Drop hits where the query is not a token in the tool name
--json Emit machine-readable JSON envelope
--enrich Resolve each hit's ParsedTool and attach it as `parsedTool` (one fetch per hit; off by default)
--cache-dir <dir> <dir> Tool cache directory (used by --enrich; shared with galaxy-tool-cache)

gxwf tool-search

Free-text search over the Galaxy Tool Shed’s tool index. Designed to feed galaxy-tool-cache add (and the rest of the tool-versions / tool-revisions chain) so a workflow author can go from a query string to a cached ParsedTool in a small number of commands.

Instance-agnostic; targets https://toolshed.g2.bx.psu.edu by default.

<query> is free text; whitespace separates terms. The Tool Shed wraps the term as *term* server-side, so noisy queries can match description and help text.

Output

Default: human-readable list.

--json:

{
  "query": "fastqc",
  "hits": [
    {
      "toolId": "fastqc",
      "name": "FastQC",
      "description": "Read Quality reports",
      "owner": "devteam",
      "repoName": "fastqc",
      "trsToolId": "devteam~fastqc~fastqc",
      "score": 12.3
    }
  ]
}

A hit identifies (owner, repoName, toolId) plus a trsToolId (owner~repo~toolId). It does not include a changeset revision or specific tool version — those come from tool-versions and tool-revisions.

Examples

gxwf tool-search fastqc
gxwf tool-search "quality control" --json --max-results 10
gxwf tool-search bwa --owner devteam --match-name --json

Pipe the top hit into the rest of the pin chain:

gxwf tool-search fastqc --json --max-results 5 \
  | jq -r '.hits[0].trsToolId' \
  | xargs gxwf tool-versions --latest --json

Gotchas

  • No EDAM, no stem analyzer, no panel context — the Tool Shed tool index is much poorer than Galaxy’s installed-toolbox index. Queries match only name, description, help, and repo_owner_username. See component-tool-shed-search §2b.
  • Case-sensitivity asymmetry. The tool search does not lowercase the query (unlike repo search). Mixed-case queries can miss; lowercase if uncertain.
  • Stale indexes. Tool Shed Whoosh indexes are rebuilt by cron / admin action, never automatically on upload. A freshly published tool may not show up for some time. Deprecated repos can still appear until the next rebuild.
  • *term* wrapping disables server-side stemming and structured query syntax. Prefer simple terms; combine --match-name and --owner to tighten.
  • No exact-id matching. The shed indexes id as TEXT, not Whoosh ID, so it tokenizes — you cannot pin a hit to an exact GUID via search.
  • Same XML id across repos. The same logical tool (e.g., bwa) can be wrapped and published in multiple independent repos. Hits collapse only by (repoName, owner); expect duplicates that need human triage.
  • Repo-level discovery is a different command. For “find me a package about X” with server-side owner: / category: keywords and popularity-boosted ranking, use gxwf repo-search instead.

Pairs with

  • tool-versions — list TRS-published versions for a hit’s trsToolId.
  • tool-revisions — resolve a (trsToolId, version) to changeset revisions for reproducible pinning.
  • galaxy-tool-cache add — terminal step of the discover-and-pin chain.

Incoming References (1)

  • Component Tool Shed Searchrelated note— Tool Shed's Whoosh repo/tool search and partial GA4GH TRS v2, indexed from hg-walked metadata with no auto-refresh on upload