Skip to content

slatebox 0.3.0 (installer and CLI)

Choose a tag to compare

@github-actions github-actions released this 26 Nov 07:21
· 21 commits to main since this release

Added

  • updates: automatic updates for self-hosted Slatebox: slatebox install and slatebox upgrade set up a host
    updater (a launchd agent, systemd timer or cron line every five minutes) on an image that has
    slatebox updates (2.1.0 on). It applies only a release signed by Slatebox, pulled by its digest,
    through the same backup, health check and rollback as slatebox upgrade; when to apply is set in
    Admin › Updates. New: slatebox updates [enable | disable | check | apply | auto on|off | run]
    (also slatebox update), --no-auto-updates. slatebox uninstall removes the updater.
    slatebox upgrade refuses while an automatic update runs.
  • installer: a wizard in the terminal. Questions, answers, the plan and the setup link are
    in the terminal's own text color (bold where it matters), so they read on light and dark
    backgrounds; Slatebox gold (dark), deep green (light) or mid tones (not known) mark the
    pointer, steps and tags. The background comes from SLATEBOX_THEME=light|dark, COLORFGBG,
    or the terminal's answer to a background query. The machine
    check runs first and shows one row per check (Docker, processor, disk, port; r checks
    again). Six short sections follow (where, address, admin, agents, sign-in, review),
    answered with the arrow keys, numbers and Enter, and each answer folds into one line. A
    taken team address offers the free ones to pick. One question takes the usual settings
    for backups, size and mail (exactly what --yes would choose). The review shows the plan
    in a box, with Install, Change a section… (asks that section again) or Cancel, and d for
    every file and command; on a server or a cluster Cancel is highlighted, as before. Each
    install step is a spinner row that settles into its result and time, and the end shows
    where Slatebox runs and the one-time setup link, never wrapped (a link the terminal can
    open, where it supports one). Ctrl-C stops at any question and changes nothing (exit 7),
    and the terminal is always given back.
  • installer: --plain (or SLATEBOX_PLAIN=1) keeps the line-by-line questions, for
    screen readers and simple terminals. They are also used with TERM=dumb, in CI, without
    raw mode, or under 60 columns, and they are the same, byte for byte, as in 0.2.3.
    NO_COLOR and FORCE_COLOR are honored.
  • installer: dependencies: @clack/core is pinned to exactly 1.6.0 (as slatebox-mcp is
    to its version). Its own four small dependencies (fast-string-width, fast-string-truncated-width,
    fast-wrap-ansi, sisteransi; all MIT, no install scripts) keep the caret ranges @clack/core
    publishes, so npx slatebox resolves the newest within those ranges, as it already does for
    slatebox-mcp's @modelcontextprotocol/sdk. No npm-shrinkwrap.json is shipped.
  • installer: after "Slatebox is running", the wizard continues with the first admin:
    Create the admin account now (recommended) asks name, email (the admin email given
    earlier), team name and the password twice (hidden, with a strength check) and sends them to
    the server's own one-time setup endpoint (POST /setup/<token>, the form the setup link
    opens; no new server path), over this computer's port or the link's address. The link is
    single use and stops working once the admin exists. I'll use the setup link shows the
    link with a QR code and waits up to 10 minutes (polling the setup state) for the admin to be
    created; Enter stops waiting and keeps the link. With single sign-on only, the link is kept.
  • installer: plain prompts (--plain and friends) ask one optional question after the
    closing lines, only at a terminal: "Create the admin account here in the terminal now?".
    --yes and --json are unchanged (no question; the JSON events are the same).
  • installer: where no browser can open (an SSH session, Linux with no DISPLAY or
    WAYLAND_DISPLAY, a container, CI) the device sign-in and the setup link are not offered to a
    browser: "No browser here (this is an SSH session). Open this on any device:" with the link
    (an OSC 8 link where the terminal supports one) and, in the wizard, a QR code (half blocks,
    black on white; ASCII without Unicode). An opener that is missing, exits non-zero or errors
    says so and shows the same. --plain --qr adds the QR code to plain output.
  • installer: the QR encoder is vendored (uqr 0.1.3, MIT, pure JavaScript) in
    src/vendor/qrcode.mjs; the package still has two dependencies.
  • installer: a setup link or sign-in page on localhost / 127.0.0.1 / ::1, with no
    browser here, says "This link opens only on this computer:" instead of "Open this on any
    device:", gives the ssh -L <port>:localhost:<port> <user>@<server> tunnel (the server
    address from SSH_CONNECTION) and shows no QR code; the wizard's "I'll use the setup link"
    hint says so too.
  • installer: plain closing lines with no browser here say so before the setup link ("No
    browser here (...). Open this on any device:"), and --qr adds a QR code for the setup link
    there (it was only on the device sign-in page). Runs where a browser can open (every golden
    transcript) are unchanged.

Changed

  • image: installs Slatebox 2.1.0 (ghcr.io/slatebox/slatebox:2.1.0), the first self-host image built,
    smoke-tested and signed by GitHub from a release tag (cosign keyless, with build provenance); its
    version is the app's version. It adds slatebox updates, so new installs get automatic updates.

  • The wizard's key handling is @clack/core 1.6.0 (pinned exactly; about 56 kB), loaded only
    for a wizard run: --version, --json, --yes, agents, pipes and CI never load it.

  • --json, --yes, a run with nobody to ask (exit 3), the answers file, flags and exit codes
    are unchanged.

  • create-slatebox 0.1.4 installs slatebox 0.3.0.

  • installer: golden QR snapshot setup-link.color.txt follows the new colored look.

  • installer: golden transcript plain-team-taken.stderr.txt gains one line, the optional
    first-admin question (no answer left in that scenario, so the printed link stays as it is).
    The scenario sets DISPLAY (a Linux desktop), so its browser question is asked as before.

  • updates: golden transcripts plain-local, plain-team-taken, yes and json gain one
    line (one updates warn event in --json): their test image has no slatebox updates, so the
    install says no host updater was set up and how to get one. Nothing else in them changes.

Fixed

  • installer: Esc or Ctrl-C at a first-admin question (First admin, Name, Email, Team,
    Password) no longer reports a finished install as "Canceled. Nothing was changed." with exit
    7: it ends that step only, keeps the setup link (shown in its box if it was not yet), draws
    the closing lines (the secrets warning, the install record, next steps) and exits 0. Ctrl-C
    between those questions (while the account is being created) does the same, abandoning the
    request in flight, instead of "Run slatebox install again to finish". Plain prompts: the
    input ending or a cancel at any first-admin question leaves the printed link, exits 0 and
    still runs --show-secrets; a password question at the end of piped input no longer asks
    again forever.
  • installer: the wait for the admin is bounded: each check (the setup page first, a cheap
    GET; the image's own setup-link --check through docker or kubectl exec only when no page
    answers) is given up on after 10 seconds and raced against Enter and the 10-minute
    deadline, so a hung exec no longer holds the wait (and Enter) for up to 15 minutes, and the
    container no longer starts a process every 3 seconds.
  • installer: the colored QR code draws every cell as an upper half block in the top
    module's color on the bottom module's color, so terminals that add line spacing below the
    glyph no longer show light gaps across it (they made the code unreadable to scanners), and
    the wizard uses full cells (backgrounds only, which no line spacing breaks) when the
    terminal has the rows. Terminals that add spacing above the glyph can still show gaps in the
    half-block look; without color the code is drawn in the terminal's own colors (inverted on
    a light terminal).
  • installer: CI=false, CI=0, CI=no and CI=off no longer count as a CI run (a browser
    is offered again).