Environment variables

The variables wsp reads that are yours to set, and the ones a thread's turn carries. A switch also works as a line of the .env beside the state file. The desktop app's host reads its switches from that file alone.

VariableWhat it does
WSP_HOMEThe folder wsp keeps its things in, in place of ~/.wsp: the state file a line works on is state.json there, unless --state names another. Unset or empty, it is ~/.wsp.
WSP_HOSTThe host every line of this shell runs against, by the name wsp hosts lists it under, as --host names one for a single line. Unset or empty, a line runs against your account's one host, or the one on this computer.
WSP_UPDATE_CHECKThe switch that stops the host asking GitHub for the newest release: 0 here, or on a line of the .env beside the state file, which is the one place the desktop app's host reads it from, since that app's environment is the login's and not a shell's.
WSP_ANALYTICSThe switch that stops the host sending usage counts to PostHog whatever Settings > Privacy says: 0 here, or on a line of the .env beside the state file, read the way the update check's is.
WSP_STATE_STOREThe switch that keeps a host's state in the JSON document rather than the SQLite database: json here, or on a line of the .env beside the state file, for the one release the JSON store is kept as a way back.
WSP_HOST_URLThe address a machine dials this host at, in the launch environment of every turn on a workspace whose agents may spawn: the host's own reachable address, which is not loopback, since the turn runs on another computer.
WSP_HOST_TOKENThe token that turn presents there: a device of this host's, scoped to the thread, minted at the launch and taken away when the turn's process exits. It never reaches a config file or an argument, only the environment.
WSP_HOST_KEYThe fingerprint of the key that host proves, beside the two above: the turn pins it before it sends the token, so a relay that carries the bytes or names another host at that address gets nothing. A launch that carries the address and the token without it is refused rather than dialled, since nothing there says which host it is.
WSP_TURNThe variable a turn's launch environment carries so wsp run inside that turn can say which thread it is: one turn's token, minted by the host at the launch and forgotten when the turn's process exits. The host is the only thing that maps it to a thread, so a caller cannot name a thread it did not come from.
Last updated