Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
Install scripts
This directory holds only the entry scripts of the local model stack, plus this
README. Its release pipeline generates the scripts with pinned versions; source,
tests and release tools stay in their own repository, and the pipeline rewrites
only its scripts and its marked section below. After updating stack.sh and
stack.ps1, run node scripts/sync-install-stack-pin.mjs --write so
scripts/install/install.sh and scripts/install/install.ps1 keep matching
release pins for standalone use outside a repository checkout (Desktop GitHub
Releases do not attach those scripts).
Your own API keys: user.env
The Linger app keeps the keys you supply in user.env in its instance
folder, ~/.simplexai/instances/desktop/user.env (LINGER_HOME replaces
~/.simplexai). The installer creates the file with comments on first start;
starting the services never changes it after that (the app's setup page
saves the keys typed there into it), and upgrades and reinstalls keep it. It
must stay private to you (chmod 600); otherwise the app stops and says how
to fix it. Docker Compose and pnpm dev read these keys from the root .env
instead.
| Name | Turns on |
|---|---|
COMPOSIO_API_KEY |
Connected apps such as Gmail, GitHub and Slack |
SONIOX_API_KEY |
Recording, dictation and meeting transcripts (overrides app) |
XAI_API_KEY |
Grok Live voice mode, without Soniox (overrides app) |
TZ |
The services' time zone, for example America/New_York |
Voice keys are normally saved in the app itself; a voice key written here still works and takes precedence over the one saved in the app.
XAI_API_KEY=xai-...
SONIOX_API_KEY=...
Quit and reopen the Linger app after editing it: services whose configuration
changed restart. LiveKit runs whenever the app has voice tools for this
computer, with or without a voice key. Other names,
such as LINGER_SECRET_SEED or ports, are ignored with a warning, because the
installer manages them. Keys never appear in installer logs or the app's
diagnostics.
Local model stack: stack.sh / stack.ps1
stack.sh (Linux, macOS) and stack.ps1 (Windows) run a pinned version of localmodels stack.
Both scripts hold only the version pin, no source: the first run downloads that version's
self-contained Python + localmodels kit from @simplexai/localmodels-<target> on npm, checks the archive SHA256
pinned in the script and every file listed in the kit's tool.json, then caches it; later runs start
offline and need no system Python.
scripts/installs/stack.sh --help
scripts/installs/stack.sh capabilities --json
scripts/installs/stack.sh plan --offline
scripts/installs/stack.sh apply "/path/to/plan.json" --approve CONFIRMATION_ID
powershell -ExecutionPolicy Bypass -File scripts\installs\stack.ps1 --help
--region auto|global|cn before the command selects the registry (-Region in PowerShell).
The flag overrides SIMPLEX_REGION, which defaults to auto. Auto probes the first 256 KiB of
the pinned tarball from both registries in parallel with a five second deadline. It chooses the
faster success and defaults to global if both fail. A download error retries the other registry
once. A SHA256 mismatch is fatal. The resolved region is passed to localmodels and its Bifrost
downloader through SIMPLEX_REGION; a resolved parent value does not probe again.
An untouched auto on a cached launch stays auto, so a later Bifrost download probes its own tarball.
Redirects stay on HTTPS and are limited to five hops.
Other arguments pass unchanged to localmodels stack; with no arguments it shows the help. Where the CLI
hints say python3 -m localmodels stack, use stack.sh here. apply still needs the full
confirmation ID the plan prints; the scripts never plan or install on their own.
Environment variables:
LOCALMODELS_KIT_HOME: kit cache directory, default~/.cache/simplex-localmodels/kits(on Windows%LOCALAPPDATA%\simplex-localmodels\kits).SIMPLEX_NPM_REGISTRY: replace both registry bases with a test registry or private mirror. Archive SHA256 and size pins still apply.SIMPLEX_REGION:globalusesregistry.npmjs.org;cnusesregistry.npmmirror.com;autoprobes both.LOCALMODELS_KIT_BASE_URL: legacy mirror layout serving the same pinned npm archives as<target>.tgz.
The Linger installer does not go through stack.sh; it calls the same kind of localmodels kit
directly and by convention pins the same version as here.
Run the pinned script without cloning the repository:
# global
curl -fsSL https://cdn.jsdelivr.net/npm/@simplexai/[email protected]/stack.sh | sh -s -- --region global --help
# cn
curl -fsSL https://registry.npmmirror.com/@simplexai/localmodels/0.1.0-dev.45/files/stack.sh | sh -s -- --region cn --help
irm https://cdn.jsdelivr.net/npm/@simplexai/[email protected]/stack.ps1 -OutFile stack.ps1
powershell -ExecutionPolicy Bypass -File .\stack.ps1 -Region global --help
# cn script URL: https://registry.npmmirror.com/@simplexai/localmodels/0.1.0-dev.45/files/stack.ps1
The localmodels release process publishes each version's platform kits, its patched Bifrost packages and the
platform-independent @simplexai/localmodels package holding both scripts and release.json. stack.sh, stack.ps1
and this section carry that release's pin; do not edit them by hand. The version pin only says which published CLI
runs; it does not state which platforms or GPUs are supported.
Download region: SIMPLEX_REGION and region.json
Linger and localmodels share one download region, so a computer in mainland China gets the China mirrors without first waiting for a foreign host to time out. The region only orders the sources of a download: no source is ever dropped, and the pinned SHA256, SHA512 or lockfile integrity still decides which bytes are used.
The installer resolves the region once per process, in this order:
SIMPLEX_REGION:cnorglobalforces that region;autoor unset does not. Any other value is an error.<LINGER_HOME>/runtime/region.jsonwhen it was resolved within the last 24 hours.- A probe: up to three rounds racing the first 1 MiB of the pinned pnpm
tarball from
registry.npmjs.organdcdn.npmmirror.com(4 seconds per round), stopping once one registry wins two rounds or leads clearly over a full window;cnwhen the China mirror wins. A probe that reaches neither usesglobaland is not saved.
{
"schema": "simplex.region/v1",
"region": "cn",
"resolved_at": "2026-11-18T08:00:00.000Z",
"method": "probe"
}
method is env, probe or fallback. When the preferred region fails or
downloads slowly with substantial work left and a source in the other region
proves faster and finishes the download, the file is rewritten with that
region and fallback, and later downloads start there (unless
SIMPLEX_REGION forces a region).
| Download | global first | cn first |
|---|---|---|
| Node.js runtime (desktop app) | nodejs.org |
cdn.npmmirror.com |
| pnpm, npm and package installs | registry.npmjs.org |
registry.npmmirror.com |
| Go toolchain | dl.google.com |
mirrors.aliyun.com |
Go modules (GOPROXY, unless set) |
proxy.golang.org |
goproxy.cn |
| localmodels kit | CloudFront, then npm | cdn.npmmirror.com where it has the kit |
| Voice model packages (node-services) | registry.npmjs.org |
registry.npmmirror.com |
A registry or GOPROXY the person configured still wins. The installer
passes the resolved region as SIMPLEX_REGION to every localmodels child
(stack, foundations, Harness) and to every native service, so none of them
probes again.