Documentation
rackup install
rackup list
rackup available
rackup default
rackup current
rackup which
rackup switch
rackup shell
rackup run
rackup link
rackup remove
rackup prompt
rackup reshim
rackup init
rackup self-upgrade
rackup runtime
rackup uninstall
rackup doctor
rackup version
Shell integration
Environment variables
Directory layout
Toolchain resolution
Migrating from racket-dev-goodies

Documentation🔗

Comprehensive command reference and usage guide. See the main page for installation and an overview.

    rackup install

    rackup list

    rackup available

    rackup default

    rackup current

    rackup which

    rackup switch

    rackup shell

    rackup run

    rackup link

    rackup remove

    rackup prompt

    rackup reshim

    rackup init

    rackup self-upgrade

    rackup runtime

    rackup uninstall

    rackup doctor

    rackup version

    Shell integration

    Environment variables

    Directory layout

    Toolchain resolution

    Migrating from racket-dev-goodies

rackup install🔗

Install a Racket toolchain from official release, pre-release, or snapshot installers.

rackup install <spec> [flags]

Install specs🔗

The <spec> argument selects which toolchain to install:

  • stable — the current stable Racket release

  • pre-release — the latest pre-release build

  • snapshot — the latest snapshot build (auto-selects a mirror)

  • snapshot:utah or snapshot:northwestern — snapshot from a specific mirror

  • A numeric version like 8.18, 7.9, 5.2, 4.2.5, or 372

Flags🔗

--variant cs|bc

Override VM variant (default depends on version).

--distribution full|minimal

Install full or minimal distribution (default: full).

--snapshot-site auto|utah|northwestern

Choose snapshot mirror (default: auto).

--arch <arch>

Override target architecture (default: host arch).

--set-default

Set installed toolchain as the global default.

--force

Reinstall if the same canonical toolchain is already installed.

--no-cache

Redownload installer instead of using cache.

--installer-ext sh|tgz|dmg

Force installer extension (default: platform-dependent).

--quiet

Show minimal output (errors + final result lines).

--verbose

Show detailed installer URL/path output.

Examples🔗

rackup install stable

rackup install 8.18 --variant cs

rackup install snapshot --snapshot-site utah

rackup install pre-release --distribution minimal --set-default

rackup list🔗

List installed toolchains and show default/active tags.

rackup list [--ids]

--ids

Print only toolchain IDs, one per line (for scripting).

Output shows each toolchain’s ID, resolved version, variant, and distribution. Tags like [default] and [active] indicate the global default and the currently active toolchain (set via rackup switch or RACKUP_TOOLCHAIN).

rackup available🔗

List install aliases (stable, pre-release, snapshot) and numeric release versions. This queries the Racket download server for the full list of published releases.

rackup available [--all|--limit N]

--all

Show all parsed release versions.

--limit N

Show at most N release versions (default: 20).

Examples🔗

rackup available

rackup available --limit 50

rackup available --all

rackup default🔗

Show, set, or clear the global default toolchain. The default determines which toolchain the shims use when no per-shell override (RACKUP_TOOLCHAIN) is active. If the requested toolchain spec is not installed, interactive shells are prompted to install it.

rackup default [id|status|set <toolchain>|clear|<toolchain>|--unset]

Subcommands🔗

(no argument)

Print the default toolchain ID (blank if none).

id

Same as no argument.

status

Print set<TAB><id> or unset.

set <toolchain>

Set the given toolchain as the default.

<toolchain>

Shorthand for set <toolchain>.

clear

Clear the default toolchain.

--unset

Same as clear.

Examples🔗

rackup default              # show current default

rackup default stable       # set default to stable

rackup default set 8.18     # set default to 8.18

rackup default status       # print set/unset and id

rackup default clear        # clear the default

rackup current🔗

Show the active toolchain and whether it comes from shell activation (RACKUP_TOOLCHAIN) or the global default.

rackup current [id|source|line]

(no argument)

Print the active ID and source.

id

Print only the active toolchain ID (blank if none).

source

Print env, default, or none.

line

Print <id><TAB><source>.

rackup which🔗

Show the real executable path for a tool in a toolchain. Without --toolchain, uses the active toolchain.

rackup which <exe> [--toolchain <toolchain>]

Examples🔗

rackup which racket

rackup which raco --toolchain 8.18

rackup switch🔗

Switch the active toolchain in the current shell without changing the global default. When run via the shell integration installed by rackup init, this updates the current shell’s environment immediately. Otherwise, it emits shell code that you can eval.

rackup switch <toolchain> | rackup switch --unset

If the requested toolchain is not installed, you are prompted to install it.

Examples🔗

rackup switch stable

rackup switch 8.18

rackup switch --unset       # deactivate per-shell override

rackup shell🔗

Emit shell code to activate or deactivate a toolchain in the current shell. This is the low-level primitive used by rackup switch and the shell wrapper function. Most users should use rackup switch instead.

rackup shell <toolchain> | rackup shell --deactivate

Example🔗

eval "$(rackup shell 8.18)"

rackup run🔗

Run a command under a specific toolchain without changing defaults or the shell environment. Sets PLTHOME, PLTADDONDIR, PATH, and RACKUP_TOOLCHAIN for the subprocess only.

rackup run <toolchain> -- <command> [args...]

The -- separator is required between the toolchain spec and the command to run.

Examples🔗

rackup run 8.18 -- racket -e '(displayln (version))'

rackup run stable -- raco pkg install gregor

rackup run snapshot -- raco test .

rackup link🔗

Link an in-place or locally built Racket tree as a managed toolchain. The linked directory is not copied; rackup creates a symlink and metadata so that shims and rackup switch work with it.

rackup link <name> <path> [--set-default] [--force]

Accepted paths🔗

  • A Racket source checkout root (containing racket/bin and racket/collects).

  • A PLTHOME directory (containing bin and collects directly).

--set-default

Set the linked toolchain as the global default.

--force

Replace an existing link with the same local name.

Examples🔗

rackup link dev ~/src/racket

rackup link dev ~/src/racket --set-default

rackup link cs-head ~/src/racket --force

rackup remove🔗

Remove one installed or linked toolchain and its per-toolchain addon directory. For linked toolchains, only the rackup metadata and symlink are removed; the original source tree is untouched. Shims are rebuilt automatically afterward.

rackup remove <toolchain>

Also removes orphan/partial toolchain directories that were left behind by interrupted installs.

rackup prompt🔗

Print prompt/status information for the active toolchain. Designed to be called from PS1 or a prompt function. Prints nothing when no active/default toolchain is configured. When shell integration is active, the shell wrapper handles this without starting Racket for speed.

rackup prompt [--long|--short|--raw|--source]

(default)

Print a compact label like racket-9.1.

--long

Print the long bracketed form: [rk:<toolchain-id>].

--short

Same as default.

--raw

Print only the active toolchain ID.

--source

Print <id><TAB><env|default>.

Shell prompt integration🔗

# Add to .bashrc / .zshrc:

PS1='$(rackup prompt) '$PS1

rackup reshim🔗

Rebuild shim executables from the union of all installed toolchain executables. This runs automatically on install, link, remove, and default set, but can be run manually if shims get out of sync.

rackup reshim

Shims are small scripts placed in ~/.rackup/shims/ that delegate to the active toolchain’s real executable. Common shims include racket, raco, scribble, drracket, slideshow, gracket, mzscheme, and mzc.

rackup init🔗

Install or update shell integration in ~/.bashrc or ~/.zshrc. Writes a managed block that sources ~/.rackup/shell/rackup.<shell>. The managed block adds the shims directory to PATH and defines the rackup shell function that wraps rackup switch so it takes effect in the current shell.

rackup init [--shell bash|zsh]

If --shell is omitted, the current shell is detected automatically.

rackup self-upgrade🔗

Upgrade rackup’s own code by rerunning the bootstrap installer into the current RACKUP_HOME. By default this skips shell init edits and keeps your current shell config unchanged. The installer picks the best mode automatically (prebuilt binary if available for the current platform, otherwise source).

rackup self-upgrade [--with-init] [--exe | --source]

--with-init

Allow the installer to run shell init updates.

--exe

Require a prebuilt binary (error if unavailable for this platform).

--source

Force source installation, even if a prebuilt binary is available.

Advanced🔗

Set RACKUP_SELF_UPGRADE_INSTALL_SH to a path or URL to override the install script source (useful for testing dev branches).

rackup runtime🔗

Manage rackup’s internal Racket runtime.

When rackup is installed from source, it uses a hidden minimal Racket installation to run itself. This runtime is separate from user toolchains and is not exposed via shims or PATH.

When rackup is installed as a prebuilt executable, Racket is embedded in the rackup-core binary and no hidden runtime is needed. In this mode, runtime install and runtime upgrade are no-ops; use rackup self-upgrade to update the executable instead.

rackup runtime status|install|upgrade

status

Show runtime mode and metadata.

install

Install the hidden runtime if missing (source installs only).

upgrade

Upgrade the hidden runtime if a newer version is available (source installs only).

rackup uninstall🔗

Remove all rackup-managed data and shell init blocks. This is destructive and cannot be undone.

rackup uninstall [--yes]

--yes

Skip the interactive DELETE confirmation prompt.

What gets deleted🔗

  • The hidden runtime (source installs) or prebuilt executable and shared libraries (exe installs).

  • All installed toolchains and linked-toolchain metadata/overlays.

  • Shims, caches, downloaded installers, and per-toolchain addon dirs/packages.

  • Rackup-managed init blocks from ~/.bashrc and ~/.zshrc.

Linked local source trees are not deleted — only rackup’s links to them.

rackup doctor🔗

