Reference
Environment variables
The environment variables LoopCode reads — for CI sign-in, where data is kept, updates, the browser, language servers, installers and the terminal screen.
#Account and data
| Variable | Effect |
|---|
LOOPCODE_TOKEN | An access token to sign in with where nobody can sign in, such as CI |
LOOPCODE_HOME | LoopCode's home folder (default ~/.loopcode): settings, memory, skills, agents, plugins, logs and learned notes |
LOOPCODE_STATE | Where the CLI keeps its conversations and sign-in (default ~/.loopcode/cli). --state overrides it |
#Updates
| Variable | Effect |
|---|
LOOPCODE_NO_AUTOUPDATE=1 | Turn off the CLI's background updates. loopcode update still works |
#Browser
| Variable | Effect |
|---|
LOOPCODE_BROWSER_PATH | The Chrome or Chromium the CLI should drive |
LOOPCODE_BROWSER | headless or visible. By default the browser is visible, and headless in CI or on Linux without a display |
| Variable | Effect |
|---|
LOOPCODE_RG_PATH | The ripgrep binary to search with |
LOOPCODE_LSP_DOWNLOAD=0 | Don't download language servers; use only those installed |
LOOPCODE_IMAGE_PICKER | A command that prints an image path, used by /attach (for example an fzf pipeline) |
#Hooks
Set for every hook command:
| Variable | Value |
|---|
LOOPCODE_PROJECT_DIR | The project folder |
LOOPCODE_HOOK_EVENT | The event, such as PreToolUse |
Commands the agent runs in its terminals see TERM_PROGRAM=LoopCode and LOOPCODE_TERMINAL=1, so your scripts can tell.
#The terminal screen
| Variable | Effect |
|---|
LOOPCODE_NO_ANIMATION=1 | No animated banner at start |
LOOPCODE_TUI_DISABLE_KEYBOARD_ENHANCEMENT=1 | Don't use the enhanced keyboard protocol, if keys misbehave in your terminal |
#Installers
For the CLI installers (cli.sh, cli.ps1):
| Variable | Effect |
|---|
LOOPCODE_BIN_DIR | Where to put the loopcode command (default ~/.local/bin) |
LOOPCODE_NO_MODIFY_PATH=1 | Don't add it to your shell profile or PATH |
LOOPCODE_NO_LOGIN=1 | Don't start sign-in at the end |
LOOPCODE_NODE=bundled | Use LoopCode's own Node.js even when yours is new enough |
LOOPCODE_NODE_MIRROR | Download Node.js from a mirror of https://nodejs.org/dist |
LOOPCODE_UNINSTALL=1 | Windows: uninstall instead (macOS and Linux: sh -s -- --uninstall) |
For the desktop installers (mac.sh, and loopcode app install):
| Variable | Effect |
|---|
LOOPCODE_APP_DIR | macOS: install there instead of /Applications |
LOOPCODE_NO_OPEN=1 | Don't open LoopCode afterwards |