Joe Walker has been building a great "modern command line" for developer tools. You can see it right now in Nightly by setting devtools.gcli.enable to true in about:config. When you do so, you'll see the Web Console's JavaScript command line change to a tool-oriented command line (which means: designed to be very quick to type). You can still run JavaScript by hitting { (curly brace) This has the potential to be an amazing feature... but it needs commands. I started a wiki page: https://wiki.mozilla.org/DevTools/ThinkingInCommands I'm interested in hearing people's thoughts about the command line feature and the kinds of commands they'd like to see. Bugs with patches for commands would be cool, too :) Kevin -- Kevin Dangoor work: http://mozilla.com/ email: kdangoor@mozilla.com <kid@blazingthings.com> blog: http://www.BlueSkyOnMars.com
![]() |
0 |
![]() |
On 12/12/11 20:18, Kevin Dangoor wrote: > https://wiki.mozilla.org/DevTools/ThinkingInCommands The most important thing IMO is that addons should be able to add new commands or sets of commands easily. One would then hope that good commands would naturally be created, and assembled into sets, which would acquire reputations, and so on. Gerv
![]() |
0 |
![]() |
On 13/12/2011 12:40, Gervase Markham wrote: > On 12/12/11 20:18, Kevin Dangoor wrote: >> https://wiki.mozilla.org/DevTools/ThinkingInCommands > The most important thing IMO is that addons should be able to add new > commands or sets of commands easily. One would then hope that good > commands would naturally be created, and assembled into sets, which > would acquire reputations, and so on. Command creation is well documented: https://github.com/mozilla/gcli/blob/master/docs/writing-commands.md It would be nice to have ~/.commands/foo.js become automatically available etc. However there's code to be written, and security reviews to be passed before we've got that. Joe.
![]() |
0 |
![]() |
Perhaps we could help/promote the creation of new/custom/user-specific commands with some kind of Scratchpad integration? eg. createCommand foo => launch a scratchpad window with the necessary boilerplate code to create a command 'foo'. On Tue, Dec 13, 2011 at 21:07, Joe Walker <jwalker@mozilla.com> wrote: > On 13/12/2011 12:40, Gervase Markham wrote: >> >> On 12/12/11 20:18, Kevin Dangoor wrote: >>> >>> https://wiki.mozilla.org/DevTools/ThinkingInCommands >> >> The most important thing IMO is that addons should be able to add new >> commands or sets of commands easily. One would then hope that good >> commands would naturally be created, and assembled into sets, which >> would acquire reputations, and so on. > > > Command creation is well documented: > https://github.com/mozilla/gcli/blob/master/docs/writing-commands.md > > It would be nice to have ~/.commands/foo.js become automatically available > etc. However there's code to be written, and security reviews to be passed > before we've got that. > > Joe. > > > _______________________________________________ > dev-apps-firefox mailing list > dev-apps-firefox@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-apps-firefox
![]() |
0 |
![]() |
+1 This could be an alias to the scratchpad command (bug 683513) that adds a specific parameter. On Tue, Dec 13, 2011 at 3:44 PM, Cedric Vivier <cedricv@neonux.com> wrote: > Perhaps we could help/promote the creation of new/custom/user-specific > commands with some kind of Scratchpad integration? > > eg. > createCommand foo => launch a scratchpad window with the necessary > boilerplate code to create a command 'foo'. > > > > On Tue, Dec 13, 2011 at 21:07, Joe Walker <jwalker@mozilla.com> wrote: > > On 13/12/2011 12:40, Gervase Markham wrote: > >> > >> On 12/12/11 20:18, Kevin Dangoor wrote: > >>> > >>> https://wiki.mozilla.org/DevTools/ThinkingInCommands > >> > >> The most important thing IMO is that addons should be able to add new > >> commands or sets of commands easily. One would then hope that good > >> commands would naturally be created, and assembled into sets, which > >> would acquire reputations, and so on. > > > > > > Command creation is well documented: > > https://github.com/mozilla/gcli/blob/master/docs/writing-commands.md > > > > It would be nice to have ~/.commands/foo.js become automatically > available > > etc. However there's code to be written, and security reviews to be > passed > > before we've got that. > > > > Joe. > > > > > > _______________________________________________ > > dev-apps-firefox mailing list > > dev-apps-firefox@lists.mozilla.org > > https://lists.mozilla.org/listinfo/dev-apps-firefox > _______________________________________________ > dev-apps-firefox mailing list > dev-apps-firefox@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-apps-firefox >
![]() |
0 |
![]() |
That'd be cool. We could even have a custom userGCLI.js stashed in the = profile that gets loaded when you first start the command line. On 2011-12-13, at 09:44, Cedric Vivier wrote: > Perhaps we could help/promote the creation of new/custom/user-specific > commands with some kind of Scratchpad integration? >=20 > eg. > createCommand foo =3D> launch a scratchpad window with the necessary > boilerplate code to create a command 'foo'. >=20 >=20 >=20 > On Tue, Dec 13, 2011 at 21:07, Joe Walker <jwalker@mozilla.com> wrote: >> On 13/12/2011 12:40, Gervase Markham wrote: >>>=20 >>> On 12/12/11 20:18, Kevin Dangoor wrote: >>>>=20 >>>> https://wiki.mozilla.org/DevTools/ThinkingInCommands >>>=20 >>> The most important thing IMO is that addons should be able to add = new >>> commands or sets of commands easily. One would then hope that good >>> commands would naturally be created, and assembled into sets, which >>> would acquire reputations, and so on. >>=20 >>=20 >> Command creation is well documented: >> https://github.com/mozilla/gcli/blob/master/docs/writing-commands.md >>=20 >> It would be nice to have ~/.commands/foo.js become automatically = available >> etc. However there's code to be written, and security reviews to be = passed >> before we've got that. >>=20 >> Joe. >>=20 >>=20 >> _______________________________________________ >> dev-apps-firefox mailing list >> dev-apps-firefox@lists.mozilla.org >> https://lists.mozilla.org/listinfo/dev-apps-firefox > _______________________________________________ > dev-apps-firefox mailing list > dev-apps-firefox@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-apps-firefox
![]() |
0 |
![]() |
Nice idea. I added a comment to the bug. https://bugzilla.mozilla.org/show_bug.cgi?id=683513#c11 Joe. On 13/12/2011 13:54, Panos Astithas wrote: > +1 > > This could be an alias to the scratchpad command (bug 683513) that > adds a specific parameter. > > On Tue, Dec 13, 2011 at 3:44 PM, Cedric Vivier <cedricv@neonux.com > <mailto:cedricv@neonux.com>> wrote: > > Perhaps we could help/promote the creation of new/custom/user-specific > commands with some kind of Scratchpad integration? > > eg. > createCommand foo => launch a scratchpad window with the necessary > boilerplate code to create a command 'foo'. > > > > On Tue, Dec 13, 2011 at 21:07, Joe Walker <jwalker@mozilla.com > <mailto:jwalker@mozilla.com>> wrote: > > On 13/12/2011 12:40, Gervase Markham wrote: > >> > >> On 12/12/11 20:18, Kevin Dangoor wrote: > >>> > >>> https://wiki.mozilla.org/DevTools/ThinkingInCommands > >> > >> The most important thing IMO is that addons should be able to > add new > >> commands or sets of commands easily. One would then hope that good > >> commands would naturally be created, and assembled into sets, which > >> would acquire reputations, and so on. > > > > > > Command creation is well documented: > > https://github.com/mozilla/gcli/blob/master/docs/writing-commands.md > > > > It would be nice to have ~/.commands/foo.js become automatically > available > > etc. However there's code to be written, and security reviews to > be passed > > before we've got that. > > > > Joe. > > > > > > _______________________________________________ > > dev-apps-firefox mailing list > > dev-apps-firefox@lists.mozilla.org > <mailto:dev-apps-firefox@lists.mozilla.org> > > https://lists.mozilla.org/listinfo/dev-apps-firefox > _______________________________________________ > dev-apps-firefox mailing list > dev-apps-firefox@lists.mozilla.org > <mailto:dev-apps-firefox@lists.mozilla.org> > https://lists.mozilla.org/listinfo/dev-apps-firefox > >
![]() |
0 |
![]() |
On 13/12/11 17:04, Rob Campbell wrote: > That'd be cool. We could even have a custom userGCLI.js stashed in the profile that gets loaded when you first start the command line. Can we please think of a more snappy name than "GCLI"? :-) Gerv
![]() |
0 |
![]() |
On Wed, Dec 14, 2011 at 11:43 AM, Gervase Markham <gerv@mozilla.org> wrote: > On 13/12/11 17:04, Rob Campbell wrote: > > That'd be cool. We could even have a custom userGCLI.js stashed in the > profile that gets loaded when you first start the command line. > > Can we please think of a more snappy name than "GCLI"? :-) > Some of us prefer to call it "geekly", does that help? :-) Panos
![]() |
0 |
![]() |
On 14/12/2011 09:43, Gervase Markham wrote: > On 13/12/11 17:04, Rob Campbell wrote: >> That'd be cool. We could even have a custom userGCLI.js stashed in the profile that gets loaded when you first start the command line. > Can we please think of a more snappy name than "GCLI"? :-) To most people it doesn't have a name - it's just the place where you type things in the Web Console. Also we suck a naming, and by suck at naming, I mean that we keep on deciding that the current name is bad, so we bikeshed until we have a different name, which sticks until someone next says we need a new name. :( Joe.
![]() |
0 |
![]() |
On Tue, Dec 13, 2011 at 8:40 PM, Gervase Markham <gerv@mozilla.org> wrote: > On 12/12/11 20:18, Kevin Dangoor wrote: > > https://wiki.mozilla.org/DevTools/ThinkingInCommands > > The most important thing IMO is that addons should be able to add new > commands or sets of commands easily. One would then hope that good > commands would naturally be created, and assembled into sets, which > would acquire reputations, and so on. > > Gerv > > _______________________________________________ > dev-apps-firefox mailing list > dev-apps-firefox@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-apps-firefox > Out of curiosity, what is the intended scope of the (for lack of a better term as yet) GCLI? I assume that it's primary focus will be development, but is it intended to also allow access to basic Firefox functionality? To my mind, there's some crossover between the two. For example, when a tab is pinned as an app tab, my understanding is that it may have elevated privileges (such as more storage space). As a developer, then, I'll want to be able to easily toggle the pinned state of an app tab. Other places where this overlap occurs are: * Full-screen mode * Whether or not DNT is enabled * Whether or not JS, cookies, CSS, etc. are enabled * The character encoding of the document Other useful commands that I've thought of include: * Emulation of network connectivity issues and absence * Execution of bookmarklets (general access to bookmarks) * Execution of arbitrary JS files (i.e. load them in Scratchpad and run them immediately) * Addon enabling/disabling/reloading (perhaps especially useful when developing Jetpack addons) I'll no doubt come up with more over time. :) Barry van Oudtshoorn http://barryvan.com.au/ bvanoudtshoorn@gmail.com
![]() |
0 |
![]() |
On 14/12/2011 10:17, Barry van Oudtshoorn wrote: > Out of curiosity, what is the intended scope of the (for lack of a better > term as yet) GCLI? I assume that it's primary focus will be development, > but is it intended to also allow access to basic Firefox functionality? To > my mind, there's some crossover between the two. For example, when a tab is > pinned as an app tab, my understanding is that it may have elevated > privileges (such as more storage space). As a developer, then, I'll want to > be able to easily toggle the pinned state of an app tab. Other places where > this overlap occurs are: > > * Full-screen mode > * Whether or not DNT is enabled > * Whether or not JS, cookies, CSS, etc. are enabled > * The character encoding of the document > > Other useful commands that I've thought of include: > * Emulation of network connectivity issues and absence > * Execution of bookmarklets (general access to bookmarks) > * Execution of arbitrary JS files (i.e. load them in Scratchpad and run > them immediately) > * Addon enabling/disabling/reloading (perhaps especially useful when > developing Jetpack addons) > > I'll no doubt come up with more over time. :) This is a developer tool. GCLI commands run with chrome privileges. So we need to be as careful with new commands as we would be with any new code - they go through security review. The command line may contain a section bounded by {}, which is plain JavaScript, which executes with content privileges. Hence: � screenshot ~/demo.png Should work once we've written the command � { window.Components.utils.import('blah'); } Exception: Permission denied for to get property XPCComponents.utils � inspect { document.getElementById('foo') } We've not written this yet, and we'll need to be careful about not letting content JS execute with chrome privs, but in principle... Of course there is a better way of doing the above � inspect #foo Joe.
![]() |
0 |
![]() |
On 14.12.2011 11:54, Joe Walker wrote: > GCLI commands run with chrome privileges. So we need to be as careful > with new commands as we would be with any new code - they go through > security review. s/security/peer/
![]() |
0 |
![]() |
On 14/12/2011 13:25, Dao wrote: > On 14.12.2011 11:54, Joe Walker wrote: >> GCLI commands run with chrome privileges. So we need to be as careful >> with new commands as we would be with any new code - they go through >> security review. > > s/security/peer/ All our code goes through peer review. In addition we ask for security review. See: https://bugzilla.mozilla.org/show_bug.cgi?id=664696 https://github.com/mozilla/gcli/blob/master/docs/review/security-review-2011.md Joe.
![]() |
0 |
![]() |
On 14.12.2011 15:55, Joe Walker wrote: > On 14/12/2011 13:25, Dao wrote: >> On 14.12.2011 11:54, Joe Walker wrote: >>> GCLI commands run with chrome privileges. So we need to be as careful >>> with new commands as we would be with any new code - they go through >>> security review. >> >> s/security/peer/ > > All our code goes through peer review. In addition we ask for security > review. Why? You said "we need to be as careful with new commands as we would be with any new code", but obviously we don't security-review all new code.
![]() |
0 |
![]() |
On 14/12/2011 16:07, Dao wrote: > On 14.12.2011 15:55, Joe Walker wrote: >> On 14/12/2011 13:25, Dao wrote: >>> On 14.12.2011 11:54, Joe Walker wrote: >>>> GCLI commands run with chrome privileges. So we need to be as careful >>>> with new commands as we would be with any new code - they go through >>>> security review. >>> >>> s/security/peer/ >> >> All our code goes through peer review. In addition we ask for security >> review. > > Why? You said "we need to be as careful with new commands as we would > be with any new code", but obviously we don't security-review all new > code. New features need security review, so I guess I'm saying that we look at new commands as new features. Joe.
![]() |
0 |
![]() |
Cool and exciting stuff!! How one get's access to the `gcli` object or to a `canon` ? I'd be interested in implementing an SDK API for adding new commands.
![]() |
0 |
![]() |
On 14/12/2011 22:11, rfobic@gmail.com wrote: > Cool and exciting stuff!! > > How one get's access to the `gcli` object or to a `canon` ? I'd be interested in implementing an SDK API for adding new commands. An example: https://hg.mozilla.org/mozilla-central/file/tip/browser/devtools/webconsole/GcliCommands.jsm Further documentation: https://github.com/mozilla/gcli/blob/master/docs/writing-commands.md Joe.
![]() |
0 |
![]() |