Skip to main content

Commands

LDM OS is managed through the ldm command. All commands support --dry-run (preview changes) and --json (machine-readable output).

Command Reference

ldm init

Creates the ~/.ldm/ folder and writes version.json. Sets up agents/, extensions/, memory/, logs/, bin/, hooks/, state/, sessions/, shared/. Installs the startup hook and process monitor. Safe to run multiple times.

ldm install

The one installer. Handles everything: CLI tools, connections, AI app integrations, and background tools.
How it works:
  1. Self-update. Checks npm for a newer version of itself. Updates first, then re-runs with new code.
  2. System scan. Reads your installed tools, checks AI app configurations, and finds CLI tools on PATH.
  3. Catalog matching. Compares your installed tools against the catalog. Supports partial name matching.
  4. Version check. Checks every installed tool against npm for newer versions.
  5. Toolbox detection. For bundled tools (one package with multiple sub-tools), reports updates under the parent name and updates all sub-tools together.
  6. Cleanup. Removes duplicate entries and stale references from your tool list.
  7. Private repo redirect. If given a private repo name, auto-redirects to the public version.
  8. Staging. Downloads to ~/.ldm/tmp/ (not system temp). Cleaned up after install.

ldm doctor

Health check. Shows all your installed tools, connections, hooks, and AI configurations. Reports anything that needs attention. With --fix:
  • Removes stale entries (registered but not deployed)
  • Removes broken hook paths from settings files

ldm worktree

Centralized worktree management for developers. Creates worktrees in _worktrees/<repo>--<branch>/ instead of as repo siblings.

Debug Mode

Set LDM_DEBUG=1 to enable debug output. The logger writes timestamped context to stderr.