Configuration

Link keeps environment records on the computer that creates boxes and copies the environment files and service logs to the machine running them. These records let later commands find the setup associated with a box.

Environments (lnk env)

Environment records and temporary run specifications live under ~/.lnk/safe/envs/. Sensitive local records and specifications are written with mode 600.

Box records

~/.lnk/safe/envs/boxes/<box>.json records each cloud box made with an environment: its environment, complete file and cloud ID. Reset and preview commands use it to find the environment, and a root service's reset is allowed only on the corresponding dedicated box.

Copied files

On a box, ~/.lnk/safe/envs/envs/<name>/ contains the environment file and its named inputs and specifications. A run on this machine uses the corresponding local folder.

Prepared setup

~/.lnk/safe/envs/prepared/<name> stores the hash whose build stages completed on this machine or in its image. The preparation interface reuses those successful stages when the hash still matches.

Run specifications

~/.lnk/safe/envs/runs/<label>.toml holds the sandbox spec used by a stage while it runs. It is written on the box, or on this machine for a local run, and kept private to the runner.

Service logs

~/.lnk/safe/envs/logs/<name>-<service>.log holds a started box's service output. Read it when the process fails or its readiness check does not complete.

Service and image names

A created box runs each service as lnk-env-<name>-<service>.service under systemd or link.env.<name>.<service> under launchd. Images carry the lnk-hash value and the name <name>-<first 8 of the hash>.

Command environment

lnk help <command> lists the environment variables the command reads, as its variables.toml declares them. This reference describes those inputs independently of the files kept above.

LNK_JOB_OUT

A job receives the folder whose files are uploaded to its bucket when the caller selects --out. Write job results there when they must survive the job machine, rather than assuming every file on the machine is retained.

Isolated Test Inputs

LNK_TEST_JOB_GROUP selects the process group sampled by the job profiler. LNK_TEST_WORKERS_CONFIG selects a trusted stand-in worker configuration owned by the current user or root. Both are debug-build inputs and ignored by release builds, so they cannot replace production worker policy.