hub-tool
hub-tool copied to clipboard
`hub-tool org search [TERM]` - Add feature to find organizations from the CLI?
Why?
Occasionally, I want to find an org on Docker Hub.
- Sometimes I'm looking for an
orgfor the first time and I don't know what theorgname(s) might be. - Quite often, cats got my tongue and I can't recall the exact phrasing or spelling of the
orgname(s).- Because, as with GitHub,
orgsare often used asnamespacesresulting in manyorgsto any one real-world organization (community, ecosystem). - For example docker / dockersamples / moby
- or jenkins / jenkinsci
- Because, as with GitHub,
-
docker searchalways made sense. It would rock fororgstoo!
How I search now
- It's often painful ;)
- I usually resort to
googling. - Or,
githubbingfor theorg- Especially if it's known to me (or
Google) already - Then perusing
reposforDocker Hubreferences / links
- Especially if it's known to me (or
- Or, sometimes, searching for
reposviaDocker Hub's web UI- Skimming the results for the
orgI may want - Clicking (carefully so I don't open the
repo) on the blueorgname link - Can involve paging and backing up to look at other results.
- Skimming the results for the
- Certainly,
Docker Hub's web search UI could be improved (or I could RTFM if there's already a better way)- That said, the impetus of
hub-toolis to help keep people in the CLI
- That said, the impetus of
Ideas
# perhaps `search`? (reminiscent of `docker search`)
hub-tool org search [TERM]
# or, considering consistency and the existing docker CLI, maybe `ls` is a better place for this to reside?
hub-tool org ls [TERM]
TERM could:
- be an exact match
- be a fragment (AFAIK this is not supported by current CLI
lscommands - a partial name doesn't match anything unless you use asterisks) - include
wildcards,globorregex
TERM could match against: name, company, location, urls, linked accounts and other public metadata provided in org settings. A description of an org would be nice to search against but to my knowledge that doesn't exist as a setting for orgs?
TERM could also mirror the ubiquitous, explicit ls --filter arg that specifies what field to search against (--filter name=foo or --filter company=bar)