rbx#
The rbx CLI is the main entry point for all operations. It provides a set of
commands to manage problems, contests, and the environment.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
-c, --cache |
CacheLevel | Which degree of caching to use. | CACHE_ALL |
--sanitized, -s |
BOOLEAN | Whether to compile and run testlib components with sanitizers enabled. If you want to run the solutions with sanitizers enabled, use the "-s" flag in the corresponding run command. | False |
--capture, -cp |
BOOLEAN | Whether to save extra logs and outputs from interactive solutions. | True |
-p, --profile |
TEXT | Which timing profile to use when running solutions. | - |
--profiling |
BOOLEAN | Whether to profile (capture performance statistics) of the execution. | False |
-C, --contest |
TEXT | Select a contest variant by id (when contest.rbx.yml has sibling variants). Defaults to the RBX_CONTEST env var; optional when only one contest applies. | - |
--version, -v |
BOOLEAN | - | False |
Commands#
| Command | Description |
|---|---|
rbx each |
Run a command for each problem in the contest. Chain commands with :: to queue them. |
rbx on |
Run a command in the context of a problem (or a set of problems) of a contest. Chain commands with :: to queue them. |
rbx ui |
Show an UI for exploring testcases of the current problem. |
each#
Runs a command for each problem in the contest, in a TUI with one tab per problem.
Chain several commands with :: to queue them all at once, in order:
Each problem runs its whole chain before the next problem starts. If a command in
a chain fails, the rest of that problem's chain is skipped -- pass
-k/--keep-going to run it anyway. Other problems are unaffected either way.
Commands you type into the TUI later are queued too, but they always run, even after a failure.
Pass -i/--inline to skip the TUI and run every problem's chain straight in
your terminal, one after another. Nothing is interactive in that mode, and the
command exits non-zero if any command failed, so it is the mode to reach for
from a script.
Pass -p/--parallel to run the problems at the same time rather than one
after another. Each problem's chain still runs in order. Only do this when the
commands do not compete for something they need alone -- timing solutions in
parallel, for instance, skews the measurements. In the TUI every tab runs on its
own; inline, each command's output is held back and printed in one block when
it finishes, so problems running side by side do not interleave their lines:
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--keep-going, -k |
BOOLEAN | Keep running the rest of a chain in a problem even after a command fails. Must come before the problem selector in rbx on. |
False |
--inline, -i |
BOOLEAN | Run the commands straight in this terminal, one after another, instead of opening the TUI. Must come before the problem selector in rbx on. |
False |
--parallel, -p |
BOOLEAN | Run the problems at the same time instead of one after another. Each problem's chain still runs in order. Must come before the problem selector in rbx on. |
False |
on#
Runs a command in the context of one problem (or a set of problems) of a contest.
The problem selector is a comma-separated list. Each entry names a problem by its
short name, by the name it declares in its problem.rbx.yml, by one of its
aliases, or by the basename of its folder -- looked up in that order, so the
letter always wins over another problem's alias.
| Selector | Selects |
|---|---|
B |
the problem whose short name, name, alias or folder is B |
A,C |
both problems |
A..C |
every problem from A to C, in contest order |
day1-* |
every problem matching the pattern (* and ? are wildcards) |
* |
every problem in the contest |
*,!C |
every problem but C |
!C |
the same -- a selector of exclusions starts from every problem |
Ranges are written with two dots: A-C is read as a literal name, since a
problem may well be called two-sum. An entry that matches no problem is an
error, so a typo never runs on a subset of what you meant.
Quote selectors that use * or !, which your shell would otherwise expand.
Like rbx each, commands can be chained with :::
A single command on a single problem runs directly in your terminal; anything
else opens the TUI. Pass -i/--inline to keep everything in the terminal
instead, running each problem's chain in turn and exiting non-zero if any
command failed -- handy for a couple of problems, or for a script that cannot
answer a TUI.
Pass -p/--parallel to run the selected problems at the same time instead
of one after another, as described for rbx each.
Since flags after the problem selector belong to the chained commands,
-k/--keep-going, -i/--inline and -p/--parallel have to come first:
rbx on -ik A build :: run.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
PROBLEMS |
Problems to run on: short names, names, aliases or folders, comma-separated. Also A..C, *, globs and ! exclusions. |
Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--keep-going, -k |
BOOLEAN | Keep running the rest of a chain in a problem even after a command fails. Must come before the problem selector in rbx on. |
False |
--inline, -i |
BOOLEAN | Run the commands straight in this terminal, one after another, instead of opening the TUI. Must come before the problem selector in rbx on. |
False |
--parallel, -p |
BOOLEAN | Run the problems at the same time instead of one after another. Each problem's chain still runs in order. Must come before the problem selector in rbx on. |
False |
ui#
Show an UI for exploring testcases of the current problem.
Usage:
Configuration#
| Command | Description |
|---|---|
rbx config |
Manage setter configuration (sub-command). |
rbx docker |
Manage the Docker container rbx runs programs in (sub-command). |
rbx edit |
Open problem.rbx.yml in your default editor. |
rbx environment |
Set or show the current box environment. |
rbx header |
Generate the rbx.h header file. |
rbx languages |
List the languages available in this environment |
rbx presets |
Manage presets (sub-command). |
rbx vars |
Show the expanded vars of this problem. |
config (cfg)#
Manage setter configuration (sub-command).
Usage:
| Command | Description |
|---|---|
rbx config edit |
Open the setter config in an editor. |
rbx config list |
Pretty print the config file. |
rbx config path |
Show the path to the setter config. |
rbx config reset |
Reset the config file to the default one. |
edit#
Open the setter config in an editor.
Usage:
list (ls)#
Pretty print the config file.
Usage:
path#
Show the path to the setter config.
Usage:
reset#
Reset the config file to the default one.
Usage:
docker#
Manage the Docker container rbx runs programs in (sub-command).
Usage:
| Command | Description |
|---|---|
rbx docker disable |
Run programs directly on this machine again. |
rbx docker down |
Stop and remove the container. |
rbx docker enable |
Run programs in a Docker container from now on (opt-in). |
rbx docker rebuild |
Rebuild the image from scratch, pulling a fresh base image. |
rbx docker shell |
Open a shell in the container, as you. |
rbx docker status |
Show the Docker configuration and container state. |
rbx docker up |
Build the image if needed and start the container. |
disable#
Run programs directly on this machine again.
Usage:
down#
Stop and remove the container.
Usage:
enable#
Run programs in a Docker container from now on (opt-in).
Usage:
rebuild#
Rebuild the image from scratch, pulling a fresh base image.
Usage:
shell#
Open a shell in the container, as you.
Usage:
status#
Show the Docker configuration and container state.
Usage:
up#
Build the image if needed and start the container.
Usage:
edit (e)#
Open problem.rbx.yml in your default editor.
Usage:
environment (env)#
Set or show the current box environment.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
ENV |
- | No |
| Name | Type | Description | Default |
|---|---|---|---|
--install, -i |
TEXT | Whether to install this environment from the given file. | - |
header#
Generate the rbx.h header file.
Usage:
languages#
List the languages available in this environment
Usage:
presets#
Manage presets (sub-command).
Usage:
| Command | Description |
|---|---|
rbx presets create |
Create a new preset. |
rbx presets ls |
List details about the active preset. |
rbx presets registry |
Manage the preset registry. |
rbx presets sync |
Sync current package assets with those provided by the installed preset. |
rbx presets update |
Update preset of current package |
create#
Create a new preset.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--name |
TEXT | The name of the preset to create. This will also be the name of the folder. A relative path may be given, in which case the preset name is its basename. | - |
--uri |
TEXT | The URI of the new preset. | - |
--preset, -p |
TEXT | The URI of the preset to init the new preset from. | - |
--local |
BOOLEAN | Whether to fetch the init preset from the local version of rbx, instead of the remote one (not recommended). | False |
ls#
List details about the active preset.
Usage:
registry#
Manage the preset registry.
Usage:
| Command | Description |
|---|---|
rbx presets registry add |
Add a preset to the user registry. |
rbx presets registry ls |
List presets available in the registry. |
rbx presets registry rm |
Remove a preset from the user registry. |
add#
Add a preset to the user registry.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
URI |
URI of the preset to register (owner/repo, URL, or path). | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--local |
BOOLEAN | Resolve the preset from the local rbx version. | False |
ls#
List presets available in the registry.
Usage:
rm#
Remove a preset from the user registry.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAME |
Name of the preset to remove. | Yes |
sync#
Sync current package assets with those provided by the installed preset.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--update, -u |
BOOLEAN | Whether to fetch an up-to-date version of the installed preset from remote, if available. | False |
--force, -f |
BOOLEAN | Whether to forcefully overwrite the local assets with the preset assets, even if they have been modified. | False |
--symlinks, -s |
BOOLEAN | Whether to update all symlinks in the preset to point to their right targets. | False |
update#
Update preset of current package
Usage:
vars#
Show the expanded vars of this problem.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--json |
BOOLEAN | Print the vars as a JSON object of dotted keys and string values. | False |
--render |
BOOLEAN | Read statement expressions from stdin, one per line, and print a JSON object mapping each to what it renders to. | False |
--groups |
BOOLEAN | Also show the resolved vars of each testcase group. Ignored with --render, which takes the group per expression. | False |
--target |
FilterTarget | What the --render expressions are being formatted for. Ignored without --render. | FilterTarget.TEXT |
Deploying#
| Command | Description |
|---|---|
rbx build |
Build all tests for the problem. |
rbx package |
Build problem packages (sub-command). |
rbx statements |
Manage statements (sub-command). |
rbx tutorials |
Manage tutorials/editorials (sub-command). |
build (b)#
Builds the problem package.
This command compiles all generators, validators, and checkers. Then it generates inputs using the generator script and validates them with the validator. Finally, it generates the outputs using the main solution.
It is recommended to run this command before packaging the problem to ensure everything is up-to-date.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--validate |
BOOLEAN | Whether to validate outputs for tests. | True |
--visualize |
BOOLEAN | Whether to build visualizations for inputs/outputs of tests. | False |
package (pkg)#
Build problem packages (sub-command).
Usage:
| Command | Description |
|---|---|
rbx package boca |
Build a package for BOCA. |
rbx package domjudge |
Build a package for DOMjudge. |
rbx package moj |
Build a package for MOJ. |
rbx package pkg |
Build a package for PKG. |
rbx package polygon |
Build a package for Polygon. |
boca#
Build a package for BOCA.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--upload, -u |
BOOLEAN | If set, will upload the package to BOCA. | False |
--language, -l |
TEXT | If set, will use the given language as the main language. Leave unset if you want to use the language of the topmost statement. | - |
domjudge#
Build a package for DOMjudge.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--language, -l |
TEXT | If set, will use the given language as the main language. Leave unset if you want to use the language of the topmost statement. | - |
moj#
Build a package for MOJ.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--upload, -u |
BOOLEAN | If set, will upload the package to MOJ. | False |
--language, -l |
TEXT | If set, puts the statement in the given language in MOJ's main slot, docs/enunciado.md, which MOJ always serves as Portuguese; an en/es statement also fills its own slot, and a Portuguese statement it displaces is left out. Leave unset to use the Portuguese statement, or the topmost one without it. Every other en/es statement ships in its own slot. |
- |
--calibrate |
BOOLEAN | If set, let MOJ calibrate the time limits on the judge machine, by the Kattis rule with the problem's timing.multipliers, instead of pinning the ones estimated by rbx time -p moj. Refused when the multipliers set fastestToTimeLimit, which the Kattis rule lacks. |
False |
--reference-only, -ro |
BOOLEAN | If set, ship only the reference (main) solution, dropping the others. MOJ runs every solution in the package when it calibrates, so this makes an upload much faster -- at the cost of nothing verifying the dropped solutions on the judge. For iterating; package again without it before going live. | False |
--strict-statement |
BOOLEAN | If set, fail when a statement uses TeX that MOJ may not show -- a construct outside what the Markdown converter supports, or one pandoc drops -- instead of warning and packaging anyway. Nothing is packaged or uploaded then. Same as extensions.moj.strictStatement. |
False |
pkg#
Build a package for PKG.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
polygon#
Build a package for Polygon.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--upload, -u |
BOOLEAN | If set, will upload the package to Polygon. | False |
--language, -l |
TEXT | If set, will use the given language as the main language. Leave unset if your problem has no statements. | - |
--upload-as-english |
BOOLEAN | If set, will force the main statement to be uploaded in English. | False |
--upload-only |
TEXT | Only upload the following types of assets to Polygon. | - |
--upload-skip |
TEXT | Skip uploading the following types of assets to Polygon. | - |
--upload-tests-raw |
BOOLEAN | Upload built test inputs directly instead of relying on Polygon-side generators. Skips generator uploads and clears the test script. All test inputs must be < 1 MiB. Forces a full local build. Requires --upload. | False |
--validate-statement |
BOOLEAN | If set, will validate the statement for Polygon. | False |
--cms |
BOOLEAN | If set, the package also carries what CMS (cms-dev) reads when importing it with its Polygon loader: group scoring, problem statements, a manager for interactive problems and, for contests, problem directories. | False |
statements (st)#
Manage statements (sub-command).
Usage:
| Command | Description |
|---|---|
rbx statements build |
Build statements. |
rbx statements ls |
List the statements and tutorials of this problem, as rbx resolves them. |
build (b)#
Build statements.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAMES |
Variants of statements to build. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--languages |
TEXT | Languages to build statements for. If not specified, build statements for all available languages. | - |
--output |
StatementType | Output type to be generated. | PDF |
--samples |
BOOLEAN | Whether to build the statement with samples or not. | True |
--vars |
TEXT | Variables to be used in the statements. | - |
--validate |
BOOLEAN | Whether to validate outputs for testcases or not. | True |
-p, --profile |
TEXT | Timing profile to render the statement against. Must exist in this problem. | - |
--incremental |
BOOLEAN | Reuse the LaTeX auxiliary files of the previous build, so an unchanged document usually compiles in a single pdflatex pass. Meant for repeated rebuilds while editing. | False |
ls (list)#
List the statements and tutorials of this problem, as rbx resolves them.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--json |
BOOLEAN | Print the resolved entries, and the YAML files they were read from, as a JSON object. | False |
tutorials (tut)#
Manage tutorials/editorials (sub-command).
Usage:
| Command | Description |
|---|---|
rbx tutorials build |
Build tutorials (editorials). |
build (b)#
Build tutorials (editorials).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAMES |
Variants of tutorials to build. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--languages |
TEXT | Languages to build tutorials for. If not specified, build tutorials for all available languages. | - |
--output |
StatementType | Output type to be generated. | PDF |
--samples |
BOOLEAN | Whether to build the tutorial with samples or not. | True |
--vars |
TEXT | Variables to be used in the tutorials. | - |
--validate |
BOOLEAN | Whether to validate outputs for testcases or not. | True |
-p, --profile |
TEXT | Timing profile to render the tutorial against. Must exist in this problem. | - |
--incremental |
BOOLEAN | Reuse the LaTeX auxiliary files of the previous build, so an unchanged document usually compiles in a single pdflatex pass. Meant for repeated rebuilds while editing. | False |
Testing#
| Command | Description |
|---|---|
rbx compile |
Compile an asset given its path. |
rbx irun |
Build and run solution(s) by passing testcases in the CLI. |
rbx issues |
Show what is wrong with the problem, before and after a run. |
rbx preship |
Estimate a time limit and check the whole package against it: every solution is run, and every one of them has to behave as problem.rbx.yml says it does. |
rbx run |
Build and run solution(s). |
rbx stress |
Run a stress test. |
rbx summary |
Print a summary of the problem. |
rbx time |
Estimate a time limit for the problem using the timings of its solutions and the estimation strategy configured in the environment. |
rbx unit |
Run unit tests for the validator and checker. |
rbx validate |
Run the validator in a one-off fashion, interactively. |
compile#
Compile an asset given its path.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
PATH |
Path to the asset to compile. | No |
EXTRA_FLAGS |
Extra flags to pass to the compiler, after a -- separator. |
No |
| Name | Type | Description | Default |
|---|---|---|---|
--sanitized, -s |
BOOLEAN | Whether to compile the asset with sanitizers enabled. | False |
--warnings, -w |
BOOLEAN | Whether to compile the asset with warnings enabled. | False |
--all, -a |
BOOLEAN | Whether to compile all assets. | False |
irun (ir)#
Build and run solution(s) by passing testcases in the CLI.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
SOLUTIONS |
Path to solutions to run. If not specified, will run all solutions. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--benchmark, -b |
INTEGER | Benchmark level: 0 (off), 1 (benchmark the solution run). | 0 |
--outcome, -o |
TEXT | Include only solutions whose expected outcomes intersect with this. | - |
--tag |
TEXT | Include only solutions whose tags intersect with this. | - |
--check |
BOOLEAN | Whether to not build outputs for tests and run checker. | True |
--validate |
BOOLEAN | Whether to validate inputs. | True |
--on-invalid |
OnInvalid | What to do when the testcase fails validation: fail before running anything, or warn and run it anyway. | OnInvalid.FAIL |
--generator, -g |
TEXT | Generator call to use to generate a single test for execution. | - |
--testcase, --test, -tc, -t |
TEXT | Testcase to run, in the format "[group]/[index]". If not specified, will run interactively. | - |
--output, -O |
BOOLEAN | Whether to ask user for custom output. | False |
--input, -i |
FILE | Read the test input from this file instead of asking for it. Cannot be combined with --testcase or --generator. | - |
--answer |
FILE | Check the solutions against this expected answer instead of the main solution's, without asking for it (the non-interactive --output). | - |
--visualize |
BOOLEAN | Whether to generate visualizations for inputs and outputs. | False |
--print, -p |
BOOLEAN | Whether to print outputs to terminal. | False |
--merge-stderr, -e |
BOOLEAN | Interleave stderr with the solution output in true line order (colored distinctly). Requires -p. Default: stderr is shown in a separate section. | False |
--keep-checker-stderr |
BOOLEAN | Also keep each testcase's full checker stderr, as a .checker.err file next to its output. Only the checker's last line reaches the verdict, so this is how to read whatever it printed before that. |
False |
--sanitized, -s |
BOOLEAN | Whether to compile the solutions with sanitizers enabled. | False |
--choice, --choose, -c |
BOOLEAN | Whether to pick solutions interactively. | False |
--profile |
TEXT | Timing profile to run the solutions against. Must exist in this problem. | - |
issues#
Show what is wrong with the problem, before and after a run.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--detailed, -d |
BOOLEAN | Explain each issue instead of summarizing it in one line. | False |
--format |
IssuesFormat | How to print the issues. Use json to consume them from a tool. |
IssuesFormat.RICH |
--all, -a |
BOOLEAN | Also show the issues issues.ignore silences for this problem. |
False |
preship#
Estimate a time limit and check the whole package against it: every solution is run, and every one of them has to behave as problem.rbx.yml says it does.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--benchmark, -b |
INTEGER | Benchmark level: 0 (off), 1 (benchmark the solution run). | 0 |
--check |
BOOLEAN | Whether to not build outputs for tests and run checker. | True |
--validate |
BOOLEAN | Whether to not validate outputs for tests. | True |
--detailed, -d |
BOOLEAN | Whether to print a detailed view of the tests using tables. | False |
--runs, -r |
INTEGER | Number of runs to perform for each solution. Zero means the config default. | 0 |
--profile, -p |
TEXT | Profile to use for time limit estimation. | local |
--runner |
TEXT | Where to run the solutions being timed (local, moj, domjudge). Defaults to moj for the moj profile, local otherwise. | - |
--share |
TEXT | Capture the time report (run report + limits table) and copy it to the clipboard. Pass a format: --share png or --share text. | - |
--skip-slow |
BOOLEAN | Skip checking the estimated limit against the solutions expected to be too slow. The limit is written with its upper bound unchecked. | False |
--dry |
BOOLEAN | Run the whole estimation but write nothing to the disk: the limits profile is printed instead of saved. | False |
--fail-fast, --ff |
BOOLEAN | Whether to stop running a solution as soon as it gets a non-accepted verdict. Applies only to the solutions run after the estimation, and is only meant for quick experimentation, as the remaining tests are reported as failed. | False |
--keep-checker-stderr |
BOOLEAN | Also keep each testcase's full checker stderr, as a .checker.err file next to its output. Only the checker's last line reaches the verdict, so this is how to read whatever it printed before that. |
False |
run (r)#
Runs solutions against the testcases.
This is the primary way to test your solutions. You can run all solutions, a specific set of solutions, or only accepted solutions.
You can also filter which testcases to run against, by using the --outcome flag
to only confirm that solutions match a certain expected outcome (e.g. TLE, WA).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
SOLUTIONS |
Path to solutions to run. If not specified, will run all solutions. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--benchmark, -b |
INTEGER | Benchmark level: 0 (off), 1 (benchmark the solution run). | 0 |
--outcome, -o |
TEXT | Include only solutions whose expected outcomes intersect with this. | - |
--tag |
TEXT | Include only solutions whose tags intersect with this. | - |
--check |
BOOLEAN | Whether to not build outputs for tests and run checker. | True |
--validate |
BOOLEAN | Whether to validate the testcases before running the solutions. | True |
--on-invalid |
OnInvalid | What to do when a testcase fails validation: fail the run before running anything, or warn and run every testcase anyway. | OnInvalid.FAIL |
--detailed, -d |
BOOLEAN | Whether to print a detailed view of the tests using tables. | False |
--sanitized, -s |
BOOLEAN | Whether to compile the solutions with sanitizers enabled. | False |
--choice, --choose, -c |
BOOLEAN | Whether to pick solutions interactively. | False |
--share |
TEXT | Capture the run report and copy it to the clipboard. Pass a format: --share png or --share text. | - |
--keep-checker-stderr |
BOOLEAN | Also keep each testcase's full checker stderr, as a .checker.err file next to its output. Only the checker's last line reaches the verdict, so this is how to read whatever it printed before that. |
False |
--fail-fast, --ff |
BOOLEAN | Whether to stop running a solution as soon as it gets a non-accepted verdict. Only meant for quick experimentation, as the remaining tests are reported as failed. | False |
--runner |
TEXT | Where to run the solutions (local, moj, domjudge). Defaults to moj for the moj profile, local otherwise. | - |
-p, --profile |
TEXT | Timing profile to run the solutions against. Must exist in this problem. | - |
stress#
Runs stress testing on the current problem.
Stress testing allows you to find counter-examples where your solution fails (or where two solutions differ).
You usually provide a generator command (with random seed) and a reference solution (or validator/checker).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAME |
Name of the stress test to run (specified in problem.rbx.yml). | No |
| Name | Type | Description | Default |
|---|---|---|---|
--generator, -g |
TEXT | Generator call to use to generate a single test for execution. | - |
--finder, -f |
TEXT | Run a stress with this finder expression. | - |
--timeout, --time, -t |
INTEGER | For how many seconds to run the stress test. | 10 |
--findings, -n |
INTEGER | How many breaking tests to look for. | 1 |
-v, --verbose |
BOOLEAN | Whether to print verbose output for checkers and finders. | False |
--sanitized, -s |
BOOLEAN | Whether to compile the solutions with sanitizers enabled. | False |
--description, -d |
TEXT | Optional description of the stress test. | - |
--descriptors, -D |
BOOLEAN | Whether to print descriptors of the stress test. | False |
--skip-invalid, --skip |
BOOLEAN | Whether to skip invalid testcases. | False |
--timelimit, -T |
INTEGER | Custom timelimit for the stress test. | - |
--double-tl |
BOOLEAN | Whether to use 2*TL as the timelimit for the stress test. | False |
--slowest |
BOOLEAN | Whether to find the slowest testcases. This removes the time limit of the solution executions and focus on finding the testcases that make them the slowest. | False |
--fuzz |
BOOLEAN | Whether to fuzz generator calls from all testgroups. | False |
--fuzz-on |
TEXT | Testgroups to fuzz generator calls from. | - |
--validate |
BOOLEAN | Whether to validate inputs. | True |
--reference, -r |
TEXT | Reference solution to use for the stress test. | - |
--no-promote |
BOOLEAN | Do not offer to add the findings to a test group when the stress ends. | False |
--list |
BOOLEAN | List the stresses, solutions, generators and test groups a stress can use, then exit. | False |
--json |
BOOLEAN | With --list, print the listing as JSON on stdout. | False |
summary (sum)#
Print a summary of the problem.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--detailed, -d |
BOOLEAN | Whether to print a detailed view of the tests using tables. | False |
--format |
SummaryFormat | How to print the summary. Use json to consume it from a tool. |
SummaryFormat.RICH |
time (t)#
Estimate a time limit for the problem using the timings of its solutions and the estimation strategy configured in the environment.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--benchmark, -b |
INTEGER | Benchmark level: 0 (off), 1 (benchmark the solution run). | 0 |
--check |
BOOLEAN | Whether to not build outputs for tests and run checker. | True |
--validate |
BOOLEAN | Whether to not validate outputs for tests. | True |
--detailed, -d |
BOOLEAN | Whether to print a detailed view of the tests using tables. | False |
--strategy, -s |
TEXT | Strategy to use for time limit estimation (estimate, inherit, estimate_custom, custom). | - |
--auto, -a |
BOOLEAN | Whether to automatically estimate the time limit. | False |
--runs, -r |
INTEGER | Number of runs to perform for each solution. Zero means the config default. | 0 |
--profile, -p |
TEXT | Profile to use for time limit estimation. | local |
--integrate, -i |
BOOLEAN | Integrate the given limits profile into the package. | False |
--runner |
TEXT | Where to run the solutions being timed (local, moj, domjudge). Defaults to moj for the moj profile, local otherwise. | - |
--share |
TEXT | Capture the time report (run report + limits table) and copy it to the clipboard. Pass a format: --share png or --share text. | - |
--skip-slow |
BOOLEAN | Skip checking the estimated limit against the solutions expected to be too slow. The limit is written with its upper bound unchecked. | False |
--dry |
BOOLEAN | Run the whole estimation but write nothing to the disk: the limits profile is printed instead of saved. | False |
--run-all |
BOOLEAN | After the estimation, also run every solution it did not need -- the ones expected to be wrong, and any slow one that was never checked -- against the estimated time limit. | False |
--run-pass |
BOOLEAN | Like --run-all, but only run the solutions expected to pass -- an accepted one marked inference: false, an accepted-or-tle -- leaving the wrong ones unrun. | False |
--fail-fast, --ff |
BOOLEAN | Whether to stop running a solution as soon as it gets a non-accepted verdict. Applies only to the solutions run after the estimation, and is only meant for quick experimentation, as the remaining tests are reported as failed. | False |
--keep-checker-stderr |
BOOLEAN | Also keep each testcase's full checker stderr, as a .checker.err file next to its output. Only the checker's last line reaches the verdict, so this is how to read whatever it printed before that. |
False |
--edit, -e |
BOOLEAN | Tune the time limits of an estimated profile by hand, checking each one against what the estimate measured. Runs no solution. | False |
--force-calibration, -f |
BOOLEAN | Calibrate again on a runner that calibrates (moj), even when the package is unchanged since the last calibration and it would be reused. | False |
unit#
Run unit tests for the validator and checker.
Usage:
validate#
Run the validator in a one-off fashion, interactively.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--path, -p |
TEXT | Path to the testcase to validate. | - |
Management#
| Command | Description |
|---|---|
rbx assets |
List the assets of this problem, by category, as rbx resolves them. |
rbx clear |
Clears cache and build directories. |
rbx contest |
Manage contests (sub-command). |
rbx create |
Create a new problem package. |
rbx download |
Download an asset from supported repositories (sub-command). |
rbx fix |
Format files of the current package. |
rbx lang |
Manage statement languages of a problem or contest (sub-command). |
rbx stats |
Show stats about current and related packages. |
rbx testcases |
Manage testcases (sub-command). |
rbx visualize |
Visualize a single testcase (sub-command). |
rbx wizard |
Run the wizard. |
assets#
List the assets of this problem, by category, as rbx resolves them.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--json |
BOOLEAN | Print the listing, and the YAML files it was read from, as a JSON object. | False |
clear (clean)#
Clears cache and build directories.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--global, -g |
BOOLEAN | - | False |
contest#
Manage contests (sub-command).
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
-C, --contest |
TEXT | Select a contest variant by id. | - |
| Command | Description |
|---|---|
rbx contest add |
Add new problem to contest. |
rbx contest add_variant |
Scaffold a new contest variant file. |
rbx contest assets |
List the selected contest and the assets of each of its problems. |
rbx contest create |
Create a new contest package. |
rbx contest each |
Run a command for each problem in the contest. Chain commands with :: to queue them. |
rbx contest edit |
Open contest.rbx.yml in your default editor. |
rbx contest init |
Initialize a new contest in the current directory. |
rbx contest issues |
Show what is wrong with each problem, before and after a run. |
rbx contest list |
List all contests in the current directory. |
rbx contest on |
Run a command in the problem (or in a set of problems) of a context. Chain commands with :: to queue them. |
rbx contest package |
Build contest-level packages. |
rbx contest remove |
Remove problem from contest. |
rbx contest statements |
Manage contest-level statements. |
rbx contest summary |
Print a summary of the contest. |
rbx contest tutorials |
Manage contest-level tutorials/editorials. |
add (a)#
Add new problem to contest.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--path |
TEXT | Path (relative to the contest root) where to create the problem. The name part of the path will be used as the problem name (e.g. "problems/choco" creates a problem named "choco" in that directory). | - |
--short-name |
TEXT | Short name of the problem. Will be used as the identifier in the contest. | - |
--preset |
TEXT | Preset to use when creating the problem. If not specified, the active preset will be used. | - |
--variant, -v |
TEXT | Which template variant of the preset to use. Omit to use the canonical template, or to be prompted when the preset offers variants. | - |
--yes, -y |
BOOLEAN | Do not ask for confirmation when the edit lands in a fragment shared with other contests. | False |
--ignore-language-mismatch |
BOOLEAN | Accept languages the preset does not ship (asked for with -l, or inherited from the contest) instead of failing. Each one gets a copy of the preset's first language's statement files, to translate in place. |
False |
add_variant (av)#
Scaffold a new contest variant file.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
VARIANT_ID |
Id of the new variant. Must match ^[A-Za-z][A-Za-z0-9_-]*$. | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--preset, -p |
TEXT | Preset to scaffold the variant from. Defaults to the active preset in the current directory, then the default preset. | - |
assets#
List the selected contest and the assets of each of its problems.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--json |
BOOLEAN | Print the listing, and the YAML files it was read from, as a JSON object. | False |
create (c)#
Create a new contest package.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--path |
TEXT | Path (relative to the current directory) where to create the contest (e.g. "contests/ioi2024"). | - |
--preset, -p |
TEXT | Which preset to use to create this package. Can be a named of an already installed preset, or an URI, in which case the preset will be downloaded. | |
| If not provided, the default preset will be used, or the active preset if any. | - | ||
--variant, -v |
TEXT | Which template variant of the preset to use. Omit to use the canonical template, or to be prompted when the preset offers variants. | - |
--local |
BOOLEAN | Whether to use a preset from the local version of rbx, instead of the global one (not recommended). | False |
--languages, -l |
TEXT | Languages to keep from a multi-language preset (e.g. -l en,pt). Omit to be prompted when the preset ships more than one language. |
- |
--ignore-language-mismatch |
BOOLEAN | Accept languages the preset does not ship (asked for with -l, or inherited from the contest) instead of failing. Each one gets a copy of the preset's first language's statement files, to translate in place. |
False |
each#
Run a command for each problem in the contest. Chain commands with :: to queue them.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--keep-going, -k |
BOOLEAN | Keep running the rest of a chain in a problem even after a command fails. Must come before the problem selector in rbx on. |
False |
--inline, -i |
BOOLEAN | Run the commands straight in this terminal, one after another, instead of opening the TUI. Must come before the problem selector in rbx on. |
False |
--parallel, -p |
BOOLEAN | Run the problems at the same time instead of one after another. Each problem's chain still runs in order. Must come before the problem selector in rbx on. |
False |
edit (e)#
Open contest.rbx.yml in your default editor.
Usage:
init (i)#
Initialize a new contest in the current directory.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--preset, -p |
TEXT | Which preset to use to create this package. Can be a named of an already installed preset, or an URI, in which case the preset will be downloaded. | |
| If not provided, the default preset will be used, or the active preset if any. | - |
issues#
Show what is wrong with each problem, before and after a run.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--detailed, -d |
BOOLEAN | Follow the table with every problem's issues in full. | False |
--format |
IssuesFormat | How to print the issues. Use json to consume them from a tool. |
IssuesFormat.RICH |
list (ls)#
List all contests in the current directory.
Usage:
on#
Run a command in the problem (or in a set of problems) of a contest.
The problem selector is a comma-separated list. Each entry names a problem by its
short name, by the name it declares in its problem.rbx.yml, by one of its
aliases, or by the basename of its folder -- looked up in that order, so the
letter always wins over another problem's alias.
| Selector | Selects |
|---|---|
B |
the problem whose short name, name, alias or folder is B |
A,C |
both problems |
A..C |
every problem from A to C, in contest order |
day1-* |
every problem matching the pattern (* and ? are wildcards) |
* |
every problem in the contest |
*,!C |
every problem but C |
!C |
the same -- a selector of exclusions starts from every problem |
Ranges are written with two dots: A-C is read as a literal name, since a
problem may well be called two-sum. An entry that matches no problem is an
error, so a typo never runs on a subset of what you meant.
Quote selectors that use * or !, which your shell would otherwise expand.
Chain commands with :: to queue them.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
PROBLEMS |
Problems to run on: short names, names, aliases or folders, comma-separated. Also A..C, *, globs and ! exclusions. |
No |
| Name | Type | Description | Default |
|---|---|---|---|
--keep-going, -k |
BOOLEAN | Keep running the rest of a chain in a problem even after a command fails. Must come before the problem selector in rbx on. |
False |
--inline, -i |
BOOLEAN | Run the commands straight in this terminal, one after another, instead of opening the TUI. Must come before the problem selector in rbx on. |
False |
--parallel, -p |
BOOLEAN | Run the problems at the same time instead of one after another. Each problem's chain still runs in order. Must come before the problem selector in rbx on. |
False |
package (pkg)#
Build contest-level packages.
Usage:
| Command | Description |
|---|---|
rbx contest package boca |
Build a contest package for BOCA. |
rbx contest package cms-contest |
Build a CMS contest without its problems, for CMS to attach the tasks of "rbx contest package polygon --cms" to. |
rbx contest package pkg |
Build a contest package for PKG. |
rbx contest package polygon |
Build a contest package for Polygon. |
boca#
Build a contest package for BOCA.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
cms-contest#
Build a CMS contest without its problems, for CMS to attach the tasks of "rbx contest package polygon --cms" to.
Usage:
pkg#
Build a contest package for PKG.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
polygon#
Build a contest package for Polygon.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--language, -l |
TEXT | If set, will use the given language as the main language. | - |
--cms |
BOOLEAN | If set, the package also carries what CMS (cms-dev) reads when importing it with its Polygon loader: group scoring, problem statements, a manager for interactive problems and, for contests, problem directories. | False |
remove (r)#
Remove problem from contest.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
PATH_OR_SHORT_NAME |
- | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--yes, -y |
BOOLEAN | Do not ask for confirmation when the edit lands in a fragment shared with other contests. | False |
statements (st)#
Manage contest-level statements.
Usage:
| Command | Description |
|---|---|
rbx contest statements build |
Build statements. |
rbx contest statements ls |
List the statements, tutorials and documents of this contest and of each of its variants, as rbx resolves them. |
build (b)#
Build statements.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAMES |
Names of statements or documents to build. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--languages |
TEXT | Languages to build statements for. If not specified, build statements for all available languages. | - |
--validate |
BOOLEAN | Whether to validate outputs for testcases or not. | True |
--output |
StatementType | Output type to be generated. | PDF |
--samples |
BOOLEAN | Whether to build the statement with samples or not. | True |
--vars |
TEXT | Variables to be used in the statements. | - |
--install-tex |
BOOLEAN | Whether to install missing LaTeX packages. | False |
-p, --profile |
TEXT | Timing profile to render statements against. Problems missing this profile are skipped with a warning. | - |
--partial |
BOOLEAN | Build a statement even if some of its problems fail, omitting them. Without this, a problem that fails makes its statement fail. | False |
--incremental |
BOOLEAN | Reuse the LaTeX auxiliary files of the previous build, so an unchanged document usually compiles in a single pdflatex pass. Meant for repeated rebuilds while editing. | False |
ls (list)#
List the statements, tutorials and documents of this contest and of each of its variants, as rbx resolves them.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--json |
BOOLEAN | Print the resolved entries, and the YAML files they were read from, as a JSON object. | False |
summary (sum)#
Print a summary of the contest.
Usage:
tutorials (tut)#
Manage contest-level tutorials/editorials.
Usage:
| Command | Description |
|---|---|
rbx contest tutorials build |
Build tutorials (editorials). |
build (b)#
Build tutorials (editorials).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAMES |
Names of tutorials to build. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--verification-level, --verification, -v |
INTEGER of VerificationLevel | Verification level to use when building package. | 4 |
--languages |
TEXT | Languages to build tutorials for. If not specified, build tutorials for all available languages. | - |
--validate |
BOOLEAN | Whether to validate outputs for testcases or not. | True |
--output |
StatementType | Output type to be generated. | PDF |
--samples |
BOOLEAN | Whether to build the tutorial with samples or not. | True |
--vars |
TEXT | Variables to be used in the tutorials. | - |
--install-tex |
BOOLEAN | Whether to install missing LaTeX packages. | False |
-p, --profile |
TEXT | Timing profile to render tutorials against. Problems missing this profile are skipped with a warning. | - |
--partial |
BOOLEAN | Build a statement even if some of its problems fail, omitting them. Without this, a problem that fails makes its statement fail. | False |
--incremental |
BOOLEAN | Reuse the LaTeX auxiliary files of the previous build, so an unchanged document usually compiles in a single pdflatex pass. Meant for repeated rebuilds while editing. | False |
create (c)#
Create a new problem package.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--name |
TEXT | Name of the problem to create, which will be used as the name of the new folder. A path relative to the current directory may be given (e.g. "problems/my-problem"), in which case the problem name is the basename ("my-problem"). | - |
--preset |
TEXT | Preset to use when creating the problem. | - |
--variant, -v |
TEXT | Which template variant of the preset to use. Omit to use the canonical template, or to be prompted when the preset offers variants. | - |
--local |
BOOLEAN | Whether to use a preset from the local version of rbx, instead of the global one (not recommended). | False |
--languages, -l |
TEXT | Languages to keep from a multi-language preset (e.g. -l en,pt). Omit to be prompted when the preset ships more than one language. |
- |
--ignore-language-mismatch |
BOOLEAN | Accept languages the preset does not ship (asked for with -l, or inherited from the contest) instead of failing. Each one gets a copy of the preset's first language's statement files, to translate in place. |
False |
download (down)#
Download an asset from supported repositories (sub-command).
Usage:
| Command | Description |
|---|---|
rbx download checker |
Download a built-in checker from testlib GH repo. |
rbx download jngen |
Download the preset-declared jngen library. |
rbx download lib |
Download preset-declared libraries (omit NAME for all). |
rbx download remote |
Download a remote code. |
rbx download testlib |
Download the preset-declared testlib library. |
rbx download tgen |
Download the preset-declared tgen library. |
checker#
Download a built-in checker from testlib GH repo.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAME |
- | Yes |
jngen#
Download the preset-declared jngen library.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--into |
TEXT | Path (relative to the package root) where the file should be placed. Parent directories are created automatically. If omitted, the file is written to the current directory. | - |
lib (library)#
Download preset-declared libraries (omit NAME for all).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAME |
Library name; omit to (re)fetch all declared libraries. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--into |
TEXT | Path (relative to the package root) where the file should be placed. Parent directories are created automatically. If omitted, the file is written to the current directory. | - |
remote (r)#
Download a remote code.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
NAME |
- | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output |
TEXT | Whether to not build outputs for tests and run checker. | - |
testlib#
Download the preset-declared testlib library.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--into |
TEXT | Path (relative to the package root) where the file should be placed. Parent directories are created automatically. If omitted, the file is written to the current directory. | - |
tgen#
Download the preset-declared tgen library.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--into |
TEXT | Path (relative to the package root) where the file should be placed. Parent directories are created automatically. If omitted, the file is written to the current directory. | - |
fix#
Format files of the current package.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--print-diff, -p |
BOOLEAN | - | False |
lang (languages)#
Manage statement languages of a problem or contest (sub-command).
Usage:
| Command | Description |
|---|---|
rbx lang add |
Add a statement language to the package(s). |
rbx lang ls |
List the statement languages of the package(s). |
rbx lang rm |
Remove a statement language from the package(s). |
add#
Add a statement language to the package(s).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
LANG |
Language to add (ISO 639-1). | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--from |
TEXT | Clone this existing language's files instead of the preset skeleton. | - |
--yes, -y |
BOOLEAN | Edit a fragment other contest configs also include without asking. | False |
ls (list)#
List the statement languages of the package(s).
Usage:
rm (remove)#
Remove a statement language from the package(s).
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
LANG |
Language to remove. | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--delete-files |
BOOLEAN | Also delete the language's files. By default they are kept and reported as orphaned. | False |
--yes, -y |
BOOLEAN | Edit a fragment other contest configs also include without asking. | False |
stats#
Show stats about current and related packages.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--transitive, -t |
BOOLEAN | Show stats about all reachable packages. | False |
testcases (tc, t)#
Manage testcases (sub-command).
Usage:
| Command | Description |
|---|---|
rbx testcases add-finding |
Add findings of the latest stress session to a test group. |
rbx testcases generate |
Generate a single test, without building the rest of the testset. |
rbx testcases info |
Show information about testcases. |
rbx testcases promote |
Promote tests into a test group: as files, generator calls or @copy lines. |
rbx testcases view |
View a testcase in your default editor. |
add-finding#
Adds tests found by the latest rbx stress session to a test group: the
non-interactive counterpart of the prompt rbx stress shows when it ends,
and the same as rbx testcases promote finding:K.
Name the findings by their number in the stress report (from 1), or omit them to add all of them. What the group receives depends on its kind:
- A
.txtgenerator script group gets the generator call of each finding added, under a comment with therbx stresscommand that found it. The test is generated again on the next build, so it stays reproducible. - A manual group (one declared with
testcaseGlob) gets a copy of each finding's input, under the next free name its glob allows.
A finding the group already has -- the same generator call, or an input with the same bytes -- is skipped, so adding the same findings twice is harmless.
--new-script and --new-manual create the group first. --dry-run
shows what the file of a script group would become without writing it,
and --list-groups lists the groups that can take findings. With
--json, the command prints its result as JSON on stdout and nothing else.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
INDICES |
Findings to add, by their number in the stress report (from 1). All of them if omitted. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--group, -G |
TEXT | Existing test group to add the findings to: a .txt generator script group or a manual group. | - |
--new-script |
PATH | Create a generator script group backed by this .txt file, and append the findings to it. | - |
--new-manual |
TEXT | Create a manual group with this name (needs --glob), and copy the findings into it. | - |
--glob |
TEXT | Glob of the group --new-manual creates, e.g. tests/manual/stress/*.in. | - |
--dry-run |
BOOLEAN | Show how the generator script of --group would change, without writing it (script groups only). | False |
--json |
BOOLEAN | Print the result as JSON on stdout. | False |
--list-groups |
BOOLEAN | List the test groups that can take findings, and exit. | False |
--session |
TEXT | The startedAt of the stress session the findings were picked from; refuse to run if the latest session is another one. | - |
generate (g)#
Generate a single test, without building the rest of the testset.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
SELECTOR |
Test to generate, as [group]/[index] or as [script]:[line], the line of a generator script its statement starts on. | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--output, -o |
BOOLEAN | Also generate the answer, by running the main solution. | False |
--validate, -v |
BOOLEAN | Run the test group's validators on the input; exit with an error if any rejects it. | False |
--json |
BOOLEAN | Print the result as JSON on stdout. | False |
info (i)#
Show information about testcases.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
PATTERN |
Testcases to detail, as a pattern. Might be a group, or a specific test in the format [group]/[index]. | No |
promote#
Promotes tests into a test group: a generated test into a file of its own, a stress finding or any input file into the testset, or a test from one group into another.
Name the tests to promote as [group]/[index], as [script]:[line] (the
test whose statement starts on that line of a generator script),
finding:K (finding K of the latest rbx stress) or file:IN[:ANS] (an
input file, and optionally an answer to keep with it). With no tests, they
are picked interactively.
A test can go into any group whose testcaseGlob ends in .in, which
gets a copy of its input, or any group with a .txt generator script,
which gets a line: the generator call that makes the test, or a @copy of
its input file. --as picks one; the default is the call when the test
has one. A @copy file goes where the other @copy lines of the group
suggest, which --path overrides. When several groups share the script,
the line goes into the group's @testgroup block.
A test whose statement is already in the group's script is changed in
place, so --as copy on a generator call freezes it into a @copy.
Anything else lands at the end of the group, and is removed from where it
was unless --keep-source is given. --dry-run shows the changes without
making them; --list-sinks lists where the tests can go.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
SELECTORS |
Tests to promote: [group]/[index], [script]:[line], finding:K or file:IN[:ANS]. If omitted, tests are selected interactively. | No |
| Name | Type | Description | Default |
|---|---|---|---|
--to, --group, -G |
TEXT | Test group (or group/subgroup) to promote into. | - |
--as |
TEXT | Promote into a generator script as recipe (the generator call) or copy (a @copy of the input). Default: the call, when the test has one. |
- |
--name, -n |
TEXT | File name, without .in, of the promoted input. Only meaningful when promoting exactly one test. |
- |
--path |
TEXT | Where a @copy file goes, instead of where the group suggests: a file, or a pattern whose * is filled with the next free name. |
- |
--keep-source |
BOOLEAN | Copy the tests instead of moving them: leave their statement or file where it is. | False |
--new-manual |
TEXT | Create a manual group with this name (needs --glob), and promote the tests into it. | - |
--glob |
TEXT | Glob of the group --new-manual creates, e.g. tests/manual/*.in. | - |
--new-script |
PATH | Create a generator script group backed by this .txt file, and promote the tests into it. | - |
--dry-run |
BOOLEAN | Show what would change, without changing it. | False |
--list-sinks |
BOOLEAN | List the test groups the tests can be promoted into, and exit. | False |
--list-groups |
BOOLEAN | - | False |
--json |
BOOLEAN | Print the result as JSON on stdout. | False |
--session |
TEXT | The startedAt of the stress session finding:K was picked from; refuse to run if the latest session is another one. | - |
view (v)#
View a testcase in your default editor.
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
TC |
Testcase to view. Format: [group]/[index]. | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
--input, -i |
BOOLEAN | Whether to open only the input file in the editor. | False |
--output, -o |
BOOLEAN | Whether to open only the output file in the editor. | False |
visualize (viz)#
Visualize a single testcase (sub-command).
Usage:
| Command | Description |
|---|---|
rbx visualize input |
Visualize a testcase input. |
rbx visualize output |
Visualize a solution's output for a testcase. |
input#
Run the input visualizer for one testcase and print where it landed.
Addressing is by path: --input is the testcase's input file, and the
optional --output is an output to hand the visualizer alongside it.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--input |
PATH | Path to the testcase input to visualize. | - |
--output |
PATH | Optional output to pass to the visualizer. | - |
--dest |
PATH | Where to write the visualization, WITHOUT an extension. The visualizer decides the extension, and the final path is printed. | - |
--use-stderr |
BOOLEAN | Shorthand for passing the sibling '.err' file instead of the output. | False |
output#
Run the solution visualizer for one testcase's output.
--output is the output to visualize -- a solution's output from a run, or
the testset's expected answer, or any other file. --answer is an optional
second output to compare it against.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--input |
PATH | Path to the testcase input. | - |
--output |
PATH | Path to the output to visualize. | - |
--answer |
PATH | Optional answer to compare the output against. | - |
--dest |
PATH | Where to write the visualization, WITHOUT an extension. The visualizer decides the extension, and the final path is printed. | - |
--use-stderr |
BOOLEAN | Shorthand for visualizing the sibling '.err' file instead. Prefer passing the stderr file to --output directly: on a communication task the solution's stderr is '.sol.err', which this cannot name. | False |
wizard#
Run the wizard.
Usage:
Misc#
| Command | Description |
|---|---|
rbx tool |
Manage tooling (sub-command). |
rbx vscode |
Manage the rbx editor extension (sub-command). |
tool (tooling)#
Manage tooling (sub-command).
Usage:
| Command | Description |
|---|---|
rbx tool boca |
- |
rbx tool convert |
- |
rbx tool domjudge |
Configure a DOMjudge server from this environment. |
rbx tool moj |
Inspect MOJ packaging for a contest. |
boca#
Usage:
| Command | Description |
|---|---|
rbx tool boca scrape |
Scrape runs from BOCA. |
rbx tool boca submit |
Submit solutions to BOCA. |
rbx tool boca view |
Open Textual UI to visualize BOCA submissions. |
scrape#
Scrape runs from BOCA.
Usage:
submit#
Submit solutions to BOCA.
Usage:
view#
Open Textual UI to visualize BOCA submissions.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--contest-id, -c |
TEXT | Contest identifier to load (stored under app data). | - |
convert#
Usage:
Arguments:
| Name | Description | Required |
|---|---|---|
PKG |
The package to convert. | Yes |
| Name | Type | Description | Default |
|---|---|---|---|
-s, --source |
TEXT | The format to convert from. | - |
-d, --dest |
TEXT | The format to convert to. | - |
-o, --output |
TEXT | The output path. | - |
--language, -l |
TEXT | The main language of the problem. | - |
domjudge#
Configure a DOMjudge server from this environment.
Usage:
| Command | Description |
|---|---|
rbx tool domjudge configure |
Configure a DOMjudge server from the languages and limits in env.rbx.yml. |
configure (config)#
Push the environment's languages, compilation flags and limits to the DOMjudge
instance named by RBX_DOMJUDGE_SERVER, RBX_DOMJUDGE_USERNAME and
RBX_DOMJUDGE_PASSWORD.
DOMjudge has no contest-scoped equivalent for any of this, so every change is instance-wide and needs an admin account. What is changed:
- Which languages accept submissions, and which file extensions they accept. Languages the server has enabled that rbx does not manage stay enabled.
- The compile script of every rbx language whose compilation command translates to DOMjudge's one-command compile wrapper.
- The limits set under
extensions.domjudgeinenv.rbx.yml.
Usage:
moj#
Inspect MOJ packaging for a contest.
Usage:
| Command | Description |
|---|---|
rbx tool moj summary |
List the problems this contest would upload to MOJ, with their MOJ ids. |
summary (sum)#
List the problems this contest would upload to MOJ, with their MOJ ids.
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--language, -l |
TEXT | If set, will report the title of the statement in the given language, as rbx package moj -l would put it in MOJ's main slot. Leave unset to use the Portuguese statement, or the topmost one without it -- the one rbx package moj would upload as the main statement. |
- |
--porcelain |
BOOLEAN | Print one tab-separated line per problem instead of a table, and send every warning to stderr. Meant for copying and for scripts. | False |
vscode#
Manage the rbx editor extension (sub-command).
Usage:
| Command | Description |
|---|---|
rbx vscode install |
Install the rbx extension into VS Code (or Cursor, Windsurf, VSCodium). |
install#
Install the rbx extension into VS Code (or Cursor, Windsurf, VSCodium).
Usage:
| Name | Type | Description | Default |
|---|---|---|---|
--editor, -e |
TEXT | Editor to install into: cursor, windsurf, codium, code-insiders, code. | - |
Generic Types#
CacheLevel
#
FilterTarget
#
Bases: Enum
What a filter is formatting for.
The rules a filter applies -- when sci abbreviates, when it declines --
are a property of the value and never vary. Only the spelling does: a PDF
wants 2 \times 10^{5}, a VS Code inlay hint wants 2×10⁵ because it
cannot typeset maths.
MARKDOWN maps to the LaTeX formatter and is not redundant: a Markdown
statement puts its constraints in $...$ math, so LaTeX is what sci and
rsci should emit there. Naming it separately means the day that stops
being correct is a one-line change rather than an archaeology exercise.
That claim covers sci/rsci only. The target also picks escape, and
under MARKDOWN that is still the inherited LaTeX escaping (a_b -> a\_b,
a backslash -> \textbackslash{}), which nobody has examined against a
Markdown body outside math. Whether it is right there is out of scope here.
Source code in rbx/box/statements/latex_jinja.py
IssuesFormat
#
Bases: str, Enum
How to print issues.
Lives here rather than in either command so the problem-level and contest-level flags cannot drift into accepting different spellings.
Source code in rbx/box/issues/rendering.py
OnInvalid
#
Bases: str, Enum
What a run does when some of its testcases fail validation.
Source code in rbx/box/run_validation.py
StatementType
#
Bases: AutoEnum
Source code in rbx/box/statements/schema.py
rbxTeX = alias('rbx-tex')
#
Statement written in rbxTeX format.
rbxMarkdown = alias('rbxMd', 'rbx-markdown', 'rbx-md')
#
Statement written in rbxMarkdown format.
TeX = alias('tex')
#
Statement written in pure LaTeX format.
Markdown = alias('md', 'markdown')
#
Statement written in pure Markdown format.
JinjaTeX = alias('jinja-tex')
#
Statement written in LaTeX format with Jinja2 expressions.
JinjaMarkdown = alias('jinja-md', 'jinja-markdown')
#
Statement written in Markdown format with Jinja2 expressions.
PDF = alias('pdf')
#
Statement is a PDF.
SummaryFormat
#
Bases: str, Enum
How to print a summary.
Spelled the way IssuesFormat is, so a reader who learned --format json
on one command does not have to learn it again on the other.