Skip to content
Version 1.0.0

CLI commands

The commands, arguments and options of lemni.

Labels and descriptions are reproduced as lemni --help displays them, so in English. Translating them would make this page say something other than what the reader sees in their terminal.

Called on its own, lemni opens an interactive session. With a prompt, it passes it along.

Fenêtre de terminal
lemni "explique-moi ce fichier"
OptionEffect
-p, --printPrint response and exit (useful for pipes)
--format <format>Output format for headless mode (json). Only works with -p/—print flag.
--silentStrip tags and excess whitespace from output. Only works with -p/—print flag.
--resumeResume from last session
--fork <sessionId>Fork from an existing session ID

They apply to the interactive session and to the subcommands that share them.

OptionEffect
--config <path>Configuration file for the assistant (can be a file path or registry slug) No effect here: a package identifier does not resolve and stops the session naming its cause; a file path does.
--org <slug>Organization slug to use for this session (supported only in headless mode) No effect here: the registry is not operated, so no slug resolves.
--readonlyStart in plan mode (read-only tools)
--autoStart in auto mode (all tools allowed)
--verboseEnable verbose logging
--beta-status-toolEnable beta status tool
--rule <rule>Add a rule (can be a file path, registry slug, or string content). Can be specified multiple times. No effect here: a package identifier does not resolve and stops the session naming its cause; a file path or text does.
--mcp <slug>Add an MCP server from the registry (slug in format ‘owner/package’). Can be specified multiple times. No effect here: a package identifier does not resolve and stops the session naming its cause; a YAML file declaring the connector, or its address, does.
--model <name>Start this session on the named model, as written in your configuration (its readable name or its model id, case-insensitive). Refuses to start if no configured model answers to that name.
--prompt <prompt>Add to the initial user message (can be a file path, registry slug, or string content). Can be specified multiple times. No effect here: a package identifier does not resolve and stops the session naming its cause; a file path or text does.
--allow <tool>Allow specified tool (overrides default policies). Can be specified multiple times.
--ask <tool>Ask for permission before using specified tool (overrides default policies). Can be specified multiple times.
--exclude <tool>Exclude specified tool from use (overrides default policies). Can be specified multiple times.
--agent <agent>Load an agent: the name of a discovered agent (.lemniscate/agents/*.md in the project or ~/.lemniscate/agents/), a path to a markdown agent file, or a registry slug (‘owner/package’) No effect here: a package identifier does not resolve and stops the session naming its cause; a path to a Markdown file, or the name of a discovered agent, does.

Authenticate with Lemniscate

Log out from Lemniscate

List recent chat sessions and select one to resume

OptionEffect
--jsonOutput in JSON format

Open a remote session; —url joins a lemni serve you run

OptionEffect
--url <url>Connect directly to the specified URL instead of creating a new remote environment
--id <id>Connect to an existing remote agent by id and establish a tunnel No effect here: it asks a central service for the tunnel; an air-gapped installation refuses, naming what remains possible (lemni remote —url).
--idempotency-key <key>Idempotency key for session management - allows resuming existing sessions
-s, --startCreate remote environment and print connection details without starting TUI
--branch <branch>Specify the git branch name to use in the remote environment
--repo <url>Specify the repository URL to use in the remote environment

Hidden command. It does not appear in lemni --help.

Start an HTTP server with /state and /message endpoints

OptionEffect
--timeout <seconds>Inactivity timeout in seconds (default: 300)
--port <port>Port to run the server on (default: 8000)
--host <host>Interface to bind to (default: 127.0.0.1, loopback only)
--id <storageId>Upload session snapshots to Lemniscate-managed storage using the provided identifier No effect here: depositing with a central service is not part of the air-gapped artifact, which refuses and names its cause; the flag keeps its other effect, it names the session. History and diff are still served by this server, on GET /state and GET /diff.
--beta-upload-artifact-toolEnable beta UploadArtifact tool for uploading screenshots, videos, and logs No effect here: depositing a file with a central service to read it back elsewhere is not part of the air-gapped artifact: the tool is not offered to the model and the command says why at startup. The full contents of the file (screenshot, video, log) do not leave the workstation, and no artifact view is served here.

Test remote TUI mode with a local server

OptionEffect
--url <url>Server URL (default: http://localhost:8000)

Orchestrate a complete PR workflow: branch, implement, push, create PR, self-review, CI loop. The agent always has full access to file tools (read, write, edit): that is implicit in calling this command. —yes controls workflow confirmations (push, PR creation), not file access.

OptionEffect
--yesSkip workflow confirmations (push, PR creation)
--max-retries <n>Max CI fix attempts (default: 5)
--guidelines <path>Path to Markdown guidelines file for self-review
--base-branch <ref>Base branch (default: main)
--dry-runShow execution plan without running
--config <path>Config file for the assistant No effect here: a package identifier does not resolve and stops the session naming its cause; a file path does.

AI-designed onboarding course for a zone of this repository. Without subcommand: follow the course conversationally (resumes where you were). The model designs the course from the repo and its sources of why; every claim carries its provenance (sourced with citations, or plain code reading).

OptionEffect
--config <path>Config file for the assistant No effect here: a package identifier does not resolve and stops the session naming its cause; a file path does.

Review the AI-designed course as the expert: pending learner questions first (answers are woven back into the course), then draft lessons one by one: validate, correct (signed block), or reject with a reason. Never a blank page.

CI guard: re-read every code anchor against today’s code. Lessons whose code moved are reopened as ‘to review’ (never declared wrong). Non-zero exit when something was reopened: a review signal, not a build failure.

Design (or redesign) the onboarding course of a zone. Shows first where the why of this repo lives (files read, evidence found, verification act), then lets the model design. Output is versionable YAML.

OptionEffect
--label <label>Human label of the zone (default: first path)
--sortie <file>Output file (default: .lemniscate/onboarding//cours.yaml)
--config <path>Config file for the assistant No effect here: a package identifier does not resolve and stops the session naming its cause; a file path does.

Show the organization policy in force: every governed setting with its value and origin, where the policy came from, and the last refused read. —json prints the machine-readable report (same content).

OptionEffect
--jsonPrint the report as JSON

Write a diagnostic report on this machine and say where it is. Nothing is sent: read the folder, then forward it yourself if you decide to.

Verify a signed release bundle offline before installing it. Refuses (exit 1) on a bad signature, a tampered or missing file, or a rolled-back version.

OptionEffect
--key <path>Sovereign public key (PEM); defaults to the key shipped with the product
--current <version>The installed version, to refuse a rollback

Replay the record of what the agent did on this workstation, and check that nobody touched it since. With no session, lists every session journal on this machine with its chain verdict. —json prints the stored lines untouched, for a log analysis tool. —purges shows what the retention removed, and the hash of each removed journal. Exits 2 when a chain is broken, so a script can act on it.

OptionEffect
--jsonPrint the stored journal lines untouched
--purgesShow the purge ledger instead of the journals

Render a map of the repository: modules and their dependencies. Purely static: no model, no network call. Output is Mermaid on stdout by default. —cycles and —check-layers exit non-zero when they find something, so the map can be used in CI as an architecture guardrail.

OptionEffect
--level <level>Node granularity: package | dir | file | symbol (default: dir)
--focus <nodeId>Center the view on a file or symbol (V2)
--depth <n>Neighborhood depth around —focus (default: 1)
--cyclesList import cycles only; exit 1 if any
--check-layersList layer violations only; exit 1 if any
--prMap what the current branch changed (V7)
--base-ref <ref>Base ref for —pr (default: upstream branch, else origin’s default branch)
--format <format>Output format: mermaid | json (default: mermaid)
--max-nodes <n>Maximum number of visible nodes (default: 15)