Skip to content

Latest commit

 

History

History
87 lines (78 loc) · 5.88 KB

README.md

File metadata and controls

87 lines (78 loc) · 5.88 KB

Executor 2 beta

Install with npm, npm i -g executor@beta, on Node 14.18 or newer. Without Node, run curl -fsSL https://executor.sh/docs/install.sh | sh on macOS or Linux, or irm https://executor.sh/docs/install.ps1 | iex in PowerShell on Windows. Each release also attaches its archives and SHA256SUMS. Run executor to start the background Executor, or join the one already running, and open the dashboard. The background Executor keeps running until executor service stop; nothing starts it with the OS. executor checks npm daily for a newer release and suggests executor upgrade; set EXECUTOR_NO_UPDATE_CHECK=1 to skip it. Use executor service start to start it without a browser, executor serve to run it in the foreground, and executor service pair to get a new browser connection link. executor upgrade installs the newest release on your channel the way Executor was installed: an install-script copy downloads and checks the release and keeps the previous version for executor upgrade --rollback; an npm, pnpm, Bun or Yarn install runs its package manager. Either way it stops the background Executor before replacing its files and starts it again on the new version; a release from before the background service, which a rollback can return to, has no executor service, so run executor serve there instead.

Executor is one executable, built with Bun, with the files it runs or reads beside it: the dashboard, the app framework and compiler references, workerd, Git, the native credential-store binding and the telemetry collector with its viewer. It needs no source checkout, Node, Bun or 1Password on the user machine. The executor npm package is a launcher. The first time a version starts, it downloads that release's archive for the platform, for macOS (Apple Silicon and Intel), Linux (arm64 and x64, glibc) or Windows (x64), from the public GitHub release, checks it against the SHA-256 the package records, and keeps it in ~/.executor/v2/launcher/<version> with the version before it. The same archive is the release download the install scripts and Homebrew use. EXECUTOR_DOWNLOAD_URL names a mirror of the releases for all of them.

Beta uses ~/.executor/v2/cli for its data. This path stays the same at the stable release. It is separate from Executor 1 data. One server runs per data directory; its .server.lock stops a second. EXECUTOR_DATA_DIR selects another directory, and EXECUTOR_PORT or executor service set port changes the default port of 4312. The desktop app uses the same directory and background Executor. Its first launch moves the data of a desktop release from before the background service into that directory, once. CLI data already there moves to ~/.executor/v2/backups/cli-data-<time>, which the desktop app names; nothing is merged or deleted. The CLI's settings carry over, except its port and the env variables that belong to its data.

On first launch, Executor saves its API and encryption keys in the OS credential store: macOS Keychain, Windows Credential Manager, or Linux Secret Service. Linux uses a persistent Secret Service such as GNOME Keyring. If there is no store on a directory's first start, the keys are saved to keys.json in the data directory (mode 0600) and the path is printed to stderr. If a store exists but access is denied or it is locked, startup stops without a key file and the next start asks again. Over SSH, unlock the store first, or set EXECUTOR_KEY_STORAGE=file before a directory's first start to use keys.json (os requires the store instead). A directory that already uses the OS store stops when it is locked or unavailable. A missing or invalid credential or key file stops startup; existing installations never receive replacement keys.

Back up the data directory, including installation.json and any keys.json, and the matching OS credential (com.usefulsoftware.executor.v2, account ID from that file) when the directory uses one. Copying only the data directory to another machine is not enough to recover it. For a new headless install, supply both EXECUTOR_API_KEY (32+ characters) and EXECUTOR_ENCRYPTION_KEY (64 hexadecimal characters) through a secret manager. Those supplied keys are never saved by Executor. Keep them with your backups. A directory keeps its chosen key source across upgrades; changing it requires an explicit transfer. Uninstalling the program does not delete your data or keys.

How releases are made

Every release is built from one commit of the Executor repository. Its source is published in UsefulSoftwareCo/executor under the tag executor@<version>, with that version in apps/cli/package.json, so it builds from source as the version it names. The release's notes list the changes users would notice since the release before it.

Each archive holds only native binaries built for its platform, and each is checked to be so when it is built. The macOS executables and app are signed with a Developer ID and the hardened runtime and notarized by Apple, so Gatekeeper accepts a downloaded copy. Windows builds are not code-signed. The executable is built on a Bun runtime patched to ignore BUN_OPTIONS, BUN_BE_BUN, BUN_INSPECT and similar variables, so no local process can run its own code inside it.

Each release's SHA256SUMS lists every asset, and the release is published only once every asset is uploaded. The launcher in this package records the SHA-256 of each platform's archive and refuses an archive that does not match. After publishing, the release is installed the way users install it on Linux (x64 and arm64), macOS and Windows: the install scripts, this package, Homebrew, the desktop installers, the self-host image, and the previous desktop version updating itself. Licenses for bundled dependencies are inside each archive, and every release attaches the checksum-pinned source of its bundled Git. How releases are built and published is described in RELEASING.md in the Executor repository.