Developers

RBAi CLI

RBAi in your terminal, your folders, your scripts and your IDE’s AI agent: the chat, one-off answers, and commands for your projects, reviews, Galaxy, structures and files.

What the CLI does

rbai uses the same account, chats and projects as the web app. A chat started in the terminal is listed in the web app and continues there.

rbai
The full-screen chat: answers stream as they are written, with each tool call, attachments and slash commands. Started in a folder, it also works with your files there, asking first. Work in a folder
rbai ask
One answer for a script or an AI agent, as text, JSON or a stream of JSON events.
rbai <noun> <verb>
Projects, literature reviews, chats, sources, Studio, slides, Structure Studio, files, jobs, figures, the co-author, Galaxy, Connect and your account. Every command has --help with examples, and -o json.
rbai agent-skill
A skill file that teaches the AI agent in your IDE to use the whole CLI.
rbai mcp serve
An MCP server for Claude Code, Claude Desktop, Cursor, VS Code, Kiro and Codex.

What’s new in 1.6

  • Background specialists. When RBAi hands work to a specialist that runs in the background, the chat shows its end, its question or its request for more credits, then RBAi’s reply, as they come. /specialists shows each one’s state and report, answers it, sends it a message and stops it; rbai specialist does the same from a script.
  • Replies to background work. A background job’s or a specialist’s end wakes RBAi in the chat, and its reply shows there. After rbai ask, rbai session wait <id> waits for that reply and prints it.
  • Type while RBAi answers. Enter sends your message to the running answer, which reads it at its next step. A message to a chat whose answer runs in another window joins that answer.
  • Files from the answer. Word and Excel files RBAi builds, files of the code sandbox, and files and folders on a project’s computer are links in the chat; /download <n> or rbai session save <link> saves them. Images an answer places show with their credit.
  • Memory and projects. rbai memory files and rbai memory read <path> show the memory files every new chat reads; rbai project computer <id> shows a project’s cloud computer.
  • 1.6.1. rbai researcher labs waits up to 80 seconds, since a search for a term Europe PMC has not seen recently can take about a minute. A Galaxy job RBAi cannot read on its server shows “not checked” with the reason (rbai galaxy jobs has a Note column), and rbai job watch keeps waiting instead of calling it failed.

What’s new in 1.5

  • Your own tools. List MCP tool servers in a folder’s .mcp.json, in the format Claude Code uses, or in your own mcp.json, and RBAi uses their tools in chats in that folder, asking before each call. Your own tools

What’s new in 1.4

  • Background jobs. RBAi can start a long command, such as an alignment, a Nextflow pipeline or a large download, as a background job that keeps running after the chat, after rbai closes and after its terminal window closes. Ask about it in a later chat, or run rbai jobs. Background jobs
  • Use a folder from the website (1.3): rbai bridge lets a chat on the website work in a folder on your computer or a lab server, with every change approved in your browser. Use a folder from the website

What’s new in 1.2

  • RBAi works in your folder. Start rbai in a project’s folder and it reads, searches and edits your files and runs your programs on your computer, asking before every change. Work in a folder
  • You decide what it may do: an approval box before each change, command and upload, four modes on Shift+Tab (plan mode is new), and /undo, /rewind, /local log and /local rules. What RBAi asks first
  • PDFs and pictures in the folder are read, large files are read in pieces, and files up to 25 MB can go to the cloud sandbox. Large files, PDFs and pictures
  • One shell for the whole chat: a cd carries over to the next command, and later commands start at once. Commands on your computer
  • RBAI.md keeps notes about the folder that RBAi reads with every message; /init writes one. RBAI.md
  • Scripts and AI agents work in folders too, with rbai ask --local and --allow. In scripts
  • In Windows PowerShell’s older window, the welcome suggests Terminal, where the colours and the RBAi logo show.

Install

The installer needs no Node.js. It downloads the build for your computer, checks its SHA-256 and that it starts, and installs it for you only, with no administrator rights.

curl -fsSL https://cli.thedreamlabinnovations.com/install.sh | sh

