Commands
Every Roost command, generated from Fruit Bat 0.55.1. In Roost, help <command> shows the same. In Roost Script each command is a function: wait-for "x" --gone is waitFor('x', { gone: true }).
Tabs
tabs
tabs [numbers…] [--site <site>] [--older <time>] [--dupes] [--group <name>] [--pinned] [--unpinned] [--playing] [--muted] [--asleep] [--awake]
List open tabs (number, title, site)
- Tab numbers count from the left (or the top in vertical tabs).
- --older 3d: tabs you haven’t looked at for that long (12h, 3d, 2w). --dupes: the extra copies of pages open more than once.
- --group picks a tab group by name. --asleep and --awake pick sleeping tabs or the rest. Filters can be combined.
tabs
tabs --site youtube.com
tabs --older 3d --unpinned | close
tabs --dupes | close
tabs --group Research | session save researchgo
go <number>
Switch to a tab
go 3
tabs | grep inbox | goclose
close [numbers…] [--site <site>]
Close tabs (asks first if it’s more than 3)
close 4
tabs --site youtube.com | closepin
pin [numbers…]
Pin tabs
unpin
unpin [numbers…]
Unpin tabs
mute
mute [numbers…]
Mute tabs
tabs --playing | muteunmute
unmute [numbers…]
Unmute tabs
reload
reload [numbers…] [--hard]
Reload tabs (--hard: skip the cache)
group
group "<name>" [--color <color>] [--new]
Put tabs in a tab group (joins one with that name)
- Colors: grey, blue, red, yellow, green, pink, purple, cyan, orange.
- If a group with that name exists, the tabs join it; --new makes a separate one.
tabs 3 7 11 | group "Bat research" --color green
tabs --site github.com | group GitHubnew
new [--window | --private | --vampire]
Open a new tab (or a new window: normal, private or Vampire Bat)
new
new --window
new --private
new --vampireungroup
ungroup [numbers…]
Take tabs out of their groups
collapse
collapse "<group>"
Fold a tab group away
expand
expand "<group>"
Open a folded tab group
move
move --start | --end | --to <number> | --window <number> | --new-window
Move tabs (the current one, or those piped in), here or to another window
- --window takes a number from windows. Tabs only move between windows of the same kind (normal, private, Vampire Bat). Moving to another window reloads them.
tabs --site github.com | move --start
move --to 3
tabs --group Research | move --new-window
move --window 2nest
nest <tab number> · unnest · fold [number] · unfold [number]
Tree tabs: nest tabs under another, take them out, fold a tab’s children away
- Tree tabs work with tabs on the side: config set tabLayout side (and sideTree on).
- Tabs come from a pipe or are the current tab: tabs --site docs.example | nest 3
tabs --site docs.example | nest 3
unnest
fold 3
unfoldunnest
unnest [numbers…]
Take tabs out of the tab they’re nested under
fold
fold [number]
Fold away the tabs nested under a tab (tree tabs)
unfold
unfold [number]
Show the tabs folded under a tab again
window
window min | max | close | quit
This window: minimize, maximize, close it, or quit Fruit Bat
window min
window max
window close
window quitPages
open
open <site or search…> [--here]
Open sites or a search in new tabs (--here: in this tab)
- With links, history or bookmarks piped in, opens each one (asks first past 5).
- Several sites in a row open one tab each.
- Followed by |, the new tabs go along: open a.example b.example | group Work
open github.com
open "fruit bat diet"
history --since yesterday | grep recipe | open
open mail.example cal.example | group Morningurl
url [--clean] [--copy]
The current page’s address (--clean: without tracking tags; --copy: onto the clipboard)
url
url --clean --copypage
page [--css <selector>]
The current page’s text, line by line (or just the parts --css picks)
page | grep -i price
page | wc
page | summarize
page --css ".price"
page --css "h2" | head 5links
links
Every link on the current page
links | grep pdf
links | grep -i chapter | head 3 | openfind
find "<text>"
Find on the page
find "echolocation"reader
reader
Switch Reader view on or off
speak
speak [text…] [--page] [--stop]
Read text aloud with your computer’s voice
- speak "hello" reads the words; page | speak reads what’s piped in; speak --page (or speak on its own) reads the selected text, else the page.
- speak --stop stops. The voice and speed are in Settings › General › Read aloud. Ctrl+Shift+U does the same from anywhere.
speak "Your tabs are tidy"
speak
page --css "article" | speak
speak --stopback
back
Go back on this tab
forward
forward
Go forward on this tab
click
click "<text>" [--nth <n>]
Click a link or button on the page by its text
- Matches the visible text (exact first, then partly). --nth 2 picks the second match.
- Asks first for things like Buy, Pay, Delete, Send, Submit or Sign out. Waits for the page to load after.
click "Next page"
click "Accept all"
click "Reply" --nth 2fill
fill "<field>" "<text>"
Type into a field on the page (found by its label)
- Finds the field by its label, placeholder or name. Works for text boxes, lists (picks the option) and checkboxes (yes/no).
- Never fills passwords, card numbers, security or one-time codes.
fill "Search" "fruit bats"
fill "Email" "me@example.com"
fill "Country" "Canada"scroll
scroll top|bottom|up|down
Scroll the page
wait-for
wait-for "<text>" [--gone] [--timeout <time>]
Wait until the page shows some text, or until it’s gone (10s, up to 1m)
wait-for "results"
wait-for "Order confirmed" --timeout 30s
wait-for "Loading" --gonepress
press <key> [--times <n>]
Press a key on the page (Enter, Escape, Tab, arrows…)
- Keys: enter, return, space, escape, esc, tab, shift+tab, backspace, delete, up, down, left, right, home, end, pageup, pagedown, ctrl+a.
- Enter on a form asks first if the form’s button says something like Buy, Pay, Send or Delete.
fill "Search" "fruit bats"
press enter
press escape
press down --times 3type
type "<text>"
Type into whatever field has the cursor
- Click or fill a field first. Never types into password, card or code fields. Up to 1000 characters.
click "Write a comment"
type "Lovely bats!"hover
hover "<text>"
Move the mouse over something (opens hover menus)
hover "Products"
click "Laptops"zoom
zoom in|out|reset|<percent>
Zoom this page
zoom 125
zoom resetmedia
media [play|pause|toggle|mute|unmute|loop|pip|controls|speed <x>]
The video or audio playing on this page
media
media pause
media speed 1.5
media pip
tabs --playing | gohome
home
Go to your home page in this tab
print-page
print-page
Print this page (opens the print dialog)
fullscreen
fullscreen
Full screen on or off
devtools
devtools
Web developer tools for this page
stop
stop
Stop loading this page
qr
qr [text]
A QR code for this page (or for text you give)
qr
qr "wifi password: bats"screenshot
screenshot [--save]
Copy a picture of what’s showing in this tab (--save: to Downloads)
screenshot
screenshot --saveHistory and bookmarks
history
history [words…] [--since <when>] [-n <count>]
Pages you visited, newest first
- --since takes today, yesterday, 12h, 3d or 2w. Shows 50 unless you pick -n.
history --since yesterday
history recipe -n 10
history --since 3d | grep -i bat | openforget
forget <site>
Remove a site from history (asks first)
forget batwatch.examplebookmarks
bookmarks [folder] [--folders]
List bookmarks (or one folder, with its subfolders)
bookmarks
bookmarks Recipes
bookmarks Work/Projects
bookmarks --folders
bookmarks | grep -i news | openbookmark
bookmark [--to <folder>] [--rm]
Bookmark the current tab, or what’s piped in (--rm: remove those bookmarks)
bookmark
tabs --site arxiv.org | bookmark --to Reading
bookmark --rm
bookmarks | grep old-site.example | bookmark --rmEcho (AI on this computer)
ask
ask "<question>"
Ask Echo about what’s piped in (or this page)
- Echo is the AI on this computer; nothing is sent anywhere.
page | ask "what are the three main points?"
tabs | ask "which of these are about travel?"
ask "what does this page say about prices?"summarize
summarize
Summarize what’s piped in (or this page)
summarize
page | grep -i review | summarizetranslate
translate [--to <language>] [--page | --original | --stop]
Translate what’s piped in (or this page); --page translates the page itself, in place
translate --to spanish
page | head 5 | translate --to french
translate --page --to englishChat (Chirp)
chirp
chirp [list|unread|read|say|share|join|part|open] …
Chat on IRC with Chirp
- chirp (or chirp list) shows your chats; chirp unread only those with new messages.
- chirp read #rust shows the latest messages (-n 20 for more or fewer, up to 200).
- chirp say #rust "text" sends a message; chirp share #rust sends this page’s title and link.
- chirp join #rust, chirp part #rust, and chirp open [#rust] to show Chirp’s panel.
- --net libera picks the network when you’re on more than one.
- Chirp is off until you turn it on (in setup, or Add-ons › Chirp).
- Roost sends at most 5 messages a minute. Echo’s scripts ask you before every message.
chirp unread
chirp read #fruitbat -n 10 | grep -i release
chirp say #fruitbat "back in 10"
chirp share #fruitbat
chirp read #rust | ask "what did I miss?"Wallet (Web3)
wallet
wallet [status|balance|address|accounts|networks|network|activity|sites|disconnect|send|lock|open] …
Fruit Bat Wallet (Web3)
- wallet balance shows your coins on this network; wallet address prints your address (| copy copies it).
- wallet accounts, wallet networks, wallet network base (switch), wallet activity (| open shows them on the explorer).
- wallet sites lists connected sites; wallet disconnect app.example disconnects one.
- wallet send 0.01 ETH to 0x… prepares a payment. Nothing is sent until you press Approve in the wallet panel.
- wallet send only works when you type it, never from scripts, jobs or Echo.
- The wallet must be on (Settings › Wallet). It’s never available in Vampire Bat windows.
wallet
wallet balance
wallet address | copy
wallet activity -n 5 | open
wallet network base
wallet send 0.005 ETH to 0x1234…Downloads, torrents and Lime Blocker
downloads
downloads [--done] · downloads pause|resume|cancel|retry|show|open|remove <n> · downloads clear|folder
Recent downloads, and what to do with them
- Numbers are the order downloads lists them in (newest first).
- downloads open asks first: it opens the file with its app.
downloads
downloads pause 1
downloads retry 2
downloads show 1
downloads folder
downloads clearget
get <address>
Download a file (asks first)
get https://example.com/file.zipblocked
blocked
What Lime Blocker caught today
lime
lime on|off|refresh|receipt
Turn Lime Blocker on or off everywhere, update its lists, or see its receipt
lime
lime off
lime refresh
lime receiptnotify
notify "<text>"
Show a note in the window (and a system notification)
notify "Tickets are on sale!"torrent
torrent [list|add|pause|resume|remove|files|stats|open] …
Torrents with Colony
- torrent lists your torrents (with numbers); torrent add magnet:?… adds one (or pipe links in: links | grep magnet | torrent add).
- torrent pause 2, torrent resume 2, torrent pause all; a torrent is its number, part of its name, or the start of its hash.
- torrent remove 2 asks first and keeps the files; add --files to delete them too.
- torrent files 2, torrent stats, torrent open 2 (shows it in Colony).
- Colony has to be on (Settings › General). Never in private or Vampire Bat windows: peers see your IP address.
torrent
torrent add magnet:?xt=urn:btih:…
links | grep -i magnet | torrent add
torrent pause all
torrent files 1
torrent remove 2Browser, privacy and system
sleep
sleep [numbers…]
Put tabs to sleep to free memory (other tabs if none are given)
- A sleeping tab keeps its place, title and back/forward list, and wakes when you click it.
- The tab you’re looking at, tabs playing sound, tabs with typing you haven’t sent, and Vampire Bat tabs never sleep.
sleep
sleep 4 5
tabs --older 2h | sleep
top -n 3 | sleepwake
wake [numbers…]
Wake sleeping tabs (all of them if none are given)
wake
wake 3
tabs --asleep | grep docs | wakeduplicate
duplicate [numbers…]
Open a copy of tabs, with their back/forward list
duplicate
duplicate 2
tabs --site docs.google.com | duplicatewindows
windows
List your open windows (move tabs with move --window <n>)
windows
tabs --site github.com | move --window 2
move --new-windowperms
perms [site] · perms set <site> <camera|microphone|location|notifications|…> <allow|block|ask> · perms reset <site>
See or change what sites may use (camera, microphone…)
- perms on its own lists every site you’ve decided for; perms example.com shows everything for one site.
- Kinds: camera, microphone, location, notifications, clipboard, midi, openExternal, windows, idle, storage. Screen sharing is asked every time, so it can’t be set.
perms
perms meet.google.com
perms set meet.google.com camera allow
perms reset example.comstorage
storage [--site <site>] · storage clear <site>
What sites keep on this computer (cookies and site data)
- storage clear signs you out of that site. It asks first. Your passwords and bookmarks aren’t touched.
storage
storage | head 10
storage --site youtube.com
storage clear example.comnetwork
network [tab number] [--trackers]
Which sites this page contacted, and what Lime Blocker stopped
network
network 3
network --trackers
network | grep googlesaver
saver [on|off|auto|unplugged|snooze]
Battery saver: see it or change when it turns on
- auto: at 20% battery or less (the default). unplugged: whenever you’re on battery. on: always. off: never. snooze: off until you plug in.
saver
saver unplugged
saver snoozeext
ext [on|off|pin|unpin|open|settings <name>]
Your extensions: list, turn on or off, pin, run
- A name can be part of the extension’s name. open runs it like clicking its toolbar button.
ext
ext off dark reader
ext pin bitwarden
ext open sponsorblock
ext settings stylusstatus
status [refresh]
Is Fruit Bat working? Its services, from status.fruitbat.app
status
status refreshtor
tor [new]
Vampire Bat’s Tor connection (tor new: a new identity)
tor
tor newtop
top [-n <count>]
What’s using memory and processor (your tabs can be piped on)
top
top -n 5
top -n 3 | sleepsysinfo
sysinfo
Fruit Bat’s version, your computer and Fruit Bat’s parts (about:system)
sysinfo
sysinfo | grep -i tor
sysinfo | copySettings, Fruit Bat pages, panels and the rest
config
config [words…] · config get <name> · config set <name> <value> · config reset <name> · config open [section]
Every setting: list, read, change (the same checks as Settings)
- config on its own lists every setting with its value; words filter the list (config tab).
- config set checks the value exactly like the Settings page does, and refuses what Settings would refuse.
- Settings that affect your privacy or security (Lime Blocker, HTTPS-Only, history, Tor, the wallet, Echo in private windows…) ask before changing; add --yes in scripts.
- config open echo opens Settings at that section.
config
config sleep
config get tabLayout
config set tabLayout side
config set sleepAfter 60
config set showBookmarksBar on
config reset searchEngine
config open passwordsabout
about [page]
Open one of Fruit Bat’s own pages (about on its own lists them)
about
about settings
about tasks
about passwords
about historypanel
panel echo | wallet | chirp | <add-on> | ext <name> | close
Open or close a side panel
panel echo
panel wallet
panel chirp
panel ext "Dark Reader"
panel closepasswords
passwords [all] · passwords fill · passwords open
Saved logins: where you have them (never the passwords)
- passwords lists the logins saved for this page’s site (usernames only); passwords all lists every site.
- passwords fill opens the fill menu for this page: you pick the login, like clicking the key in the address bar.
- Roost never shows, copies or types a password. Echo can’t use this command.
passwords
passwords all | grep github
passwords fill
passwords openautofill
autofill · autofill fill address|card · autofill open
Saved addresses and cards: which you have (never the details)
- autofill lists your saved addresses (name and street) and cards (brand and last four digits).
- autofill fill address (or card) opens the fill menu for the form on this page: you pick one, and the page gets it only then.
- Cards fill only on secure pages, and ask for Touch ID on Macs that have it. Echo can’t use this command.
autofill
autofill fill address
autofill fill card
autofill openaddons
addons · addons on|off|private|open <name>
Fruit Bat add-ons (Chirp, Colony Catcher, yours): list, turn on or off
addons
addons on chirp
addons private "colony catcher"
addons open chirpupdate
update [check] · update restart · update channel stable|beta
Fruit Bat updates: what’s installed, check, restart to update
update
update check
update restart
update channel betalogs
logs [source] [words…] [--level warn|error] [-n <count>]
What Fruit Bat’s parts say about themselves (about:logs)
logs
logs tor
logs --level error
logs echo -n 20
logs updates | grep failedschedule
schedule · schedule every <time> <script> · schedule daily <HH:MM> <script> [--weekdays] · schedule startup <script> · schedule run|remove <script>
Run your saved scripts on a timer, even with Roost closed (about:schedule)
schedule
schedule every 2h tidy
schedule daily 08:30 morning --weekdays
schedule startup restore
schedule run tidy
schedule remove tidyYour commands (aliases and scripts)
alias
alias [name [= command…]]
Make a short name for a command line
- alias on its own lists them; alias name shows one. Extra words after an alias go on the end.
- unalias name removes one.
alias bats = tabs | grep -i bat
bats | group "Bats"
alias yt = tabs --site youtube.com
yt | muteunalias
unalias <name>
Remove an alias
script
script ls | new <name> [--js] | edit <name> | show <name> | run <name> [words…] | pin <name> | unpin <name> | export <name> | open | rm <name>
Saved scripts: several lines, run by name
- A script is a few Roost lines saved under a name. Type its name (or run name) to run it.
- It can run when Fruit Bat opens, or from a shortcut (Ctrl+Alt+a letter; ⌘⌥ on Mac). Set those in the editor.
- Lines run in order and stop at the first that fails. Commands that normally ask first need --yes in a script.
- # starts a comment; end a line with \ to continue it on the next.
- Words after a script’s name go to it: tidy youtube.com gives $1 (Roost Basic) or args[0] (Roost Script). remember and recall keep values between runs.
- script pin <name> puts it on the toolbar’s ▶ Scripts button. Your scripts are also in the right-click menu.
- script export <name> saves one as a .roost file. Double-clicking a .roost file, dropping it on Fruit Bat, or script open shows it in Roost, checked with the rules for outside scripts, and asks before it runs.
- script new <name> --js starts one in Roost Script, the JavaScript-style language (help roost-script). The editor can switch a script between the two.
script new morning
script new tidy --js
script ls
morning
script export morning
script open
script rm morningremember
remember <name> <value> | remember <name> --rm | remember --clear | remember
Keep a value for the next time a script runs
- Each saved script has its own memory, and so does the prompt. recall("name") gives it back: in Roost Basic set old = recall("price", 0), in Roost Script const old = recall("price", 0). Numbers come back as numbers.
- remember on its own lists what this script (or the prompt) remembers. --rm forgets one; --clear forgets them all.
- Up to 50 values per script, 2000 characters each. Kept with your settings; deleting a script forgets its memory. Not in private or Vampire Bat windows.
remember price 18.99
remember last-run "${today()}"
remember
remember price --rmrecall
recall <name> [--or <default>]
Show a value a script remembered (in scripts, use recall("name"))
- At the prompt this reads the prompt’s memory. In a script, recall reads that script’s own memory.
recall price
recall price --or 0run
run <script> [words…] [--step]
Run a saved script (or just type its name)
- Words after the name go to the script: in Roost Basic as $1, $2 … $9 and $args (all of them); in Roost Script as args[0], args[1] ….
- --step runs one command at a time: Roost shows the next one and asks y (run it), n (stop) or a (run the rest).
run morning
run tidy --step
tidy youtube.com
run watch-price "https://shop.example/item" 50Sessions
session
session ls | save <name> [--close] | open <name> | rm <name>
Save this window’s tabs and bring them back later
- Groups and pinned tabs come back too. --close closes the tabs after saving (asks first).
- Sessions are saved from normal windows only.
session save research --close
session ls
session open researchAutomation
every
every <time> <command…>
Run a command again and again (at most once a minute)
- Times: 30s, 10m, 2h, 1d. Jobs run in this window until you kill them or close it.
- Commands that ask first need --yes here.
every 15m reload 3
every 1h tabs --dupes | close --yes
every 30m blockedafter
after <time> <command…>
Run a command once, later
after 25m open calendar.example
after 1h tabs --site youtube.com | close --yeswatch
watch [tab number] [--css <selector>] [--every <time>] [--reload]
Tell me when part of a page changes
- --css picks the part to watch (like ".price"); without it the whole page text is watched.
- --reload reloads the page before each check, for pages that don’t update by themselves. Checks every 5m unless you say.
- A change shows here, as a note in the window and (in normal windows) as a system notification.
watch --css ".price" --every 10m --reload
watch 3 --css "#status"
jobs
kill 2jobs
jobs
What’s running in this window (every, after, watch)
kill
kill <job number> | kill all
Stop a job
Getting results out
copy
copy [--csv | --json]
Copy what’s piped in to the clipboard
links | grep pdf | copy
tabs | copy --csv
url | copysave
save [file name] [--csv | --json]
Save what’s piped in to a file in Downloads (asks first)
- This is the only command that writes a file. It goes in your Downloads folder, never anywhere else.
tabs | save my-tabs --csv
page | save article
history --since today | save --jsonjson
json
Show what’s piped in as JSON
tabs | json
links | head 3 | jsonWorking with lists
echo
echo <text…>
Print text (or pass it along)
echo hello
echo github.com | opengrep
grep [-i] [-v] <words>
Keep lines that contain the words
- -i ignores upper/lower case, -v keeps lines that don’t match. Words in quotes are matched together.
tabs | grep -i bat
links | grep -v facebooksort
sort [-r] [--by title|site]
Sort lines
head
head [count]
The first lines (10 unless you say)
tail
tail [count]
The last lines (10 unless you say)
uniq
uniq
Drop repeated lines
wc
wc
Count lines and words
hash
hash [text…] [--md5 | --sha1 | --sha256 | --sha384 | --sha512] [--each]
A checksum (hash) of some text, or of the lines piped in
- sha256 unless you pick another. Handy for checking text against a published checksum, or spotting when part of a page changed.
- Piped lines are hashed together (joined by new lines); --each gives one hash per line.
- md5 and sha1 are fine for checksums but not for anything secret.
- In scripts: md5(text), sha256(text) or hash(text, "sha512").
hash "hello"
hash hello --md5
page --css "#terms" | hash
tabs | hash --eachScripting
scripting
scripting
How Roost scripts work: variables, if, loops, functions
js
js code
Run a line of Roost Script (the JavaScript-style language)
- Roost has two languages. Roost Basic is the shell style (tabs --site x | close). Roost Script looks like JavaScript.
- Commands are functions: tabs({ site: "x" }) runs tabs --site x and gives back the tabs. A list goes in first: close(tabs({ dupes: true })).
- Lists can be piped with a dot: links().grep(/pdf/i).head(3).open(). Commands with actions: chirp.say("#rust", "hi"), wallet.balance().
- At the prompt, let and const stay for the next js line. A saved script is Roost Script when its first line is // roost script.
- Same limits and safety as Roost Basic: Ctrl+C stops it, big changes ask first, and there’s no eval, files or network.
- help roost-script lists everything it can do.
js tabs().length
js tabs().filter(t => t.site === "youtube.com").map(t => t.title)
js for (const t of tabs({ dupes: true })) print(t.title)roost-script
roost-script
The Roost Script guide (the JavaScript-style language)
Roost
help
help [command]
List commands, or explain one
help
help tabs
help grepclear
clear
Clear the screen
exit
exit
Close Roost (Ctrl+` opens it again)
version
version
Fruit Bat and Roost versions