Install lnk
Get lnk from a release, from source with cargo, or straight from a
build, and switch between them without losing your agents or files.
Pick one and keep to it. lnk runs its plugins (lnk-harness,
lnk-tunnel, ...) from its own folder first and then the PATH, so two
installs on one PATH mix versions.
| Way | lnk and its plugins live in | Plugins come from | Update with |
|---|---|---|---|
| The script | ~/.local/bin | lnk up, lnk plugin add (signed release) | lnk upgrade |
| Cargo | ~/.cargo/bin | cargo install, one per plugin | cargo install again |
| No install | target/debug | cargo build builds them all | cargo build |
The script (a release)
curl -fsSL https://local.link/install.sh | sh
lnk up # asks which parts; installs their plugins
lnk upgrade # later: lnk and its plugins, to the latest releaseCargo (from source)
From a checkout, the core and every plugin:
cargo install --path src/local/cli
for p in src/local/plugins/*/; do
cargo install --path "$p"
done
# Link Harness, and Link's tools (memory, scheduler), from their folders beside link-core
cargo install --path ../link-harness
cargo install --path ../link-tools/memory
cargo install --path ../link-tools/schedulerWithout a checkout, from a branch (dev is everything merged but not
released):
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo install --git https://github.com/woodpav/link --branch dev \
link-cli link-plugin-sandbox link-plugin-harness link-plugin-link-harness link-plugin-link-memory link-plugin-link-scheduler \
link-plugin-telegram link-plugin-slack link-plugin-discord link-plugin-whatsapp link-plugin-signal \
link-plugin-models link-plugin-accounts link-plugin-tunnel link-plugin-bucket link-plugin-cloud link-plugin-box \
link-plugin-vpn link-plugin-measure link-plugin-aws link-plugin-gcpFor only some parts, install link-cli and these:
| Part | Plugins |
|---|---|
| agents | sandbox, harness, link-harness, measure (and the channels) |
| memory | link-memory, models |
| models | models |
| tunnels | accounts, tunnel |
| buckets | bucket |
| boxes | cloud, accounts, box, vpn (and aws, gcp) |
OpenClaw's, Hermes's and DeepSeek Harness's adapters build from their
folders beside link-core the same way (cargo install --path ../link-openclaw, ../link-hermes, ../link-deepseek), and a harness
from outside Link from its own checkout (cargo install --path .),
which otherwise comes from its releases with lnk plugin add <its URL>.
With a cargo install, add plugins with cargo install, never with lnk plugin add or lnk up. Work branches keep the last released version, so
those download that version's released plugins next to your source-built
lnk, and so does the "Install it?" offer of a command whose plugin is
missing. Don't run lnk upgrade either, because it replaces the
programs in ~/.cargo/bin with a release's.
No install (target/debug)
This is the way to work on Local Link, and it leaves nothing to remove.
cargo build
# Link Harness and Link's tools, built next to it
cargo build --manifest-path ../link-harness/Cargo.toml --target-dir target
cargo build --manifest-path ../link-tools/Cargo.toml --target-dir target
./target/debug/lnk agent start # runs the plugins built next to itA lnk built from source never installs a released plugin of Link's
tools on its own. Without lnk-link-scheduler built next to it, an
agent starts without its scheduler and says so.
Switch between them
Your agents, settings and files (~/.config/lnk, ~/Link) are shared by
every install, so switching loses nothing. lnk uninstall --yes stops
your agents and removes only the programs. Start the agents again with
the new install, because a running agent's service points at the old
one's programs.
Script to cargo:
lnk uninstall --yes # removes ~/.local/bin/lnk and its plugins
# the cargo install above
lnk agent startCargo to the script:
lnk uninstall --yes # prints the `cargo uninstall ...` line: run it
curl -fsSL https://local.link/install.sh | sh
lnk up
lnk agent startCheck it worked:
# one line: the install you meant
which -a lnk
lnk plugin list # its plugins
lnk --version # its version, where it runs from, and any other lnk on the PATHWith two on the PATH, every lnk command in a terminal starts with a
note naming both.
Troubleshooting
| Symptom | Fix |
|---|---|
zsh passes a pasted # note to the command as arguments | lnk ignores it. For other commands, setopt interactive_comments in ~/.zshrc. |
which -a lnk shows two, or lnk notes another on your PATH | Uninstall one (above), or put the one you want first on the PATH. |
| A command says its plugin isn't installed | Script: lnk plugin add <plugin>. Cargo: the cargo install --path it names, in link-core. |
lnk plugin add says there's no signed release of this version | Your lnk is from source: install the plugin with cargo. |
| "The plugin at ... isn't in lnk's folder" | It's from the other install: remove it the way it was installed. |
| Agents fail to start after switching | lnk agent start again, from the new install. |
Install options (LNK_INSTALL_DIR, LNK_VERSION, ...):
docs/en/CONFIGURATION.md.