The installer puts rbai in ~/.rbai/bin on macOS and Linux and in %LOCALAPPDATA%\Programs\rbai on Windows, and adds it to your PATH. Open a new terminal, then run rbai login. Without curl, use wget -qO- https://cli.thedreamlabinnovations.com/install.sh | sh. With npm you need Node.js 22 or later (nodejs.org(opens in a new tab)); on an older Node, rbai says which version it needs. rbai update updates either kind of install.

On Windows, use Terminal

Open the Start menu, type Terminal, and run the line there (on Windows 10, get Windows Terminal from the Microsoft Store if the Start menu doesn’t find it). Windows PowerShell’s older window works too, but shows a plain box without the RBAi logo, and the welcome says “For colours and the RBAi logo, open this in Terminal.”

Install it one way only. With both npm and the installer, two copies are on your computer and the one it finds first runs, which may be the older one. Troubleshooting shows how to keep one.

Sign in

rbai auth login opens RBAi in your browser with a one-time code. Check that the page shows the same code as your terminal, then approve. RBAi creates an API key named “RBAi CLI on <your computer>” and lists it in Settings → API & MCP → API keys, where you can revoke it. rbai auth status shows the account.

--no-browser
Prints the link instead of opening a browser, for SSH or a machine without one.
--paste, --with-token
Use a key you created in Settings → API & MCP → API keys; --with-token reads it from stdin.
RBAI_API_KEY
For CI and containers: a key in the environment, no sign-in. No command takes a key as a flag.

rbai auth logout revokes the key the browser sign-in made, so that sign-in ends everywhere. A pasted key is only removed from this computer unless you add --revoke.

The chat

rbai opens the chat; rbai -c continues your newest conversation and rbai -r lets you choose one. Each tool call shows its result, and each answer shows its credits and time.

Key or commandWhat it does
@Attach a file from this folder, or tag a tool, skill or database
EscStop the answer; RBAi stops it too
Ctrl-OShow the reasoning and tool details
Shift+TabChange how freely RBAi works in your folder: the four modes
/review <question>Start a literature review and follow it while you chat
/galaxy, /connect, /rbaiSwitch between the Galaxy agent, Connect and the RBAi assistant
/structure, /files, /download <n>Open Structure Studio; list and download an answer’s files
/helpEvery command

A long answer can go on on the server after its first part; the chat follows it to the end. rbai chat --plain is a line-by-line chat for screen readers.

Work in a folder

Started in a folder, rbai works with the files there, on your computer: it reads and searches them, edits scripts and runs your own programs, such as python qc.py or samtools flagstat, asking before every change. Every RBAi cloud tool stays available too: databases, papers, the cloud sandbox, Galaxy and structures.

  1. Install rbai

    Use the one line for your computer under Install, then sign in once with rbai auth login. On Windows, run it in Terminal: open the Start menu and type Terminal.

  2. Go to your folder

    Type cd and the folder, for example cd ~/data/kidney-atlas on macOS or Linux, or cd ~\data\kidney-atlas on Windows.

  3. Start RBAi

    Type rbai and press Enter. The welcome box names the folder on its Folder line. rbai chat --dir <folder> works in another folder without moving.

  4. Answer the folder question

    The first time in a folder, RBAi asks whether it may work there (below). Then ask in plain words, for example Which samples in counts.csv have fewer than 1,000 reads?

The folder question

Let RBAi work in this folder? comes before your first message in a new folder. It reminds you that what RBAi reads is sent to the AI model to answer you, and that it asks before it changes a file or runs a command. Press a number, or use ↑↓ and Enter:

KeyAnswerWhat RBAi may do
1YesRead and search here without asking; ask before every change and every command
2Read onlyRead and search only; it changes nothing and runs nothing
3NoNothing in this folder; the chat works as it does without one

The answer is remembered for that folder, in rbai’s settings on your computer, not in the folder. Change it in the chat with /local on, /local read or /local off. To start once without the folder, use rbai --no-local or rbai chat --no-local.

In your home folder, Enter means No

Started in your home folder, or at the top of a drive such as D:\, the question warns you and Enter means No, because there “this folder” would be every file you have. Elsewhere, Enter means Yes. Start rbai in the project’s own folder instead.

What RBAi asks first

What RBAi doesDoes it ask you first?
Reads, lists and searches files in the folder, PDFs and pictures includedNo
Edits or writes a file in the folder, or saves one from the cloud sandbox into itYes, unless the mode is “edits without asking” or you chose “don’t ask again” for edits
Runs a commandYes, unless you chose “don’t ask again” for it
Sends a file to the cloud sandboxYes, wherever the file is, unless you chose “don’t ask again” for uploads
Reads or changes anything outside the folderYes, every time (in read only and plan modes, nothing is changed at all)

RBAi checks where a file really is, so a link to a file elsewhere counts as outside the folder. These checks are made by rbai on your computer, from your answers, never by the AI.

The approval box

Before a change, a command or an upload, a box with a yellow edge shows exactly what will happen: the command and the folder it runs in, the file with its changed lines (removed lines in red with −, added ones in green with +), or the file for the cloud sandbox and its size. Answer with a key:

KeyWhat it does
1Yes, this time
2Yes, and don’t ask again. For a command, RBAi saves a rule for this folder, kept until you remove it: the program and the word after it, such as python qc.py, so python qc.py --sample S2 runs without asking too. For edits or uploads, it lasts until you leave rbai.
3No, and tell RBAi what to do instead: type one line, such as Write the result to a new file, and press Enter
EscNo

