roostdocs

Getting started

Roost is the command line built into the Fruit Bat browser, and the scripting language that goes with it. Everything it does, you could do by hand in the browser; Roost just does it faster, in bulk, or while you're away.

Open Roost

Press Ctrl ` (the key above Tab), click the >_ Roost toolbar button, or choose menu › Roost. A panel opens along the bottom of the window with a prompt:

roost:~$

If you don't see it, Roost may be turned off: Settings › General › Roost browser shell.

Your first commands

Roost
roost:~$ tabs
  1  Fruit bat - Wikipedia            wikipedia.org
  2  Bat facts for kids               batfacts.example
  3  YouTube                          youtube.com
roost:~$ go 2
roost:~$ open "fruit bat diet"
Opened 1 tab.
roost:~$ tabs --site youtube.com | close
Closed 1 tab.

Tabs are numbered from the left (or the top, with vertical tabs). Most commands that act on tabs take numbers (close 4, pin 1 2), or work on the tabs piped into them.

Pipes

Like a Unix shell, | passes what one command finds to the next. Commands that find things (tabs, links, history, bookmarks, page) start a pipe; commands that do things (close, open, group, save) end one, and list commands (grep, sort, head, uniq) go in the middle.

Roost Basic
tabs --dupes | close
links | grep -i pdf | head 3 | open
history --since yesterday | grep recipe | open
tabs --older 3d --unpinned | session save old-tabs --close
page --css ".price" | ask "which is cheapest per item?"

Commands that change a lot at once ask first: This closes 6 tabs. Continue? [y/N]. Type y and Enter to go ahead.

Getting help

  • help lists every command by group; help close explains one, with examples.
  • help scripting is the Roost Basic guide; help roost-script is the Roost Script guide.
  • Tab completes commands, flags, tab numbers and your scripts.

Keys

KeyDoes
Ctrl `Open or close Roost
↑ ↓Go through what you typed before
Ctrl RSearch what you typed before
TabComplete
Ctrl CStop what's running
Ctrl LClear the panel
Ctrl EBack to the script editor

Where next

Once a one-liner isn't enough, save a script. Pick a language: