Skip to content

feat(sea): build single executable application and upload to release#239

Merged
remarkablemark merged 2 commits into
masterfrom
build/sea
Jul 12, 2026
Merged

feat(sea): build single executable application and upload to release#239
remarkablemark merged 2 commits into
masterfrom
build/sea

Conversation

@remarkablemark

@remarkablemark remarkablemark commented Jul 12, 2026

Copy link
Copy Markdown
Member

What is the motivation for this pull request?

This is a feature that adds experimental standalone executables built with Node.js SEA (Single Executable Applications) while retaining the npm package as the primary, fully supported distribution.

plan.md

What is the current behavior?

The application is only distributed as an npm package that requires Node.js to be installed separately.

What is the new behavior?

  • Adds standalone executables for Linux x64/ARM64, macOS Intel/ARM64, and Windows x64
  • Executables are built using Node.js SEA and attached to GitHub releases
  • Each executable is versioned and archived as code-ollama-v<version>-<os>-<arch>.<archive>
  • Includes smoke tests to verify executable functionality before release
  • Maintains the npm package as the primary distribution method

Implementation Details

  • Use Node.js 25.9.0 for reproducible SEA builds
  • Build ESM entry with vite.sea.config.mts, disabling code splitting
  • Load native keyring dependency lazily to prevent startup issues
  • Generate executables with sea-config.json and node --build-sea
  • Build on native GitHub runners for each platform
  • Perform version verification and --help smoke tests

Limitations

  • OAuth authentication for MCP servers is unsupported in standalone executables due to the platform-native keyring addon not being embedded
  • OAuth users should continue using the npm package
  • Standalone executables remain experimental while Node SEA is under active development

Checklist:

  • Conventional Commits
  • Tests (smoke tests for executables)
  • Documentation (README updated with limitations)

Add experimental standalone executables built with Node.js SEA while retaining
the npm package as the primary, fully supported distribution. Build each
executable on its native GitHub-hosted runner and attach versioned archives to
the GitHub release created by Release Please.

---

Implementation

- Use Node.js 25.9.0 for reproducible SEA builds and keep the normal npm build
  on the Node version declared by `.nvmrc`.
- Build one ESM entry with `vite.sea.config.mts`, disabling code splitting,
  bundling application dependencies, and leaving `@napi-rs/keyring` external.
- Load the native keyring dependency lazily so unsupported OAuth credential
  storage does not prevent a standalone executable from starting.
- Generate executables with `sea-config.json` and `node --build-sea`.
- Share setup, build, platform-specific generation, macOS ad-hoc signing, and
  smoke tests through `.github/actions/build-sea/action.yml`.
- Run one Linux x64 SEA smoke build in `.github/workflows/build.yml` to catch
  packaging regressions before release.
- Build release executables on native runners for Linux x64/ARM64, macOS
  Intel/ARM64, and Windows x64.
- Compare the version reported by each executable with the Release Please tag
  after removing its leading `v`, then verify `--help`.
- Archive Unix executables as `.tar.gz` and Windows executables as `.zip` using
  separate native-shell steps, then upload them with `gh release upload`.
- Name release assets `code-ollama-v<version>-<os>-<arch>.<archive>` while
  keeping the contained executable named `code-ollama` or `code-ollama.exe`.

---

Limitations

- OAuth authentication for MCP servers is unsupported in standalone
  executables because the platform-native keyring addon is not embedded.
- Document this limitation in the README and direct OAuth users to the npm
  package.
- Keep standalone executables experimental while Node SEA remains under active
  development.
@remarkablemark remarkablemark self-assigned this Jul 12, 2026
@remarkablemark remarkablemark added enhancement New feature or request documentation Improvements or additions to documentation labels Jul 12, 2026
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…e workflow

The action now always:

1. Reads the expected version from `package.json`.
2. Extracts the version from the executable output.
3. Requires an exact match.
4. Verifies `--help`.
@remarkablemark remarkablemark merged commit 034fe66 into master Jul 12, 2026
18 checks passed
@remarkablemark remarkablemark deleted the build/sea branch July 12, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant