Loki Mode is an agent harness, orchestration layer, and Claude Code plugin developed by asklokesh. It is designed to introduce structured verification, review guardrails, and automated artifact validation directly into terminal-based AI workflows. In daily operations, Loki Mode operates either as a standalone CLI (`loki`) or as a native plugin integrated into Claude Code via the Model Context Protocol (MCP). It wraps coding and review tasks with specialized commands—such as `loki verify`, `loki spec-status`, and `loki grill`—that evaluate codebase modifications against specifications and generate structured evidence artifacts (including `evidence.json` and `drift-report.json`). What sets Loki Mode apart from standard unconstrained agent runners is its focus on defensive execution and council-based code reviewing. It enforces strict least-privilege read/inspect tool allowlists, a mutation-blocking denylist, and optional command safety guard hooks to prevent unauthorized shell executions and unintended file mutations during agent loops. Loki Mode is distributed under the Business Source License (BUSL-1.1) and is packaged for Python environments alongside Claude Code marketplace integration.
Tags: ai agent, cli, code assistant, coding agent, developer tools, OpenSource
/loki-verify, /loki-spec-status, /loki-grill) and marketplace distribution. - MCP server integration — Exposes an internal Model Context Protocol server over stdio via loki mcp --transport stdio for environment-agnostic tool dispatch. - Council review allowlist — Defaults to least-privilege inspection tools (LOKI_REVIEW_ALLOWLIST=1) with a strict mutation-blocking denylist to contain agent actions. - Evidence-based verification — Generates machine-readable verification artifacts including evidence.json, drift-report.json, and markdown grill reports without fabricating output. - Opt-in bash safety guard — Features a configurable shell execution hook (LOKI_GUARD=1) to intercept risky bash invocations during agent execution. - Codebase indexing and drift tracking — Indexes repository paths and evaluates project drift against defined specifications.loki verify and loki spec-status within CI or local terminal sessions to parse project state, compare implementation against specs, and generate structured evidence.json reports.LOKI_GUARD=1 to enforce opt-in execution boundaries around shell operations, preventing accidental destructive system changes.Loki Mode is tailored for developers and teams using Claude Code and terminal coding agents who require rigorous multi-agent review guardrails, evidence-based verification, and strict execution sandboxing. It is not intended for users seeking a standalone consumer GUI or a simple unmanaged prompt-response CLI.
bash # Add the marketplace and install the plugin claude /plugin marketplace add asklokesh/loki-mode /plugin install loki-mode@loki-mode For local CLI usage, clone the repository and run in a Python 3.12+ environment: bash git clone https://github.com/asklokesh/loki-mode.git cd loki-mode pip install -e .bash # Check available CLI commands loki --help # Run the MCP server over stdio loki mcp --transport stdio # (Optional) Enable the Bash safety guard export LOKI_GUARD=1bash # Run repository specification and verification checks loki verify # Check spec status and inspect generated drift reports loki spec-status cat drift-report.json # Run the grill command for in-depth review loki grillPart of CLI Coding Agents
Categories: AI Coding Agents, Code Assistants, Developer Tools