Skip to content

doctor and upgrade

Two commands look after your Beans installation itself: doctor tells you what it can do, and upgrade moves it to the latest release.

Terminal window
beansc doctor

doctor prints a banner, then a report. Every row is either ready or names the one command that fixes it. It always exits 0, even when something is not ready. It is a report, not a gate.

It reports:

  • package class (from the install’s VERSION file)
  • host target
  • install root (BEANS_HOME)
  • standard library root (honors BEANS_STDLIB)
  • runtime source
  • wasm host source
  • clang, with version
  • linker
  • archiver
  • SDK / sysroot (on macOS it uses xcode-select -p)
  • git

Then it checks capability rows:

CapabilityNeeds
check / run / llvm / build --emit irstdlib
native buildstdlib + runtime + clang + macOS SDK
bindgenclang
static librarynative build + archiver

Where a row is not ready, the fix names the exact command, for example xcode-select --install.

Terminal window
beansc upgrade

upgrade moves this installation to the latest release. It needs an installed release: it reads BEANS_HOME, and a plain source checkout has no install, so it errors there.

What it does:

  • runs the bundled installer at {BEANS_HOME}/libexec/beans-install.sh (or .ps1 on Windows) with --prefix <BEANS_HOME> --no-modify-path
  • keeps the current install location
  • verifies the download’s SHA-256
  • runs the staged compiler
  • then replaces the old install

On Windows, run it through the installed beansc.cmd launcher.

See Upgrade beansc for the getting-started view, and Install Beans for a first install. When a command fails, the exit codes tell you why.