lerim up / down / logs¶
Docker container lifecycle commands for starting, stopping, and monitoring Lerim.
Overview¶
These host-only commands manage the Docker container that runs lerim serve (daemon + JSON API).
Host-only commands
These commands run on the host machine. They do not require a running Lerim server.
Syntax¶
Commands¶
lerim up¶
Start Lerim as a Docker service:
lerim up # start Lerim (pull GHCR image)
lerim up --build # build and recreate from the local Dockerfile
This reads ~/.lerim/config.toml, generates a docker-compose.yml in ~/.lerim/, and runs docker compose up -d.
By default the compose file references the pre-built GHCR image (ghcr.io/lerim-dev/lerim-cli) tagged with the current package version. Use --build to build from the local Dockerfile, tag it as lerim-lerim:local, and force-recreate the container.
After start, the CLI waits for GET /api/health to return 200 OK before reporting success.
lerim down¶
Stop the Docker container:
lerim logs¶
View local log entries from dated JSONL files under ~/.lerim/logs/YYYY/MM/DD/ (last 50 by default).
If no log file exists yet, the command prints an empty-state message and exits successfully.
lerim logs # show recent logs
lerim logs --follow # tail logs continuously
lerim logs --level error # filter by level
lerim logs --since 2h # entries from the last 2 hours
lerim logs --json # raw JSONL output
Parameters¶
Build from local Dockerfile instead of pulling the GHCR image.
Live tail: watch for new log lines and print as they appear.
Filter by log level (case-insensitive). E.g. error, warning, info.
Show entries from the last N hours/minutes/days. Format: 1h, 30m, 2d.
Output raw JSONL lines instead of formatted text.
Examples¶
# Start the service
lerim up
# Check it's running
lerim status
# View logs
lerim logs --follow
# Stop when done
lerim down
Notes¶
- The container runs
lerim servewhich provides the daemon loop and JSON API http://localhost:8765/api/healthis the local health endpointhttp://localhost:8765/serves a small local stub/diagnostic page- Docker restart policy is
"no"— the container does not auto-restart after reboots
Related commands¶
-
lerim serve
Run directly without Docker
-
lerim status
Check runtime state