Configuration

The files and environment variables every lnk program reads, and those of the core and its installer.

Every lnk program

Each program reads its declared environment inputs. Command help covers arguments and flags. Use lnk variable list to browse command variable names, the commands that declare them and their descriptions. The list comes from the core and this build's plugin registry and never reads current values. The environment index also covers libraries, internal overrides and tests.

List a command's variables

Pass command words to narrow the list. Program-wide and ancestor command inputs remain included, alongside the selected command's own declarations. An unknown command is refused. Use --json for an array of entries with name, command and about fields.

lnk variable list agent start

~/.lnk/update.json (600)

The latest release's version as lnk upgrade --check last found it, when it checked, and when a notice last said so. Deleted, the next lnk up checks again.

~/.lnk/offered.toml (600)

What goes with a plugin that you refused (refused) or were told of without a terminal (said): neither is offered again. Deleted, each is offered again.

The core (lnk)

The machine's own settings file, which the core keeps beside its other files in ~/.lnk/, readable only by you.

~/.lnk/settings.toml (600)

This machine's settings: place, where the Link folder is when it isn't ~/Link (relative to your home folder), and id, the ID in its marker. Also noted: programs beside lnk that lnk upgrade has said once how to keep updated.

[plugins.<name>]

Each plugin added from outside Link (lnk plugin add --url <url>), in settings.toml: its source, the repository, and the key its releases must be signed with.

install.sh

The installer reads its environment, as its own header lists it (install.sh).

--source

From a checkout, sh core/cli/install.sh --source installs only the CLI through Cargo. An optional path selects another public workspace. Without a path it uses the workspace containing the script. This mode needs Rust and Cargo, honors Cargo's installation root and uses the workspace's target folder. It bypasses the release settings below.

Source plugin installation

The installed CLI accepts repeated lnk up --source <path> arguments, including workspaces containing only plugins. It excludes core and fixture packages. Without selection flags it installs all supported plugins, using Cargo's installation root and the first workspace's target directory. It installs only plugin binary targets and does not restart agents.

Source plugin selection

Separate names with commas or repeat --plugin <name> on lnk up --source <path> to select executable names without lnk-. Every workspace and plugin name is validated before installation. Duplicate roots, conflicting plugin names, unknown selections and explicitly selected unsupported platforms are refused.

Source plugin freshness

With lnk up --source <path> --stale, only installed plugins are checked. Cargo builds each selected binary in release mode with the locked dependencies. SHA-256 comparison of that artifact and the installed executable skips identical binaries. Changed binaries are reinstalled through Cargo with --root pointing at their existing installation's bin parent. No separate freshness database is kept. A failed build preserves that plugin's installation.

Source package platforms

A package can restrict source installation with os and arch string arrays in [package.metadata.link.source] in its Cargo manifest. Values use Rust host names such as linux, macos, x86_64 and aarch64. An absent or empty array permits all values for that field. The installer checks both fields before invoking Cargo and names skipped packages. These declarations select source packages, not runtime qualification.

LNK_INSTALL_DIR

Where to put lnk, the folder its program is installed in. Left out, ~/.lnk/bin.

LNK_VERSION

A specific version such as 0.14.0. Left out, the latest. It is also the way past a latest release older than the server's, which the installer refuses while one is being published.

LNK_INSECURE=1

Installs even without ssh-keygen, with no signature check: HTTPS and the checksum only. Without it, a machine lacking OpenSSH is refused.

LNK_RELEASES_URL

Where the releases are. Left out, https://github.com/so-local/link-releases/releases.