

Introducing the Command Bar - dko
https://github.com/blog/1264-introducing-the-command-bar

======
crazygringo
Wow, a command-line interface to a website is something I never thought I'd
see.

My first reaction was that it's a step backwards because the usual benefits of
a command line aren't present here (you're usually _already_ using your mouse,
commands can't be piped, no shell scripts to run things in sequence)...

But I'm intigued -- maybe it's a possible step forwards? The implementation is
very well done. I suppose maybe it functions like traditional keyboard
shortcuts in a way? To follow a user, instead of finding their page and
clicking follow, you just type "@user follow".

Still, all the commands are so basic, and many are infrequently used, I don't
really see much of the "shortcut" value. I'm very curious to see if this user
interface concept grows. Imagine if this became a standard way to interface
with web API's!

~~~
cdmoyer
I know for one of the games I work on, the chat-commands/command-line
interface is one of the most popular user interface features for power users.
And the main reason is what you suggest about navigating and clicking.
Admittedly, in a game you might "/equip meat helmet" or "/use mmj" a lot more
frequently than you will friend someone on github, but it's a similar concept.

~~~
buro9
For a universal search bar I've been wanting to implement a chat bot style
thing for issuing actions:

    
    
       /find search term
    

Which is actually the same as not including "/find"... it acts like a search
box when not told otherwise.

    
    
       /goto inbox
       /goto home
    

Navigation to common pages.

    
    
       /me is dancing
    

That one updates your status.

    
    
       /me slaps [user] with a trout
    

Is the equivalent of a Facebook poke I guess.

------
tarr11
Playing with this for a few minutes:

* I wish it had vim keybindings (ie, hit esc, then use hjkl to navigate)

* It gives me the option to follow myself. (Bug?)

* I like how I can learn commands via the autocomplete bar (issue, branch, graph, etc)

* I like how the autocomplete bar refreshes after I have control-tabbed away and back. Too many autocompletes lose this behavior

* Searching in a repository username/repo <searchterm> doesn't work the way I expect. It just brings up the regular search

Overall, very useful though.

~~~
nipunn1313
In multiple places on github, as a vim user, I occasionally instinctively hit
escape. Github sometimes closes a comment box and I lose all the stuff I had
been typing. It's an unfortunate UI issue for me (and probably others).

~~~
icebraining
Just use VIM proper; after all, It's All Text! <https://addons.mozilla.org/en-
US/firefox/addon/its-all-text/>

(alternatively, use Pentadactyl and press C-i when the focus is on a text box)

------
tomblomfield
Cool toy, but how about letting users just _search_ for code in a repo
properly?

~~~
rhizome
For a site like GitHub, I would imagine this is a huge engineering effort to
do right. For instance, in a plain vanilla code search facility, how would you
expire results efficiently when the text can change from minute to minute (to
seconds, to even less)?

~~~
JoelMcCracken
Super efficient search would be great and idea, but slightly delayed searching
is perfectly acceptable imo. Especially because I am not necessarily looking
for extremely up-to-date changes.

~~~
rhizome
Even slightly-delayed searching would be a huge deal, engineeringwise.

------
johncoltrane
Well, we already have a command bar at the top of the window. What about these
commands?

    
    
        http://github.com/username
        http://github.com/username/follow
        http://github.com/username/unfollow
        http://github.com/me/dashboard
        http://github.com/me/notifications
        http://github.com/username/reponame/search/term
        http://github.com/username/reponame/branchname

~~~
hyperbovine
What is your point? REST is meant to make it easy for machines to talk to each
other.

~~~
johncoltrane
My point is that the address field of my browser is _already_ a "command bar"
and that the URI is _already_ a command line.

With a carefully chosen URI scheme, 100% RESTful or not, you have your command
bar.

~~~
hyperbovine
Personally I don't relish the thought of memorizing the REST API of every
website I visit. Anyways, it's not like they did away with the URI scheme you
are describing...

~~~
johncoltrane
Agreed.

------
nathan_long
The one command-line feature I want most on Github is `git grep`. I have
cloned projects locally solely to be able to do that.

------
_djo_
This UI concept seems to be gaining in popularity. Jira 5 has a similar
(though less powerful) option-completion action bar that you can pull up with
a shortcut when viewing an Issue.

I've been considering adopting a similar concept for a complex enterprise
application that I maintain where the number of possible actions on a certain
page is huge.

------
state
I really like seeing this UI approach becoming more popular. I find it
particularly worthwhile because I think it helps build familiarity without
being limiting the way simple autocomplete can. This approach broadens the
knowledge of the user — even (I think) in the case of something like GitHub
where most users are particularly competent.

------
evanmoran
To remind everyone how awesome xkcd's commandline is:

<http://uni.xkcd.com/>

------
mrgreenfur
I like github for their sweet hosting and easy collaboration. I have no idea
who would use this command bar. Do people really want to move the mouse to
click on a cli and then guess/remember the syntax?

I don't really get why they built this... Anyone?

~~~
burke
hitting 's' anywhere on the page activates the command bar. I will use this a
lot.

~~~
mrgreenfur
oh, that makes it much better. I only have a handful of repos and a few
collaborators, so I don't really spend tons of time on GH. I imagine you spend
more time than me to be excited by it -- what are you doing on there?

~~~
nja
Well, I can't speak for burke, but I use GitHub Enterprise at work. Once this
trickles down to GH:E, I'll probably use it very regularly.

------
dangoor
If you want a command line for your own site, you can use the GCLI project
(BSD licensed, use it freely!)

<https://github.com/mozilla/gcli>

This is the command line that's in Firefox 16's Developer Toolbar (final
release is coming in early October):

