Skip to content

Add make install that also registers the server - #10

Merged
jserv merged 1 commit into
mainfrom
install
Oct 4, 2026
Merged

jserv merged 1 commit into
mainfrom
install

Conversation

@jserv

@jserv jserv commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Installing a checkout meant cargo install, then registering the binary with each agent by hand. make install now builds, installs into BINDIR (~/.local/bin by default), and registers the binary with Claude Code and, when a Codex config exists, with Codex. make register repeats only the registration. An entry either client already has is left alone, since it may carry env or args the user added, and neither entry holds the token.

The binary is staged in BINDIR, ad-hoc signed, run once, then renamed over the target, because copying over an image macOS has already run gets every later exec killed. The Codex entry is appended rather than written by codex mcp add, whose --env stores values instead of forwarding the token by name. The installer runs on the Python 3.9 macOS ships and needs 3.11 only to read a Codex config.

Verified on macOS (GNU Make 3.81):

  • python3 tests/install.py passes; it drives make install and make register against stubbed cargo and claude (spaces, quotes, a leading dash and ~ in BINDIR, existing entries in every TOML spelling, invalid configs, failed builds and smoke runs, CODEX_HOME). CI now runs it on Linux and macOS.
  • A real make install into a scratch HOME and BINDIR, with /usr/bin/python3 (3.9) and with Homebrew's 3.14: installs, registers once, and a second run leaves both entries as they are.
  • SIGTERM during the smoke run exits 1 and leaves no staged file behind.

Summary by cubic

Adds make install, which builds, installs into BINDIR (default ~/.local/bin), and registers the binary with Claude Code when the claude CLI is on PATH and, when a Codex config exists, with Codex. make register repeats only the registration, replacing manual cargo install and per-agent setup.

Details

  • The binary is staged in BINDIR, ad-hoc signed, run once, then renamed over the target; copying over an image macOS has already run leaves a stale codesign blob that kills every later exec. SIGTERM and SIGHUP leave no staged file behind.
  • The Codex entry is appended to config.toml rather than written via codex mcp add, whose --env stores values instead of forwarding the token by name.
  • An entry either client already has is left as is, since it may carry user-added env or args; neither entry holds the token.
  • A Codex config that isn't valid TOML or UTF-8 is left untouched with an error, never a traceback.
  • The installer runs on Python 3.9 and needs 3.11 only to read a Codex config; PYTHON=... picks the interpreter. python3 tests/install.py exercises install and register against stubbed cargo and claude and needs Python 3.11, and CI now runs it on Linux and macOS.

Written for commit 5290820. Summary will update on new commits.

Review in cubic

cubic-dev-ai[bot]

This comment was marked as resolved.

Installing a checkout meant cargo install, then registering the binary
with each agent by hand. make install now builds, installs into BINDIR
(~/.local/bin by default), and registers the result with Claude Code
when its CLI is on PATH, and with Codex when its config exists. make
register repeats only the registration.

The binary is staged in BINDIR, ad-hoc signed, run once, then renamed
over the target: copying over an image macOS has already run leaves a
stale code signature, and every later exec dies with SIGKILL. A failed
build or smoke run leaves the installed binary as it was.

An entry either client already has is left alone, since it may carry
env or args the user added. The Codex entry is appended, not written by
codex mcp add, because only the file can forward the token by name
through env_vars. The merged document is parsed before anything is
written, so a config with the table in any spelling is not doubled, and
one that is not valid UTF-8 TOML is refused untouched.

The installer runs on the Python 3.9 macOS ships, and needs 3.11 only
to read a Codex config. tests/install.py exercises it against stubbed
cargo and claude, and CI runs it on Linux and macOS.
@jserv jserv changed the title Add make install, which installs and registers the server Add make install, which installs and registers the server Oct 4, 2026
@jserv jserv changed the title Add make install, which installs and registers the server Add make install that also registers the server Oct 4, 2026
@jserv
jserv merged commit b05dbad into main Oct 4, 2026
11 checks passed
@jserv
jserv deleted the install branch October 4, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant