lmplayer guide
Overview
lmplayer is an open-source AI coding agent designed for unattended automation, scripted CLI pipelines, and single-user REST services. Derived from OpenCode (baseline 9f69463f1d), lmplayer replaces interactive-TUI-first defaults with non-interactive CLI execution, persisted background shell jobs, an internal five-field cron scheduler, durable-memory organize compaction, and deterministic file-based permissions.
Non-interactive CLI, FIFO service gate, and configuration
Running lmplayer "your prompt" or piping stdin executes immediately without opening a full-screen TUI (use lmplayer tui when an interactive terminal UI is wanted). In service mode (lmplayer serve --hostname 127.0.0.1 --port 4096), a process-wide FIFO execution gate serializes turn execution across sessions while keeping read-only health, metrics, and control endpoints responsive and allowing in-process subagents to bypass the gate.
Project configuration discovery is strictly bounded to the starting directory and its immediate .opencode directory rather than walking parent directories, preventing accidental inheritance from outer workspaces. Application storage uses XDG directories named lmplayer (~/.config/lmplayer, ~/.local/share/lmplayer).
Background shell jobs, internal cron, and durable-memory compaction
Three runtime capabilities support long-running autonomous sessions:
- Background shell execution: passing background: true to the bash tool spawns the command asynchronously, persists a job record, returns a job ID immediately, and wakes the session with a follow-up turn upon completion. The job tool exposes list, get, output, and stop actions.
- Session-scoped internal cron: the cron tool creates, lists, and deletes one-shot or recurring five-field local-time cron schedules (expiring after seven days) that inject scheduled prompts through the FIFO execution gate without touching the host OS crontab.
- Durable-memory organize compaction: the default organize mode rewrites a session-owned durable-memory/index.md Markdown file during context compaction and injects that organized Markdown memory into subsequent turns (traditional summary mode remains selectable via compaction.mode: "summary").
Positive tool provisioning, structured Linux tools, and local Ollama
Agent profiles can restrict tool definitions and filesystem scope:
- Positive provisioning: profiles declare a provision list naming the exact tools exposed to the model. The built-in lean profile uses a concise system prompt and a bash-only toolset.
- Structured Linux tools and secured profile: dedicated tools for git, gh, rg, find, tar, and unzip allow operation-specific permission rules and working-directory confinement via tool_workdir.extra_roots (set to [] to confine to the workspace).
- Zero-config Ollama routing: model selectors of the form ollama/<model> connect to OLLAMA_HOST (or per-model @host) without an API key. Ollama models default to chat-only; appending +tools (for example ollama/qwen2.5+tools) explicitly enables tool calling.