Conversation
|
Hey @ReStranger, thanks for putting this together! 🙏 After review, we've decided not to merge this. Here's why: 1. context-mode is an MCP server, not a standalone CLIcontext-mode runs as an MCP server spawned by AI coding tools (Claude Code, Gemini CLI, Cursor, etc.) via their plugin/MCP systems. It's not a standalone binary users invoke directly. The install flow is:
A Nix package would build a standalone binary, but no AI coding tool knows how to discover or spawn it from a Nix store path. The tool would be installed but unreachable. 2. Hardcoded version creates immediate drift
3. Placeholder description
4. Maintenance burden4 new files ( 5.
|
What / Why / How
Add Nix flake packaging for
context-modeso the project can be built and run as a Nix package instead of only via npm-style installation. This adds a minimal flake-based package that wraps the bundled CLI withnodejs_22, includes the runtime assets the CLI expects next to itself, enablesallowUnfreein the flake-local Nixpkgs import for the project's Elastic-2.0 license, and exposes the package as bothpackages.defaultandpackages.context-modeplus anapps.defaultentry fornix run.Affected platforms
Test plan
nix build .#context-mode./result/bin/context-mode --help./result/bin/context-mode doctornix run .# -- --helpnode,tsx, andpython3from the wrappedPATHChecklist
npm testpassesnpm run typecheckpassesnextbranch (unless hotfix)Cross-platform notes
Our CI runs on Ubuntu, macOS, and Windows.
cli.bundle.mjsand installs runtime assets alongside it, matching the existing relative-path expectations in the CLInodejs_22is used so Linux builds can rely on the built-in SQLite path already supported by the projectallowUnfreeis configured in the flake's localnixpkgsimport, so users do not need--impureor external Nix config to build the package