Overview
Corral is a data science IDE for R and Python, both first-class, with R first. It lives in your terminal. It gives you what you would otherwise open a desktop IDE for (a script you run piece by piece, a live console, your variables, tables and plots) next to your AI agents, and it opens in about 400 milliseconds.
What you get
- A script editor (Fresh) where Ctrl+R runs the line or the selection and F5 runs the file, with completion from your live R session and formatting with Air.
- A console for R, running on Ark, Positron's R kernel, or plain R if you prefer. Python runs in IPython inside your project's uv environment, in the same spot, one key away.
- A variables pane that updates after every command, and a table viewer for
View()that pages through millions of rows with DuckDB. - Plots in Mirador, a light page in your browser that shows each new plot about 80 ms after it is drawn.
- Agents in the same session. Claude Code runs code in your console with
corral eval, so its objects land where you can see them.
R and Python, both first-class
Both languages get the whole workbench: the editor with completion and formatting (Air for R, Ruff for Python), the console, the variables pane, View(), plots in Mirador and agents running code in your session. R comes first: it is the default console, and its language server is Ark's, which knows your live objects.
Projects often mix the two, so there is no language to choose up front. Running a .py file (or ctrl+b y) brings the Python console into the console spot; the one you are not using waits in a hidden tab and keeps its state.
How it is built
Corral is one small program, corral, written in Rust with no dependencies. It talks to the pieces that do the heavy lifting, most of them written in Rust as well:
| Piece | What it does here |
|---|---|
| herdr TUI | The terminal workspace: herdr's terminal version, not the Herdr App. Every console lives in a herdr pane, so closing the window loses nothing. |
| Ark | The R kernel from Positron: the console and the language server, which knows your live objects. |
| Fresh | The script editor, with a Corral plugin for running code and keeping the draft. |
| Mirador | Corral's viewer in the browser, served by the corral binary: your plots, and tables when you send them there. |
| DuckDB | Queries the tables you open with View(), one page at a time. |
| uv, ty, Ruff | Python: the console's environment, completion and diagnostics. |
The only parts that are not Rust run inside your own sessions: a small R file that R loads, a Python module that IPython loads, and the editor plugin. Architecture has the diagrams: the layers, what runs where, and how code, tables and plots travel.
When Corral acts
Corral stays out of the way of everything you already have:
- In R, it only switches on in the console a Corral layout opens, or in an R where you turn it on (ctrl+b m, or
corral_activate()). Any other R works as always, with its ownView()and graphics device. - The layout (script, console and variables) only appears when you ask for it with ctrl+b a or ctrl+b shift+a.
- Agents use your console only when the workspace has an active Corral console; otherwise they work as usual.
New here? Install Corral, then follow the quick start: it takes about two minutes.