Commands
Every corral command, with its options. corral --help lists them, and corral COMMAND --help shows a command's usage.
Corral's messages are in Spanish, and some commands and options keep Spanish names: instalar (install), desinstalar (uninstall), atajos (shortcuts), --check (check), --read (read), --save (save), --write (write), --replace (replace), --force (force).
Workspace
corral layout
Opens the workspace in a new tab: the agent, the script, the console and the variables (ctrl+b a; with --focus code, ctrl+b shift+a).
| Option | What it does |
|---|---|
--focus agent|codigo | Focused on the agent (the default) or on the code, with the script on the left and the agent over the console |
--shell | Adds a shell next to the variables |
--ratio N | Width of the left pane, as a fraction (0.516) |
--agent COMMAND | The agent's command (CORRAL_AGENT, then corral config agent, else claude); '' leaves a shell |
--editor COMMAND | The editor (fresh, or CORRAL_EDITOR); '' leaves out the script |
--console COMMAND | The console's command (CORRAL_R, or corral _console r) |
--cwd FOLDER | The folder to open it in (the pane's current folder) |
--label NAME | The tab's name (corral) |
corral close
Closes Corral's panes in the tab (script, console, variables, the shell from --shell, and the ones in the hidden tab) and leaves the rest, Claude included (ctrl+b shift+c). The R session closes with its pane, and the unsaved draft is discarded.
corral toggle
$ corral toggle script
Expands the script or the console, or shows both again (ctrl+b t). It takes script, consola (console) or ambos (both), and agente (agent) instead of script in the layout focused on the code. Without an argument, it expands the pane you are in, or goes back to both.
corral switch
$ corral switch python
The layout's console switches to r or python; without an argument, to the other one (ctrl+b y). The first time, it starts Python. The other console keeps running in the "corral (oculto)" tab.
corral script
Adds the editor over the console in an existing layout, with a new draft or the file you name. With one of these options, it works on the workspace's draft instead:
| Option | What it does |
|---|---|
--read | Prints the current draft, including what you haven't saved |
--save PATH | Saves the draft to that file; --force replaces an existing one |
--write [FILE] | Adds the text from stdin (or from the file) at the end of the draft, as one edit that Ctrl+Z undoes; --replace replaces everything |
--editor COMMAND | The editor to add (fresh, or CORRAL_EDITOR) |
corral console
Marks the current pane as the R or Python console, by what runs in it, and switches Corral on if R or IPython is open there (ctrl+b m). --lang r|python sets the language and --pane PANE marks another pane.
corral keys
The shortcut palette (ctrl+b space).
| Option | What it does |
|---|---|
--list | Prints every shortcut, with its ID |
--json | The same list as JSON, for agents |
--change ID KEY | Changes a herdr shortcut (corral keys --change herdr:toggle shift+e) or an editor one (editor:corral_run_line ctrl+e); it refuses keys already in use unless you add --force |
Code and data
corral send
$ corral send 'summary(mtcars)'
Sends code to the console in view, bringing it into view (and starting it) if needed; this is what Ctrl+R, F5 and ctrl+b enter run. Without code in the arguments, it reads stdin or herdr's selection.
| Option | What it does |
|---|---|
--lang r|python | Send to that console instead of the one in view |
--source | Run the code as a file: source() in R, %run -i in Python |
--name FILE | The file's name, shown with --source |
--clipboard | Read the clipboard when there is nothing else to send (from a herdr shortcut, it always does) |
corral eval
$ corral eval 'summary(mtcars)'
Runs code in your console and prints the output, for agents. R by default.
| Option | What it does |
|---|---|
--lang r|python | The console to use |
--file FILE | Run a file |
--timeout S | Seconds to wait for the result (300) |
--wait-idle S | Seconds to wait for a busy console (20) |
--max-chars N | Longest output before it is cut (20000) |
--check | Only check that the console is there and print it as JSON |
--replace | Its plots replace the ones from the previous request |
Working with agents explains the output and the exit codes.
corral vars
The variables of the console in view, over the terminal (ctrl+b d).
| Option | What it does |
|---|---|
--json | Prints them as JSON, for agents; --lang r|python picks the console |
--split | Adds the permanent variables pane under the R console |
--pane | Runs as the permanent pane (what the layout's variables pane runs) |
--inline | Shows them in the current terminal instead of a popup |
corral view
$ corral view data/sales.parquet
Opens a table (parquet, CSV, JSON) in the table viewer. --title TITLE sets its title, --mirador opens it in Mirador instead, --inline shows it in the current terminal instead of a popup, and --session SESSION ties it to a session in Mirador.
corral plots
The latest plot, in Mirador (ctrl+b f); on a terminal that draws images, in a herdr popup. --inline shows the in-terminal viewer in the current terminal.
corral mirador
Mirador, the view in the browser. Without options, it starts the server if needed and opens a window if none is open.
| Option | What it does |
|---|---|
--open | Opens a window even if one is open |
--url | Prints the address |
--stop | Stops the server |
--foreground | Runs the server in this terminal |
corral open
$ corral open http://localhost:8080
Opens a local URL in the browser; this is what Ctrl+click on a local address in herdr runs. Without a URL, it opens Mirador.
Installation and settings
corral config
$ corral config r_console r
Reads or changes the settings: corral config prints them all, corral config KEY one, and corral config KEY VALUE sets it. Configuration lists every key.
corral theme
Applies herdr's theme to the editor, the viewers, VisiData and Mirador now. --show only prints the palette.
corral ark
Shows whether the R console uses Ark and what is installed. --install [VERSION] downloads Ark (0.1.252 by default, the tested version).
corral doctor
Checks the dependencies, the herdr plugin, the theme, Mirador, the browser, and which terminal it detects, one line each.
corral install
Checks the requirements and repairs the installation, without downloading Corral. --check only checks.
corral uninstall
Removes Corral from herdr, R, the editor and Claude Code. Your settings and sessions stay. See Install.
corral --version
Prints the version and the folder the binary comes from. corral --help (or corral ayuda) lists the commands.
Internal commands
Corral's panes and the editor run these. You don't need to call them, but they show up in process lists and on the Performance page.
| Command | What it is |
|---|---|
corral _console r|python | What a console pane runs: Ark, plain R or IPython, according to your settings |
corral _lsp r|python|ruff | The editor's language servers: the bridge to Ark's (or languageserver with plain R), ty (or pylsp), and Ruff |
corral _mirador | Mirador's server |