Back to Writing
Growth status: Evergreen EvergreenUpdated: Nov 29, 20263 min read

How we ship Yada as a standalone CLI

How we built, tested, and distributed five standalone binaries, and what an npm warning taught us about release checks.

The terminal agent was working, but trying it meant installing a recent Node.js runtime first. We wanted someone to be able to install yada on a clean machine and get the full terminal interface. That turned a coding-agent project into a release-engineering project.

This follows how we built the terminal coding agent.

Build once, run on the target systems

The npm package remains useful for applications that already run Node.js. For the CLI, we chose Bun’s compiler to build a self-contained executable from the project’s ES module graph. Ink’s dependency on top-level await made the CommonJS bundle required by the Node single-executable route we evaluated a poor fit.

The build produces five executables: macOS and Linux on ARM64 and x64, plus Windows on x64. It leaves the SQL drivers used by server deployments out of the CLI and stubs the React debugging integration. The packages weighed roughly 41–55 MB compressed in the first release, with the JavaScript runtime and the full-screen UI included.

Cross-compiling tells you the compiler produced a file. Before publishing, CI runs --version and --help on the target operating systems. The workflow attaches the archives and a combined SHA256SUMS file to a GitHub release. Pull requests also exercise the Linux build and check the shell installer, so ordinary changes can catch packaging breakage before a tag.

One release behind every installer

The shell and PowerShell installers pick an archive for the current system and verify it against the release checksum. In a shell running under Rosetta, the installer checks whether the process is translated so an Apple Silicon Mac still downloads the ARM64 build. A missing checksum fails the install. We exercised that path successfully with a deliberately altered test archive.

Publishing the GitHub release also updates the configured Homebrew and WinGet channels. Homebrew’s tap name follows the GitHub repository, so the install is brew tap edgar4/yada followed by brew install yada. The update workflow uses a deploy key scoped to the tap repository.

The warning we acted on too quickly

The first binary release was 0.6.0. The executables passed their checks and the Homebrew tap updated. During the npm publish, the CLI printed a warning saying the yada command was invalid and had been removed.

We started a replacement release before checking what npm had actually published. A tag race made us redo one of the release attempts. While the replacement built, we finally installed 0.6.0 from the registry into a clean directory. The command was there, and yada --version returned 0.6.0.

The warning described a check made before the build step produced the CLI entry point. The published tarball already contained it. We cancelled the replacement before it shipped.

The check we should have run first was simple: install the exact published version on a clean machine and run it. Compiler checks, installer checks, and registry checks each cover a different copy of the tool.

The installation guide lists the available channels. The final installment covers what it took to give Yada computer use.

Share this writing