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).

OptionWhat it does
--focus agent|codigoFocused on the agent (the default) or on the code, with the script on the left and the agent over the console
--shellAdds a shell next to the variables
--ratio NWidth of the left pane, as a fraction (0.516)
--agent COMMANDThe agent's command (CORRAL_AGENT, then corral config agent, else claude); '' leaves a shell
--editor COMMANDThe editor (fresh, or CORRAL_EDITOR); '' leaves out the script
--console COMMANDThe console's command (CORRAL_R, or corral _console r)
--cwd FOLDERThe folder to open it in (the pane's current folder)
--label NAMEThe 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:

OptionWhat it does
--readPrints the current draft, including what you haven't saved
--save PATHSaves 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 COMMANDThe 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).

OptionWhat it does
--listPrints every shortcut, with its ID
--jsonThe same list as JSON, for agents
--change ID KEYChanges 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.

OptionWhat it does
--lang r|pythonSend to that console instead of the one in view
--sourceRun the code as a file: source() in R, %run -i in Python
--name FILEThe file's name, shown with --source
--clipboardRead 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.

OptionWhat it does
--lang r|pythonThe console to use
--file FILERun a file
--timeout SSeconds to wait for the result (300)
--wait-idle SSeconds to wait for a busy console (20)
--max-chars NLongest output before it is cut (20000)
--checkOnly check that the console is there and print it as JSON
--replaceIts 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).

OptionWhat it does
--jsonPrints them as JSON, for agents; --lang r|python picks the console
--splitAdds the permanent variables pane under the R console
--paneRuns as the permanent pane (what the layout's variables pane runs)
--inlineShows 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.

OptionWhat it does
--openOpens a window even if one is open
--urlPrints the address
--stopStops the server
--foregroundRuns 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.

CommandWhat it is
corral _console r|pythonWhat a console pane runs: Ark, plain R or IPython, according to your settings
corral _lsp r|python|ruffThe editor's language servers: the bridge to Ark's (or languageserver with plain R), ty (or pylsp), and Ruff
corral _miradorMirador's server