Install
Before you start you need a Linux system (or Windows with WSL), herdr, and R with two packages. The installer brings everything else, and it checks all of it before it changes anything: if something is missing, it tells you what to run and stops.
Before you install
Have these ready. You don't need to check them by hand: the installer does, and shows the command for anything missing.
| You need | How to get it |
|---|---|
| Linux x86_64, or Windows with WSL | On Windows, install WSL with Ubuntu (wsl --install in PowerShell) and do everything else inside it. macOS is not supported yet. |
curl and tar | Ubuntu has them. If not: sudo apt install curl tar. |
| herdr TUI 0.9.5 or newer | The terminal workspace Corral lives in: herdr TUI, the version of herdr that runs in your terminal, not the Herdr App. Install it from herdr.dev/tui; herdr update updates it. |
R, with the httpgd and jsonlite packages | R from CRAN (or rig). Then the packages: httpgd draws the plots and jsonlite carries the variables. |
$ Rscript -e 'install.packages(c("httpgd", "jsonlite"), repos = "https://cloud.r-project.org")'
Only if you install from a clone of the repository you also need Rust (cargo), to compile corral. The published versions come with it compiled.
What the installer brings
You don't install these yourself. The installer puts corral in place and downloads the rest if you don't have them, all inside ~/.local:
| Program | What it does in Corral |
|---|---|
| Fresh | The script editor. |
| DuckDB | Queries the tables you open with View(). |
| Air | Formats R code. |
| Ark | The R console, Positron's R kernel. The installer brings version 0.1.252, the one Corral was tested with. |
A program you already have on your PATH is left as it is, and Corral uses yours. When a download has a published checksum, the installer checks it. If Ark can't be downloaded, the R console is plain R until corral ark --install gets it.
Optional
| Program | What it adds |
|---|---|
| An agent: Claude Code, Codex, Gemini CLI, opencode… | Install it on its own. The layout opens Claude Code in the agent pane; corral config agent codex picks another. The installer puts Corral's skill where agents look for it; if you install one later, run the install line again. |
| uv | The Python console. Without uv there is no Python in Corral. |
The R packages nanoparquet and rlang | nanoparquet opens large tables faster; rlang saves redrawing a plot. |
| A browser | For Mirador. On WSL, Corral uses your Windows browser; on Linux, xdg-open. |
Install with one line
$ curl -LsSf https://corral-term.dev/install.sh | sh
First it prints a checklist of everything above: what you have (✓), what is missing (✗), what it will download (↓) and what is optional (!). Under each missing item it shows the command that fixes it. If anything required is missing, it changes nothing and stops: fix those and run the same line again. This is what it looks like when everything is there:
Corral 0.1.0: what it needs, without changing anything.
Required
✓ System Linux x86_64 (WSL)
✓ herdr 0.9.5
✓ R 4.6.1
✓ R packages httpgd and jsonlite
Provided by the installer
✓ corral 0.1.0, built
↓ Fresh will download 0.5.9 (script editor)
↓ DuckDB will download 1.4.4 (View() tables)
✓ Air 0.13.0, you already have it
✓ Ark 0.1.252, you already have it
Optional
✓ uv 0.10.4 (Python console)
✓ Skill for agents goes in ~/.agents/skills (Codex and other agents) and ~/.claude/skills (Claude Code)
✓ Browser the Windows one, for Mirador
✓ PATH ~/.local/bin is on the PATH
It never uses sudo and only writes inside your home folder. It also checks that ~/.local/bin is on your PATH, since R and the editor look for corral there; if it isn't, add this line at the end of ~/.bashrc (or ~/.zshrc) and open a new terminal:
export PATH="$HOME/.local/bin:$PATH"
When it finishes, open herdr in a project folder and press ctrl+b a. The quick start takes it from there.
What changes on your machine
Before it touches a file of yours, the installer saves a copy next to it, named *.before-corral-DATE.
- Corral goes in
~/.local/share/corral-term, and the command in~/.local/bin/corral. To use another folder, setCORRAL_DIR=/other/folderbefore you install. - herdr: it links Corral's plugin and adds its shortcuts at the end of
~/.config/herdr/config.toml, between two Corral comments. If you already use one of those keys, it leaves yours and tells you;corral keys --changegives the Corral action another key (see Keyboard shortcuts). - R: one line in
~/.Rprofilethat loads Corral. It only switches on in the consoles Corral opens; your other R sessions don't change. - Fresh: it adds Corral's shortcuts and language servers to
~/.config/fresh/config.jsonwithout removing your settings, and links its plugin. - Agents: it links Corral's skill in
~/.agents/skills/corral-r, the shared folder of the open Agent Skills standard, which Codex and other agents read, and in~/.claude/skills/corral-rif you have Claude Code. If you already have a folder of your own with that name, it leaves it alone.
The line in ~/.Rprofile looks like this, with the full path to your copy of Corral:
if (interactive()) try(source("~/.local/share/corral-term/r/corral.R")) # Corral
Check without installing
To see the checklist without changing anything, add --check:
$ curl -LsSf https://corral-term.dev/install.sh | sh -s -- --check
Once Corral is installed, corral install --check does the same.
Install from a clone
From a copy of the repository, the installer uses that copy where it is, without downloading anything. This is the way to install while the repository is private: the curl line downloads Corral from GitHub, which works once the repository is public.
$ git clone https://github.com/paulovillarroel/corral-term.git
$ sh corral-term/install.sh
If the copy has no compiled corral, the installer builds it with cargo. When you change something in rs/, build it again with cargo build --release; corral --version tells you which folder the binary you are using comes from.
Update
Run the same install line again. It replaces your copy of Corral and doesn't repeat what is already done: in herdr's configuration, for example, it only adds shortcuts that are new.
corral install checks and repairs the installation from the copy you have, without downloading Corral again, and corral install --check only checks.
Uninstall
$ corral uninstall
corral uninstall removes the herdr plugin and shortcuts, the line in ~/.Rprofile, Corral's shortcuts, theme and language servers in the editor (and gives you back your own shortcuts it had replaced), the skill, the programs it downloaded and its copy of Corral. It saves a copy of each file it changes, and it never deletes a cloned copy of the repository.
Your settings and sessions stay in ~/.config/corral and ~/.local/state/corral, in case you come back. Delete them if you won't.
Publish a version
The installer downloads the package of the latest version published on GitHub. That package includes corral already compiled, so nobody needs Rust. The action .github/workflows/version.yml builds it when you push a tag that starts with v. First put the new number in rs/Cargo.toml and herdr/herdr-plugin.toml, so corral --version, the herdr plugin and Mirador say the same, then tag it with that number:
$ git tag v0.1.1
$ git push origin v0.1.1
The binary is static (musl), so it runs on any x86_64 Linux, WSL included.
Without a published version, the installer downloads the code from main and compiles corral with cargo. If there is no cargo, it stops before changing anything and gives you the command to install Rust.
macOS
Corral doesn't work on macOS yet. herdr runs on a Mac, but some pieces of Corral use features only Linux has. Known limits lists them.