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
org
for the first time and I don't know what theorg
name(s) might be. - Quite often, cats got my tongue and I can't recall the exact phrasing or spelling of the
org
name(s).- Because, as with GitHub,
orgs
are often used asnamespaces
resulting in manyorgs
to any one real-world organization (community, ecosystem). - For example docker / dockersamples / moby
- or jenkins / jenkinsci
- Because, as with GitHub,
-
docker search
always made sense. It would rock fororgs
too!
How I search now
- It's often painful ;)
- I usually resort to
googling
. - Or,
githubbing
for theorg
- Especially if it's known to me (or
Google
) already - Then perusing
repos
forDocker Hub
references / links
- Especially if it's known to me (or
- Or, sometimes, searching for
repos
viaDocker Hub
's web UI- Skimming the results for the
org
I may want - Clicking (carefully so I don't open the
repo
) on the blueorg
name 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-tool
is 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
ls
commands - a partial name doesn't match anything unless you use asterisks) - include
wildcards
,glob
orregex
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
)