lminstall guide

Zero-shell installation engine, provider channels, isolated launch profiles, and loopback credential bridging in lminstall.

Overview

lminstall replaces ad-hoc curl-pipe-sh scripts, global npm installs, and manual PATH management with a single static Go executable. All HTTP downloads, SHA-256 and SHA-512 checks, tar/zip archive extraction, npm registry packument resolution, pure-Go Git cloning, and launcher generation happen in-process inside Go.

Provider catalog and official distribution channels

The embedded manifest (internal/install/providers.json) covers 15 live coding provider CLIs plus the claudemock fixture indicator across these installer channels:

Owned prefixes, receipts, and atomic upgrades

Each provider resides in its own subdirectory under --root (or LMINSTALL_ROOT) with an ownership marker and channel receipt. Installs are idempotent once the managed binary passes --version; broken or partial installs are repaired automatically on the next install. Upgrades stage and verify the candidate binary at a private temporary path before replacing the active executable, leaving the previous working installation intact if verification fails. Concurrent operations on the same provider fail immediately rather than blocking on a lock loop.

Configure, run, and env isolation

lminstall separates binary installation from model routing and credentials through three launch subcommands:

  1. lminstall configure writes profile.json and nonsecret config previews into an owned, absolute --profile-dir for either the mock backend (literal loopback HTTP against lmmock) or the ollama-cloud backend (https://ollama.com for Claude). It never reads the secret value of --credential-env.
  2. lminstall run executes the managed provider binary with arguments after -- using a fresh ephemeral HOME, USERPROFILE, XDG directory set, and working directory that are deleted on exit. An in-memory Go loopback bridge injects the secret from --credential-env into upstream requests while presenting only a random placeholder token to the child process and scrubbing raw and encoded secret bytes from stdout and stderr.
  3. lminstall env renders a persistent mock-backend runtime directory (--runtime-dir) and prints environment bindings (--format plan, github-env, or sh) so multi-turn orchestrators like lmctl seed and lmctl prompt can invoke the provider repeatedly with shared session state.

GitHub Actions integration

The repository provides three composable GitHub Actions (lmctl-ai/lminstall, lmctl-ai/lminstall/configure, and lmctl-ai/lminstall/env) that build lminstall with CGO_ENABLED=0, install the requested providers, export bin_dir to GITHUB_PATH, and configure isolated profiles for CI testing.