Print diagnostics for rackup paths, hidden runtime, and installed toolchains. Useful when troubleshooting installation or shim issues. Reports on:

  • RACKUP_HOME location and contents.

  • Hidden runtime status and version.

  • Installed toolchains, their metadata, and whether their directories exist.

  • Shim directory contents and PATH status.

rackup doctor

rackup version🔗

Print rackup version information (git commit hash and date).

rackup version

Shell integration🔗

After the initial bootstrap, run rackup init to set up your shell. This adds a small managed block to your .bashrc or .zshrc that:

  • Adds ~/.rackup/shims to PATH so racket, raco, etc. resolve to rackup shims.

  • Defines a rackup shell function that wraps the real rackup binary. When you run rackup switch, the wrapper evals the emitted shell code so the switch takes effect in the current shell, without starting a subshell.

rackup init --shell bash   # or zsh

Once initialized, switching toolchains takes effect immediately:

$ rackup switch 8.18

$ racket --version           # uses 8.18

$ rackup switch stable

$ racket --version           # back to stable

The managed block is delimited by marker comments so that rackup init can update it idempotently and rackup uninstall can remove it cleanly.

Environment variables🔗

User-facing🔗

RACKUP_HOME

Override the rackup state directory (default: ~/.rackup).

RACKUP_TOOLCHAIN

Override the active toolchain for the current shell session. Set by rackup switch; can also be set manually.

Set by rackup when activating a toolchain🔗

PLTHOME

Root of the active Racket installation.

PLTADDONDIR

Per-toolchain addon directory (packages, compiled files).

PATH

Prepended with the shims directory.

Rackup saves and restores any user-set values of PLTHOME, PLTCOLLECTS, PLTADDONDIR, PLTCOMPILEDROOTS, PLTUSERHOME, RACKET_XPATCH, and PLT_COMPILED_FILE_CHECK before overriding them, so rackup run passes through your original settings to the subprocess.

Directory layout🔗

All rackup state lives under RACKUP_HOME (default ~/.rackup). The layout differs slightly depending on how rackup was installed.

Source installation🔗

~/.rackup/

  bin/rackup              # the rackup shell wrapper

  libexec/                # rackup's Racket source code

  runtime/                # hidden internal Racket runtime

  toolchains/             # installed/linked toolchains

  addons/                 # per-toolchain addon directories

  shims/                  # executable shims (racket, raco, ...)

  shell/                  # generated shell integration scripts

  cache/                  # downloaded installer cache

  index.rktd              # toolchain registry

Prebuilt executable installation🔗

~/.rackup/

  bin/rackup              # the rackup shell wrapper

  bin/rackup-core         # prebuilt executable (embeds Racket)

  lib/                    # shared libraries for the executable

  toolchains/             # installed/linked toolchains

  addons/                 # per-toolchain addon directories

  shims/                  # executable shims (racket, raco, ...)

  shell/                  # generated shell integration scripts

  cache/                  # downloaded installer cache

  index.rktd              # toolchain registry

No runtime/ or libexec/ directories are needed in exe mode because Racket is embedded in the rackup-core binary.

Toolchain resolution🔗

The active toolchain is resolved in this order:

  1. RACKUP_TOOLCHAIN environment variable (set by rackup switch).

  2. The global default (set by rackup default).

When you run a shimmed command like racket, the shim looks up the active toolchain, resolves its PLTHOME, and execs the real binary from the toolchain’s bin/ directory.

Spec matching🔗

When specifying a toolchain for commands like default, switch, remove, or run, rackup matches against installed toolchain IDs. For install, the spec is resolved against the Racket download infrastructure:

  • stable → queries version.txt from download.racket-lang.org.

  • pre-release → queries the pre-release metadata endpoint.

  • snapshot / snapshot:utah / snapshot:northwestern → queries snapshot table.rktd for the latest build.

  • Numeric versions (e.g. 8.18) → mapped to the exact release installer URL.

Migrating from racket-dev-goodies🔗

If you previously used racket-dev-goodies (the plt shell function and plt-bin symlinks), rackup replaces it entirely.

  1. Remove the plt-alias.bash source line from your .bashrc/.zshrc and remove any plt-bin symlinks from your PATH. The plt function sets PLTHOME globally, which conflicts with rackup’s per-toolchain environment management.

  2. Install rackup and re-register your Racket builds:

rackup link dev ~/src/racket

rackup link 8.15 /usr/local/racket-8.15

rackup default set dev

For release versions you can also use rackup install:

rackup install stable

rackup install 8.15

If you used the short r and dr aliases from racket-dev-goodies, enable them in rackup with:

rackup reshim --short-aliases

This creates r (for racket) and dr (for drracket) shims. You can also pass short-aliases to rackup install.

Equivalents at a glance🔗

plt ~/src/racket

rackup link dev ~/src/racket && rackup default set dev

plt (show current)

rackup current

plt-make-links.sh

rackup reshim (automatic on install/link)

plt-fresh-build

Build manually, then rackup link

r / dr aliases

rackup reshim short-aliases