[https://hacks.mozilla.org/2012/08/new-firefox-command-
line-h...](https://hacks.mozilla.org/2012/08/new-firefox-command-line-helps-
you-develop-faster/)

I love command lines, personally :)

------
ef4
Nice. I wish more GUIs had this kind of capability.

Long live the command line. At least until I get my neural implants.

------
conradev
This is similar to a plugin I have been using in Alfred for quick access to
Github (but not nearly as feature complete):

<https://github.com/KevinSjoberg/github.alfredextension>

------
tbourdon
This paradigm is very powerful. The only thing I see missing from these types
of interfaces is the ability to select part or all of the output and use it as
input for a new command.

Think of it as an intermediate step of piping where the user has the ability
to manually filter content. This UI concept would cover the vast majority of
UI needs as almost any workflow could be captured with the following...

1.) Issue command that produces 0..N results. 2.) View results in list format.
3.) Select individual results for details view. 4.) Select 0..N results as
input to a subsequent command.

------
zb
This seems like a step in the right direction, because GitHub's search remains
awful.

For example, I can now type in "<user>/<repo> #123" to go to an issue, but if
I am already on the Issues page for that repo and I type "#123" in the box
labelled "Search: Issues & Milestones..." it _still_ comes up with nothing.
And that's not even challenging.

I'm desperately hoping that this feature is an indication that they've noticed
that finding anything on the site requires either 8 million mouse clicks or
manually editing URLs.

------
peterbe
Note, Chrome junkies, the Firefox awesome bar already does most of these :)

------
lukencode
I put together a little admin command line that you could bring up with the ~
key that looks like this: <http://i.imgur.com/mq7ko.png?1>

It is built for asp.net but you could easily apply the same concept somewhere
else. More info if anyone is interested:
[http://lukencode.com/2011/12/11/netbashan-alternative-to-
end...](http://lukencode.com/2011/12/11/netbashan-alternative-to-endless-
admin-pages-in-asp-net-web-applications/)

------
cientifico
You only miss one thing:

* map the '/' symbol to focus:search box.

~~~
shabble
I find this really annoying, I use '/' to use the browser find-in-page, and
apps hijacking it for their search field instead ruins it.

Yes, there are other bindings, but / is in finger-memory at this point.

I wonder if there's some sort of noscript-alike that would give you fine-
grained enough control to permit exactly which keys could be intercepted by an
app.

------
magnusgraviti
I think it would be even better to have some terminal emulator on github. Even
now with so improved UIs I like command line interface.

~~~
przemoc
Keyboard is at least 100x as productive as mouse (assuming you know what to do
and what to type). Even the best peachy UIs cannot change it. Still there are
things that aren't convenient to do from CLI like photo retouching, but these
are quite obvious exceptions.

That said, I'm not sure what would you like to do in such terminal?

~~~
magnusgraviti
I'd like to search for repos, create new repos, create initial files, edit
existing, star/unstar, watch/ignore, work with messages etc.

~~~
endianswap
I agree that a keyboard is orders of magnitude more conducive to productivity,
but I'm surprised that you do some of these frequently enough to make learning
the commands a worthwhile endeavor, if one of these consoles were available.
Even starring/unstarring is something that I do frequently, but I don't think
I'd get any boost out of typing 'star' instead of just clicking on the star
when my brain is already saying "make that star thing light up."

~~~
magnusgraviti
My point of view is based on personal experience. I explain it:

Git was initially a set of commands from terminal. A lot of programmers use
terminal everyday. Even now I have terminal opened for doing different stuff.
This terminal-nature of git itself and of github audience makes it obvious it
would be used.

The other interesting question is how it would be implemented. With my repos
on github (as opened as private) I think it would be great to have an
opportunity to do some set of things from the site CLI.

P.S. I understand there are a lot of those who prefer GUI over CLI but I
believe I am not the only one who wants to have CLI also available.

------
flyhighplato
Giving the type of people who like command lines a command line -- not a bad
idea!

The down side is that, I think, this is really only useful for the github
power user. The upside is: I'm a github power user!

Seriously, though, I hope they don't use this command line as a sort of cop-
out for continuously improving their UI.

------
beatpanda
I want this for every website, and for most of the desktop apps I use. Typing,
for me, is so much easier than finding menu items and clicking on them.
Imagine Photoshop with an autocompleting command line instead of a maze of
menus. I could work _so_ much faster.

------
jamespitts
It is fantastic that a command interface is now a part of a very public system
like github.

These things really speed up work for power-users and let maintainers add
functionality without adding more complexity to the user experience than is
appropriate.

------
DigitalSea
This is awesome. I would love to see the concept of a website command line
interface explored a bit further, hopefully Github implement something like
Vim keybindings and a few other useful commands. The future is bright, man.

------
rolfvandekrol
It was already shown here <https://github.com/blog/1252-how-we-keep-github-
fast>. So we could have known it would come.

------
jMyles
Am I the only one who thought this was going to let me run git commands?

~~~
gokulk
yeah me too. then i realized this would do for a web interface

------
rurounijones
I wondered why the "search" bar had suddenly got really slow today and caused
Firefox to freeze a little bit when using it.

Need to juice the performance a bit I think

------
RyanMcGreal
Great feature - I really like it. My only request is that the suggestions be
clickable links so that you can open one in a new tab.

------
thomasfl
Don't you use the browsers address bar for that?

------
andrewingram
Now I just need an Alfred extension that talks to the backend URLs

------
daralthus
cool, but how about making it context (page) aware, so you could write just
"@watch" on a repo's page?

------
missechokit
Death to the CLI/GUI religious wars.