Option 2 is never offered for a command with ;, &, |, <, >, a backtick or $(, because those signs add more commands after the first: python qc.py; rm counts.csv starts like python qc.py but also deletes a file. Such a command asks every time. When the word after the program starts with -, as in samtools --version, the rule allows only that exact command.

One box shows at a time; the others wait their turn. RBAi waits up to 11 minutes for your answer, and the box shows the time left in its last minute. Ctrl-O shows the details of each step. In rbai chat --plain, for screen readers, the same questions come as numbered lines, and Enter means No.

Four modes

Shift+Tab moves to the next mode, and the line under the message box shows which one is on. /mode picks one by name, and rbai chat --mode plan starts in one.

ModeWhat RBAi may doUse it for
asks before changes (ask, the default)Read and search freely; ask before each change, command and uploadEveryday work
edits without asking (edit)Also edit, write and save files in the folder without asking; commands and uploads still askMany small edits you check together afterwards, with /rewind
plan first, no changes (plan)Read only, then reply with a numbered plan. Go ahead with this plan? follows: 1 switches to ask mode and carries it out; 2 keeps planning while you type what to changeA bigger change, to agree on the steps before anything happens
read only (read)Read and search only: nothing is changed or run, and no file goes to the cloud sandboxData that must not change, such as raw sequencing runs, or a folder you are only exploring

Whenever changes are allowed, a change outside the folder asks first, and so does a change that can’t be undone (a file over 50 MB, too big to keep a copy of), even in edit mode.

Undo, the log and saved rules

CommandWhat it does
/undoPuts back the file RBAi changed last, as it was before; a file RBAi created is removed
/rewindLists every file change since rbai started; pick one to put that file back as it was before it (its later changes go too)
/local logThe last 20 things RBAi did on this computer: the time, the step, your answer and the result
/local rulesThe commands that run without asking in this folder (your “don’t ask again” answers), numbered
/local rules remove 2Deletes rule 2, so RBAi asks again before such commands
/localThe folder, the mode, the saved rules and any commands still running

/undo and /rewind work until you leave rbai, for files up to 50 MB; for a bigger file, the box says the change can’t be undone. They put files back, not the conversation. The log and the rules are kept in rbai’s own folders on your computer, never in your project folder.

RBAI.md: notes for the folder

An RBAI.md file at the top of the folder tells RBAi about the project: what the data is, how the files are laid out, how to run the analyses and what must never change. RBAi reads it with every message and follows it, unless that conflicts with what you ask or with safety. Without RBAI.md, it reads AGENTS.md if there is one. The first 20,000 characters count.

/init asks RBAi to look around the folder and write an RBAI.md for you; the write asks first, like any change. It is a plain text file: edit it whenever you like.

RBAI.md
# Kidney organoid atlas

- raw/ holds the sequencer's FASTQ.gz files. Never change, move or delete them.
- counts.csv has one row per sample: sample, reads.
- Run the QC with: python qc.py
- The R scripts need the conda environment "rnaseq".
- Write new results to results/, one file per analysis.

Large files, PDFs and pictures

RBAi never loads a whole large file. It reads up to 2,000 lines at a time, starting at any line, so it can look at the start of a FASTQ, a region of a VCF or the end of a log. Gzipped text, such as .fastq.gz and .vcf.gz, is unpacked as it is read. In our test, the last 8 lines of a 383 MB FASTQ took about 8 seconds.

Files that are not text, such as a BAM or an Excel file, are not read directly. RBAi uses a program for them instead, such as samtools view (a command, so it asks first), or analyses them in the cloud sandbox.

A PDF or a picture in the folder is sent with your message, as a file attached with @ would be, and the AI model reads it: a PDF page by page, a picture as an image. RBAi reads PNG, JPEG, WebP and GIF pictures. TIFF and BMP are sent too, but the model can’t read them, so RBAi asks to convert them first, for example to PNG. Up to 25 MB a file.

The cloud sandbox

The cloud sandbox is your chat’s own computer in RBAi’s cloud, with Python, R, samtools, bcftools, DESeq2, scanpy and more already installed (Code sandbox). When an analysis needs software your computer doesn’t have, RBAi asks to copy the file there (up to 25 MB a file), runs the analysis, and can save the result back into your folder, which asks like any change. The copy stays in the chat’s sandbox until you delete the chat.

Commands on your computer

Commands run in your folder with your own programs: PowerShell on Windows (PowerShell 7 if it is installed, else Windows PowerShell), and your bash or zsh on macOS and Linux. They get the programs and settings of the window you started rbai in, so activate a conda environment first, for example conda activate rnaseq, then type rbai. Your PowerShell profile, .bashrc and .zshrc are not read.

One shell stays open for the whole chat: a cd, or a variable one command sets, is still there for the next command. A command that ends outside your folder sends the next one back into it. The first command waits a few seconds while the shell starts (about 4 to 5 seconds with Windows PowerShell on the laptop we tested); after that, commands start at once.

A command is stopped after 2 minutes, or after up to 10 minutes when RBAi asks for longer; the box says which. Esc stops the answer, and a running command stops with it, together with the programs it started. When a command is stopped, its shell closes, and the next command starts in a new shell, in your folder, without the variables set before.

Longer work, such as an alignment or a pipeline, runs as a background job that keeps going after this chat and after rbai closes. Background jobs

Background jobs

For a command that takes longer than a few minutes, such as an alignment, a Nextflow pipeline or a large download, RBAi starts a background job. It asks first, as for any command, and the box says the command keeps running in the background. The job keeps going after you close rbai and after you close the terminal window; its output goes to a log file. RBAi tells you the job’s id, a short code such as q7mk, and finishes its answer instead of waiting.

Later, in the same folder or another, ask RBAi whether a job has finished, to show the end of its log, or to stop it. Or use the commands, which need no sign-in and cost nothing:

rbai jobs
This folder’s jobs: each one running, or finished with its exit code. rbai jobs --all lists every folder’s.
rbai jobs log <id>
The end of a job’s log (--lines, or --offset to read from a line).
rbai jobs stop <id>
Stop a job and every process it started.
rbai jobs clean
Remove the jobs that ended more than 7 days ago, and their logs, after asking. Nothing is removed on its own.

Sleep and restarts

A job pauses while the computer sleeps and goes on when it wakes. Restarting the computer ends it, and a Windows update can restart the computer on its own, so keep the computer awake and plugged in for long work. A job that ended this way shows as “ended, exit code unknown”.

In rbai ask --local, starting or stopping a job needs --allow run (or a matching --allow "run:…"), like any command. Through rbai bridge, website chats start background jobs too, and the browser’s approval says the command keeps running after the chat.

Your own tools: tool servers

RBAi can already use any program on your computer through commands, such as samtools, R, a conda environment or your lab’s scripts, and checks that a program is installed before relying on it. For tools that come as MCP servers, such as a lab’s LIMS, an internal database or an instrument’s API, list them in the folder’s .mcp.json, in the format Claude Code uses, so one file works for both. Servers you want in every folder go in your own mcp.json in rbai’s config folder (%APPDATA%\rbai\mcp.json on Windows, ~/.config/rbai/mcp.json on macOS and Linux).

.mcp.json
{
  "mcpServers": {
    "lims": { "command": "python", "args": ["lims_server.py"], "env": { "LIMS_TOKEN": "${LIMS_TOKEN}" } },
    "atlas": { "type": "http", "url": "https://atlas.example.org/mcp", "headers": { "Authorization": "Bearer ${ATLAS_TOKEN}" } }
  }
}
  • Trust first. A folder’s servers start only after you trust its .mcp.json once: the chat asks before your first message, or run rbai tools trust. If the file changes, it asks again. Your own mcp.json needs no trust.
  • RBAi asks before each call, showing the server, the tool and its arguments. “Yes, and don’t ask again” keeps that tool for the folder; /tools allow <server> allows a server until rbai ends (--folder: for the folder). In plan and read-only modes RBAi uses only the tools their server marks read-only.
  • Secrets stay on your computer. ${VAR} and ${VAR:-default} are read from your environment when rbai starts a server. Only the tools’ names, descriptions and input schemas go to RBAi, and what a tool returns when RBAi calls it.
  • Big results (over 25,000 characters) and images are saved in rbai’s state folder (tool-results, kept 7 days), and RBAi reads them from there in parts.
rbai tools
The tool servers of this folder and yours: where each is listed, its state and its tools (-o json too). Needs no sign-in.
rbai tools trust
Trust this folder’s .mcp.json as it is now.
rbai tools forget
Forget the folder’s trust and the tools you allowed there.
/tools
In a chat: the same list, live; /tools trust and /tools allow work there too.

In rbai ask --local, tool servers start only with --allow tools (for that run), and their tools then run without asking. rbai bridge asks about the folder’s .mcp.json in its window, and website chats in the folder get the same tools; the approval in your browser names the tool server. HTTP servers take headers; sign-in flows (OAuth) are not supported yet.

Changed in 1.5

rbai tools was another name for rbai tool, RBAi’s own tool catalogue, until 1.4. That command is still rbai tool.

In scripts: rbai ask --local

rbai ask answers one question without the full-screen chat, for scripts, pipelines and AI agents. With --local it works in the current folder, or in --local <folder>, and it never stops to ask: you say beforehand what it may do. Put the question before --local.

Terminal
rbai ask "Which samples in counts.csv have fewer than 1,000 reads?" --local
rbai ask "Find the bug in qc.py, fix it and run it" --local --allow edit --allow "run:python qc.py"
rbai ask "Filter calls.vcf.gz to QUAL above 30 in the cloud sandbox" --local ./run-42 --allow upload --output-format stream-json
No --allow
Reads, lists and searches files in the folder, PDFs and pictures included.
--allow edit
Also edits and writes files in the folder, and saves files from the cloud sandbox into it.
--allow upload
Also sends files from the folder to the cloud sandbox.
--allow "run:python qc.py"
Also runs commands that start with these two words and have none of ; & | < >, a backtick or $(. Repeat it for each command.
--allow run
Also runs any command. Use it only for a folder and a question you trust.

Everything else, and anything outside the folder, is refused, and RBAi is told which flag would allow it. It then finds another way or asks you; a question ends the run with exit code 8, as for any rbai ask (Exit codes). With --output-format stream-json, every step on your computer is a local-call event, with what RBAi asked for, and a local-result event, with ok, denied, a short summary and the exit code. With json, the steps are in toolCalls.

What is sent where

  • Your files stay on your computer. rbai doesn’t copy or sync the folder. What does leave your computer is listed here.
  • What RBAi reads goes to the AI model, and is saved with the chat. That means the lines it reads, the file names it lists, what its searches find and each command’s output. A PDF or picture it reads is sent whole, attached to your message as with @. All of it goes to the AI model, hosted on Microsoft Azure, to answer you, and is saved with the chat on RBAi’s servers until you delete the chat. Reads inside the folder don’t ask first.
  • With each message go the folder’s path, your system (Windows, macOS or Linux) and its shell, the git branch and the number of changed files if the folder uses git, and the text of RBAI.md.
  • A whole file goes to the cloud sandbox only when you say yes, or with --allow upload in a script. It stays in your chat’s sandbox until you delete the chat.
  • The rules are checked on your computer. rbai decides what may happen from your answers, the mode and your saved rules. The AI can ask for a step, but it can never approve one.

Commands run as you, so they can reach what your user account can, like any program you start: read each command before you press 1. More in Where requests go and Export or delete your data.

What it costs

Messages cost credits, as in any chat, and each answer shows its credits under it. A short message in a folder typically costs 5 to 8 credits (measured on 6 November 2026). A long task costs more, because everything RBAi reads and each command’s output count toward the message, so point it at the files that matter.

Commands on your own computer use no Code sandbox time. Work in the cloud sandbox counts toward it, as in the web app. Credits and billing

Troubleshooting

A plain box without the RBAi logo
You are in Windows PowerShell’s older window, and the welcome says “For colours and the RBAi logo, open this in Terminal.” Open Terminal from the Start menu and start rbai there.
An old version starts, or there are two copies
npm and the installer each put an rbai on your computer, and the one your computer finds first runs. rbai --version shows the version that runs; Get-Command rbai -All in PowerShell, or which -a rbai on macOS and Linux, lists every copy. Keep one: to keep the installer’s, run npm uninstall -g rbai-cli; to keep npm’s, delete the folder %LOCALAPPDATA%\Programs\rbai (Windows) or ~/.rbai/bin (macOS, Linux). Then open a new window.
RBAi says it can’t see your files
Look at the welcome’s Folder line. An rbai older than 1.2 has no folder mode: run rbai update. After --no-local, start again without it. If you answered No to the folder question, type /local on. After /galaxy or /connect, /rbai brings back the assistant that works in folders. Started in the wrong folder? cd to the right one and start rbai again.
A program isn’t found
Commands use the programs on your computer, so “not recognized” or “command not found” means the program isn’t installed there, or its conda environment wasn’t active when you started rbai. Install it, start rbai from a window where the program works, or ask RBAi to run the analysis in the cloud sandbox instead.
The first command takes a few seconds (Windows)
That is PowerShell starting; the commands after it start at once. If PowerShell 7 is installed, rbai uses it instead of Windows PowerShell.
A folder name with [ or ] (Windows)
Commands still run in the folder, but some PowerShell commands read [ and ] in a path as a pattern and don’t find the file. RBAi usually tries another way; if it keeps failing, rename the folder without brackets.
RBAi asks again for a command you allowed
A rule covers the program and the word after it only: python qc.py doesn’t cover python plot.py. A command with ;, | or > asks every time. /local rules shows what is saved.

Use a folder from the website

A chat or project on the website can work in a folder on your own computer, or on a lab server, as rbai does in a terminal (Work in a folder): RBAi reads and searches the files there, and edits files and runs programs after you say yes in the browser. Every RBAi cloud tool stays available too.

  1. Update rbai

    On the computer with your files, rbai update brings rbai to 1.3.0 or later, which has rbai bridge. New to rbai? Install it with one line (Install) and sign in once with rbai auth login.

  2. Start rbai bridge and link this browser

    Open a terminal in the folder you want RBAi to work in and type rbai bridge; the first time, it asks whether RBAi may work in this folder. Keep its window open. Then, on the website, open Settings → Your computers and choose Link this browser: the page shows a key in four groups, such as 3F9A 21C0 7B44 E912, and the rbai window shows the same key. Check that they match, then type y in the rbai window. A browser is linked once for each computer.

  3. Choose the folder in a chat

    The folder button in the message box lists the folders rbai bridge has open on your linked computers. Pick one, and how RBAi works there: Asks before changes, Edits without asking, Plan first or Read only. Each chat keeps its folder on every browser and device you sign in on: on one that isn’t linked, RBAi still reads there, and you link that browser once to approve changes from it. In a project, the folder is the project’s, for all of its chats (Where your project’s work runs).

Reads and searches inside the folder run at once, and the Work log marks them This computer. Before a change, a command or an upload, a card in the chat shows exactly what will happen: the command and the folder it runs in, or the file with its changed lines. Answer Yes, Yes, and don’t ask again for that kind of step when the card offers it, or No with what RBAi should do instead; Esc means No. RBAi waits up to 11 minutes for an answer, and the card shows the time left in the last minute. With Plan first, RBAi only reads, replies with a numbered plan and asks Go ahead with this plan?; Go ahead switches the chat to Asks before changes.

Offline means the website cannot reach rbai bridge on that computer: its window was closed or stopped with Ctrl-C, or the computer slept or lost its connection. The folder button then reads “offline”, Settings → Your computers says when the computer was last seen, and a message sent in that folder gets “Your computer isn’t connected. Run rbai bridge in the folder, then try again.” A step that was waiting on the computer ends about a minute after it went offline, and the Work log says “Your computer went offline”. Start rbai bridge in the folder again, and the folder is back.

The same works on a lab’s Linux server: run rbai bridge there in the project’s folder, and chats on the website can use that server’s files and programs. The folder’s own mode on the computer (rbai bridge --mode ask, edit or read) is the most a chat can use: a chat can choose that mode or a stricter one.

What is sent where

  • Your files stay on your computer. Nothing copies or syncs the folder.
  • What RBAi reads goes to the AI model, and is saved with the chat: the lines it reads, the file names it lists, what its searches find and each command’s output. With each message go the folder’s path, your system and its shell, the git branch if there is one, and the folder’s RBAI.md. The same as in a terminal: What is sent where.
  • A whole file goes to the chat’s cloud sandbox only when you say yes. It stays there until you delete the chat.

How your answers are protected

Linking makes a key in this browser that never leaves it, and rbai bridge keeps its public half only after you type y on the computer, so someone who got into your RBAi account still could not link a browser of their own. Each answer is signed with that key over the exact card you saw, and rbai bridge checks the signature, the key and the card before it runs anything: RBAi’s servers pass your answers on, but cannot make one up or change what you approved. To stop, close the rbai window or press Ctrl-C there. Unlink this browser in Settings deletes this browser’s key, and rbai bridge --forget-browsers makes the computer forget every browser.

rbai ask, for scripts and agents

Terminal
rbai ask "Name three BRCA1 interactors"
rbai ask --continue "And their roles in DNA repair?"
rbai ask "Summarise these results" --attach results.csv
rbai ask "Which databases cover TP53 variants?" --output-format stream-json

Each run is a stored chat; --session <id> or --continue goes on with it. --output-format text (the default) prints only the answer, json one object at the end, and stream-json one JSON event per line: session, text-delta, reasoning-delta, tool-call, tool-result, local-call and local-result (with --local), file, ask-user, turn-continues, error and done.

When RBAi asks a question back

Nothing is answered for you: in a script the turn stops and rbai ask exits with code 8. Answer with rbai ask --session <id> "<answer>".

Research from the terminal

Terminal
rbai review create "CRISPR off-target effects in primary human T cells" --level medium --wait
rbai review export <id> --dest review.md
rbai galaxy ask "Run FastQC on the two FASTQ files in my newest history"
rbai structure ask <chat id> <tool call id> "Colour the residues within 5 Å of the peptide"
rbai source add <project id> --paper 10.1038/nature12373
rbai slides create "A 5-slide talk on base editing" --wait

Galaxy uses the key saved in Settings → Galaxy (or rbai galaxy key set). Structure Studio works on a structure a chat showed, once it was opened in the 3D viewer. Connect drafts emails but never sends one from the terminal.

AI agents in your IDE

An AI agent in your editor can drive the whole CLI. rbai agent-skill writes a skill file, generated from your installed version, that teaches it how: signing in, -o json, exit codes, rbai ask, and recipes for reviews, Galaxy, structures and files. It asks before writing and never replaces a file without --force.

Terminal
rbai agent-skill --client claude-code --write   # also kiro, cursor, codex, vscode, gemini
rbai mcp config --client cursor --tools review,project,source,galaxy
rbai mcp tools

rbai mcp config prints the snippet to paste into your client’s MCP settings; it holds no key. By default the server offers a small set of tools and rbai_agent_chat, the assistant itself. --tools <group,...> or --tools all adds whole command groups, and their deletes only with --allow-destructive, which your client confirms with you. Signing in and API keys are never tools.

For AI agents and IDEs

An AI agent that has never seen RBAi can learn the whole CLI from plain Markdown files, the same text the installed rbai prints. They need no JavaScript, so any agent’s web fetch can read them.

The agent guide
docs/cli/agents.md(opens in a new tab), or rbai help agents: signing in, JSON output, what to do on each exit code, rbai ask and its events, credits, safety, and recipes for literature reviews, Galaxy, structures, Connect, files and projects.
The command reference
docs/cli/reference.md(opens in a new tab), or rbai help reference: every command with its flags, defaults, credits and exit codes. rbai commands --json is the same as JSON.
This page as Markdown
docs/cli/index.md(opens in a new tab), the CLI’s README.

rbai agent-skill --kit <folder> writes the agent kit: the skill, a Claude Code plugin and marketplace, a Kiro power, a Gemini CLI extension, AGENTS.md for Codex, Cursor and GitHub Copilot rules, and an entry for the MCP Registry. None of the files holds a key: every MCP entry runs rbai mcp serve, which uses your rbai auth login.

Keys stay out of chats

Never paste an API key into an AI chat. Sign in with rbai auth login, or put a key in the RBAI_API_KEY environment variable for CI.

Output and scripting

-o json, -o yaml and -o tsv change the format, and --query picks fields with a JMESPath expression, for example rbai project list -o tsv -q --query "[].id". Data goes to stdout; progress, hints and errors go to stderr. With --no-input, nothing waits for a keyboard, and a delete needs --yes. rbai commands --json describes every command for agents, and rbai api <path> calls any route with the same sign-in.

Exit codes

CodeMeaning
0Success
1Another error, or a job that ended failed under --wait
2Wrong arguments or flags, or a delete without --yes when there is no terminal
3Not signed in, or not allowed
4Not found
5Out of credits, or a rate limit; the message says which
6No answer from RBAi (the network, or a timeout)
7RBAi failed on its side
8RBAi asked a question and nobody was at the terminal to answer it
130Stopped with Ctrl-C

Networks, updates and privacy

HTTPS_PROXY, HTTP_PROXY, NO_PROXY
Proxies for every request the CLI makes, as on university and company networks. rbai doctor shows the one in use.
NODE_EXTRA_CA_CERTS
A PEM file of extra CA certificates, for a network that re-signs TLS.
RBAI_NO_UPDATE_CHECK=1
Turns off the daily check for a newer version.
NO_COLOR
No colour. rbai help environment lists every variable.

Once a day in a terminal, rbai asks the npm registry for the newest version and prints one line when there is one; it never slows a command and is off in CI. rbai update shows the command for how you installed it and runs it if you say yes. The CLI has no telemetry: it talks to RBAi, to the storage links RBAi gives it for your files, and to that daily check. In a folder, What is sent where lists what goes to RBAi.

Uninstall
rbai auth logout
npm uninstall -g rbai-cli

Questions or problems: rbai doctor checks your setup, or write to hari@thedreamlabinnovations.com.