Lore

CLI reference

Commands, flags, environment variables, and the config file of @loremem/cli.

Look up every npx @loremem/cli command, flag, and environment variable, plus the files the CLI writes. For a walkthrough, start with Install with Docker.

Usage

npx @loremem/cli [install|update|uninstall|status] [options]

Running npx @loremem/cli with no arguments starts the interactive installer, which is the same as install.

Commands

CommandWhat it does
install (alias connect)Connect this machine to a server, deploy a server with Docker, and install runtime integrations. This is the default command.
updateUpdate the installed integrations. For a Docker-managed server, also pull the new image and restart the stack.
uninstallRemove runtime integrations. Add --purge to also remove config and local Docker data.
statusShow the saved connection, the detected runtimes, and each integration's state.

Flags

FlagApplies toEffect
--base-url URLinstall, updateConnect to an existing server or Loremem Cloud. Client only: Docker isn't touched. Can't be combined with --docker.
--dockerinstallDeploy a Lore server on this machine with Docker Compose. Clears the saved token. Can't be combined with --base-url or --skip-docker.
--api-token TOKENinstall, updateToken for the server, saved to config.json. It can end up in your shell history.
--channels LISTinstall, update, uninstallComma-separated runtime IDs (see Runtime IDs). Defaults: detected runtimes for install, installed or partial integrations for update, and all seven runtimes for uninstall.
--skip-dockerinstall, updateKeep the saved server and leave Docker alone.
--forceinstall, updateReinstall even when the release version hasn't changed.
--preinstall, updateUse the newest prerelease. Images use the pre-latest tag. Can't be combined with --dev.
--devinstall, updateUse the dev build. Images use the dev-latest tag.
--lang en|zhAllLanguage for prompts and messages. Overrides LORE_INSTALL_LANG.
--allow-insecure-httpinstall, updateAllow a token over plain HTTP to a non-loopback host, for this run only. Never saved. -y doesn't imply it.
--purgeuninstallAlso remove ~/.lore/config.json and ~/.lore/docker. Stop the stack first. See Update and uninstall.
-y, --yesinstall, uninstallSkip prompts. For install, unset options take defaults, and the server must come from --base-url, --docker, or a saved config.
-h, --helpAllPrint usage and exit.

--docker clears any saved token, and it ignores --api-token. Passing --api-token may leave the token in your shell history, so use your normal secret handling.

Environment variables

VariableDefaultEffect
LORE_HOME~/.loreDirectory for config.json, runtime files, and the docker/ stack directory.
LORE_INSTALL_LANGenzh selects Chinese. Any other value selects English. Setting it also skips the language question.
LORE_SAAS_BASE_URLhttps://api.loremem.comLoremem Cloud API base used by Connect Loremem SaaS. Set it only to point the CLI at a different Cloud API.
LORE_CODEX_INSTALL_USER_HOOKSUnsetSet to 1 to also write Lore's legacy hook entries into ~/.codex/hooks.json. Use it only for older Codex builds that need user-level hooks.
LORE_OPENCODE_ALLOW_MCPUnsetSet to 1 or true to keep Lore's generic /api/mcp MCP entries next to the OpenCode plugin. By default the plugin removes its own duplicate entries. The plugin reads it when OpenCode starts.
LORE_SKILLS_ENABLEDSet by the installer1 or 0. The installer sets it from the server's Skills capability. 0 turns Skills off in the plugins. Skills stay off unless the server advertises them.

Files

~/.lore/config.json is written with file mode 0600. Its fields:

FieldMeaning
base_urlServer origin, without a trailing slash
api_tokenServer token. Absent when none is set.
installed_versionRelease the integrations were installed from. Written only after every selected runtime succeeds.
docker_managedtrue when the CLI manages the local Docker stack. false when you manage it.
server_profileThe server's base URL, edition, and capabilities (such as Skills), recorded by install and update

A saved token is reused only while the server URL stays the same. Changing the URL without --api-token clears the token.

Other files:

  • ~/.lore/docker/: the Compose file and .env for a local stack the CLI manages.
  • ~/.lore/<runtime>/: the files for each runtime, for example ~/.lore/hermes/lore_memory.

Runtime IDs

IDRuntimeHost CLI the installer uses
claudecodeClaude Codeclaude
codexCodexcodex
piPipi
openclawOpenClawopenclaw
hermesHermesNone
opencodeOpenCodeopencode
zcodeZCodezcode
dshDeepSeek Harnessdsh, or an existing ~/.dsh
  • A runtime whose host CLI isn't installed is reported as skipped. It isn't reported as configured. dsh also counts as present when ~/.dsh exists, because dsh is often run through npx @deepseek-ai/dsh with no global binary.

  • Hermes doesn't need its CLI to install. It's selected by default only when a hermes command is on your PATH; otherwise pass --channels hermes. Link the files yourself:

    ln -s ~/.lore/hermes/lore_memory ~/.hermes/skills/lore_memory

Interactive and non-interactive use

CommandOn a terminalWith -y, or without a terminal
installOpens the installer, with flags preselecting its answersRuns from flags. With no flags and no terminal, it fails with exit code 2.
updateRuns from flags and asks nothingSame
uninstallAsks Uninstall these channels? [y/N]Doesn't ask
statusPrints the statusSame

Insecure HTTP

  • The CLI sends a token over HTTPS. Over plain HTTP, it sends a token only to loopback hosts: localhost, 127.0.0.1, and ::1.
  • For any other host over plain HTTP, the CLI refuses to send the token unless you pass --allow-insecure-http for that run.
  • The flag is never saved, and -y doesn't imply it. The interactive installer asks a separate yes-or-no question instead, and the default answer is No.
  • Without a token, this rule doesn't apply.

Exit codes

CodeMeaning
0Success. For install, skipped runtimes don't fail the run when at least one runtime installs.
1Failure. Examples: a runtime failed; for update, the release couldn't be resolved or a selected runtime was skipped; the Docker stack didn't pass its health check within 3 minutes; or you declined the uninstall.
2Usage error. Examples: an unknown flag, a missing server with -y, no detected runtimes with -y, or no flags without a terminal.
130You cancelled an interactive prompt, for example with Ctrl+C.

Examples

# Interactive installer
npx @loremem/cli

# Deploy a local server with Docker, without prompts
npx @loremem/cli install -y --docker

# Connect this machine to Loremem Cloud
npx @loremem/cli install --base-url https://api.loremem.com --api-token lm_your_token

# Connect to a LAN server over plain HTTP, for this run only
npx @loremem/cli install -y --base-url http://192.168.1.10:18901 --api-token lm_your_token --allow-insecure-http

# Update Claude Code and Codex from the prerelease channel
npx @loremem/cli update --pre --channels claudecode,codex

# Enable the legacy Codex user hooks while connecting Codex
LORE_CODEX_INSTALL_USER_HOOKS=1 npx @loremem/cli install -y --base-url https://api.loremem.com --api-token lm_your_token --channels codex

# Remove two runtimes without a prompt
npx @loremem/cli uninstall --channels claudecode,pi -y

# Remove everything, including config and local Docker data
npx @loremem/cli uninstall --purge -y