var zotero = Components.classes["@zotero.org/Zotero;1"] .getService(Components.interfaces.nsISupports)
.wrappedJSObject;
...but all on one line, no spaces before the dots. Sorry, my formatting plugin went b0nkr5.
repl> for each (item in zotero.Items.getAll()) {
....> alert(item.getField("title"));
....> }
Pretty nifty, eh?
Links:
[1] http://zotero.org/
[2] http://hyperstruct.net/projects/mozlab
[3] http://hyperstruct.net/projects/mozrepl/starting-the-repl
[4] http://dev.zotero.org/interacting_with_zotero_from_within_firefox