Install the CLI as a development dependency:
engram init
Creates .engram/config.json and adds .engram/config.json plus .engram/data/ to the repository’s .gitignore.
Running init again preserves the existing token and project identity.
With --framework langgraph, Engram also creates engram.config.json, a
preserved engram.executor.mjs skeleton, regressions/, and a package-manager
specific GitHub Actions workflow. Existing files are never overwritten.
The setup scan detects npm, pnpm, yarn, or bun; checks whether the SDK and a
matching Mem0 or LangGraph adapter are installed; reports OpenAI Agents when
present; and confirms that local capture files are ignored.
engram demo
Run the complete Capture → Diagnose → Replay → Test walkthrough:
Use --no-open to keep the browser closed. --no-start seeds an already
running Studio, which is useful in automated tests. When the default port
belongs to another local service or Engram project, the demo automatically
starts on the next available port. Pass --port to require a specific port.
engram dev
Starts Studio at http://localhost:3100/?mode=incidents by default:
When engram.config.json declares an executor, dev loads it automatically.
--executor remains available as an explicit override:
The CLI loads the module’s default MemoryReplayExecutor export, starts an
authenticated loopback server, and passes its URL and bearer token to Studio as
server-only environment variables. The browser never receives the token or
imports the executor module.
An executor must construct isolated checkpoint and memory-store runtimes. Never
connect a replay executor directly to a mutable production Store or allow live
side effects unless its manifest and implementation explicitly support that
mode.
engram env
Use this when a process manager needs the capture values without engram run:
The output contains only ENGRAM_URL, ENGRAM_TOKEN, and ENGRAM_PROJECT_ID.
engram run
Everything after -- is executed as the agent command:
The child process inherits its normal environment plus the Engram capture
values. After it exits, the CLI finds the newly captured trace and prints a
direct Studio URL. --expected also prefills expected answer evidence and opens
the incident automatically when Studio loads the URL.
engram doctor
In a scaffolded project, doctor validates the configured framework and executor
manifest, rejects an executor whose default side-effect mode is execute,
checks replay capabilities and captured checkpoint metadata, and probes both
Studio and its local executor bridge. A generated executor still containing the
scaffold marker is reported as unfinished.
Regression output
engram test supports human-readable, JSON, and GitHub Actions output:
Omit the artifact and executor to run every *.engram-test.json under the paths
declared in engram.config.json through that project’s configured executor:
Failed findings include the expected value and the observed retrieval IDs,
context count, or answer. GitHub mode emits error annotations for failed
assertions while the JSON report remains available as a build artifact.