Your code is never stored. GDPR-compliant processing with immediate data deletion.
View our security standardsLurus Code – CLI
The Lurus Code CLI is invoked with the `lurus` command and provides a complete AI-powered development workflow directly in your terminal.
npm install -g @scramble-cloud/lurus-code-cli Installation & Basics
Install the CLI globally via npm and get started in seconds.
npm install -g @scramble-cloud/lurus-code-cli lurus [command] [options] Without a command: starts interactive chat
Configuration Files
~/.lurus/auth.json Authentication data (JWT / API key) ~/.lurus/settings.json Global settings (model, MCP servers) ./.lurus/settings.json Project-specific settings LURUS.md Project context for the AI agent .lurus/rules/*.md Project rules .lurus/commands/*.md Custom slash commands Enterprise Proxy Support
Lurus Code respects standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables for CLI-owned network requests, including streaming and SSE responses.
Environment variables
Set these variables in the shell before starting the CLI. NO_PROXY is especially useful for local development and internal hosts that should bypass the corporate proxy.
HTTPS_PROXY Proxy URL for HTTPS requests to the Lurus API and other CLI-owned HTTPS calls. HTTP_PROXY Proxy URL for HTTP requests. NO_PROXY Comma-separated hosts that bypass the proxy, for example localhost,127.0.0.1,::1,.company.local. NODE_EXTRA_CA_CERTS Path to the corporate root CA certificate used for TLS inspection. Examples
export HTTPS_PROXY=http://proxy.company.com:8080 export HTTP_PROXY=http://proxy.company.com:8080 export NO_PROXY=localhost,127.0.0.1,::1,.company.local
export HTTPS_PROXY=http://user:pass@proxy.company.com:8080 # URL-encode special characters in user names and passwords
export NODE_EXTRA_CA_CERTS=/path/to/corporate-root-ca.pem lurus doctor
lurus doctor lurus status # Inside chat: /doctor /status
Diagnostics
lurus doctor can be run without logging in and uses the same fetch and CLI network path as the runtime. /doctor inside chat shows the same diagnostics plus session information.
- ✓
lurus doctortests API reachability through the configured proxy and custom CA settings. - ✓
/doctoradds active session details such as model, mode and session ID. - ✓
lurus statusand/statusshow configured proxy status, but without a network test they do not guarantee connectivity.
Not supported
Security notes
- ! Proxy credentials can be included in the proxy URL. URL-encode special characters and avoid storing credentials in shell history or scripts.
- ! If your organization performs TLS inspection, set
NODE_EXTRA_CA_CERTSbefore starting the CLI. Node.js loads this file during process startup.
Authentication
Register, log in, and manage your Lurus Code account.
register
Creates a new Lurus Code account via a secure browser-based device flow.
lurus register How it works
- 1 The CLI sends a request to
/auth/device/codeand receives a temporary device code. - 2 Your browser opens automatically on the registration page.
- 3 A short user code (e.g.
ABC-123) appears in the terminal. - 4 After completing registration in the browser, enter the code.
- 5 The CLI polls
/auth/device/tokenuntil confirmed, then saves JWT tokens locally.
ℹ No browser available? The URL is shown manually in the terminal.
ℹ The code expires after a few minutes (configurable via backend).
login
Authenticates with an existing Lurus Code account. Supports three different methods.
lurus login [options] Options
(none) Browser-based device flow (default) --api-key Login with API key (no browser required) --email Login with email address and password ℹ Stored in: ~/.lurus/auth.json
Methods
Method 1 – Browser Flow (default)
lurus login Opens browser → enter one-time code → done
Method 2 – Email & Password
lurus login --email Method 3 – API Key
lurus login --api-key status
Displays the current authentication status and account information.
lurus status How it works
- 1 Reads local auth data from
~/.lurus/auth.json. - 2 Validates the session via GET
/auth/profile. - 3 Outputs name, email, plan, auth type, and API URL.
Output Fields
Chat & Interaction
Start an interactive session or send a single prompt. chat is the default command.
chat
lurus chat [prompt...] [options] lurus [prompt...] # identical – chat is the default Starts an interactive chat session with the AI agent, or sends a single prompt and exits. chat is the default command — it also runs without being explicitly specified.
Options
--model <model> -m Choose AI model (e.g. sonnet, opus, haiku) --prompt <text> -p Send a single prompt and exit --continue -c Resume the last session for this project --resume <id> -r Resume a specific session by ID --pipe — JSON events on stdout, permission answers from stdin (IDE integration) --output-format <format> — Output format: text (default), stream-json, json --add-dir <dirs...> — Add additional directories to context --from-pr <number> — Load PR diff as initial context --json-schema <path> — JSON schema for validated structured output --permission-mode <mode> — Permission mode: default, acceptAllEdits, dangerouslySkipAllPermissions --thinking <mode> — Thinking mode: on, adaptive, off --effort <level> — Reasoning effort: minimal, low, medium, high, xhigh, max --max-mode <state> — Max context mode: on, off --mode <mode> — Interaction mode: agent, ask, plan --debug — Enable verbose debug output Examples
lurus chat Start interactive session
lurus chat -p "Explain the architecture of this project" Send single prompt (no interactive session)
lurus chat -m opus Start with a specific model
lurus chat --continue Resume last session
lurus chat --resume abc123def456 Resume specific session by ID
lurus chat --from-pr 42 Load PR diff as context (requires git or gh CLI)
lurus chat -p "Write tests for auth.service.ts" --permission-mode dangerouslySkipAllPermissions CI/CD – non-interactive, auto-grant all permissions
lurus chat --pipe JSON output for IDE integration (VS Code extension etc.)
lurus chat -p "Analyze the code" --output-format json --json-schema ./schema.json Structured JSON output with schema validation
lurus chat --add-dir ./src --add-dir ./tests Add multiple directories to context
lurus chat --mode plan Read-only planning interaction mode
Permission Modes
default Asks before every tool use acceptAllEdits File edits are automatically accepted dangerouslySkipAllPermissions Automatically grants all permissions; blocked when `disableDangerousTrust` is enabled Interactive Mode – Keyboard Shortcuts
Type ? to show all available shortcuts.
!ls -la) Batch Processing
Process multiple prompts from a text file sequentially. Ideal for scripts, pipelines, and automating recurring tasks.
batch
lurus batch <file> [options] Processes multiple prompts from a text file sequentially. Ideal for scripts, pipelines, and automating recurring tasks.
Options
--model <model> -m — AI model to use --output-format <format> -o text Output format: text or json --continue-on-error — false Continue processing on errors File Format
Prompts are separated by --- (three dashes). Lines starting with # are comments and are ignored.
Examples
lurus batch prompts.txt Simple batch processing (text output)
lurus batch prompts.txt -o json JSON output for machine processing
lurus batch prompts.txt --continue-on-error Skip errors and process all prompts
lurus batch prompts.txt -m haiku Use a specific model (cheaper for simple tasks)
lurus batch prompts.txt -o json --continue-on-error > results.json Combination: JSON output and skip errors
Extensions & Customization
Lurus Code is extended through file-based Skills, Commands, Agents, Rules and Hooks plus chat slash commands. Project-wide extensions live under ./.lurus/; personal extensions live under ~/.lurus/.
Extension types
Skills Reusable AI workflows from project, user or bundled skill directories. They can be activated persistently or only for the current session. /skills, /skillify Custom Commands Markdown-defined slash commands for repeatable prompts and workflows. /commands Agents Reusable subagents with their own system prompt, tools, model, turn limit and persistent trust state. /agents Rules Project and user rule files alongside `LURUS.md`, prioritized through front matter. /rules Hooks Automation for CLI/agent lifecycle events via `.lurus/hooks.json` and hook files. /create-hook, /hooks validate Install Install, list, update or remove GitHub packages containing skills and agents. /install Interactive management
/install <github-url|owner/repo> Install a skill/agent package from GitHub /install bundle <url1> <url2> ... Install multiple packages /install list|remove|update List, remove or update installed packages /skills show|activate|deactivate|activate-session|deactivate-session|audit Inspect skills and activate them persistently or for the session /agents list|show|run|trust|untrust View, trust and run custom agents as subagents /commands Show loaded custom slash commands /rules list|show|create Show rules or create a project rule template /create-hook <event> <name> [--ts] Create hook boilerplate and register it in `.lurus/hooks.json` /hooks validate Validate project hook configuration /mcp refresh-tools Reload MCP tool registry and session manifest /memory clear|edit|sweep Manage project memory File-based extensions
Skills
.lurus/skills/<name>/SKILL.md~/.lurus/skills/<name>/SKILL.md Frontmatter: name, description, globs, alwaysApply, version, author, license, category, userInvokable, argumentHint
--- name: API Reviewer description: Reviews REST API changes against project standards globs: - "src/api/**/*.ts" version: "1.0.0" author: "Platform Team" license: "MIT" category: review userInvokable: true argumentHint: "src/api/users.ts" --- Review API routes, request/response types, and error handling.
Commands
.lurus/commands/<name>.md~/.lurus/commands/<name>.md Frontmatter: description, allowedTools, model, argumentHint, disableModelInvocation
--- description: Review API design against project standards argumentHint: "src/api/users.ts" model: sonnet allowedTools: - Read - Grep disableModelInvocation: false --- Analyze `$ARGUMENTS` and review routes, types, and error handling.
Agents
.lurus/agents/<name>.md~/.lurus/agents/<name>.md Frontmatter: name, description, tools, model, maxTurns
--- name: Security Reviewer description: Reviews changes for common security issues tools: - Read - Grep - Bash model: sonnet maxTurns: 12 --- You are a focused security review subagent.
Rules
LURUS.md.lurus/LURUS.md.lurus/rules/<name>.md~/.lurus/LURUS.md~/.lurus/rules/<name>.md Frontmatter: description, alwaysApply, priority, globs
--- description: Security standards for backend code alwaysApply: true priority: 10 --- - Validate all external input server-side. - Use parameterized database queries.
Hooks
Hooks are configured in .lurus/hooks.json or ~/.lurus/hooks.json. /create-hook creates project hooks under ./.lurus/hooks/ as shell files (.sh, executable) or TypeScript files (.ts, via npx tsx) and registers them in ./.lurus/hooks.json. Valid hook events according to the code: SessionStart, SessionEnd, PreToolUse, PostToolUse, PostToolUseFailure, UserPromptSubmit, SubagentStart, SubagentStop, Stop, PreCompact, ConfigChange, TaskCompleted, Notification.
{
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash .lurus/hooks/block-dangerous-bash.sh",
"timeout": 30000
}
]
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "npx tsx .lurus/hooks/log-tool.ts"
}
]
}
]
} MCP Server Management
MCP (Model Context Protocol) enables integration of external tools into the AI agent. MCP servers provide the agent with additional tools (e.g. database access, external APIs, filesystem tools).
mcp add
lurus mcp add <name> (--command <cmd> | --url <url>) [options] Adds a new MCP server to the configuration. Use `--command` for local stdio servers or `--url` for remote HTTP/SSE servers.
--command <cmd> Command to start a local stdio server --url <url> Remote MCP endpoint URL --type <type> Transport type: stdio, http, or sse --args <args...> Arguments for --command servers only --env <pairs...> Environment variables in KEY=VALUE format for --command servers only --cwd <path> Working directory for --command servers only --header <pairs...> HTTP headers in KEY=VALUE format for --url servers only; values are stored securely --timeout <ms> Startup timeout in milliseconds --trust Trust the server (no permission prompts for its tools) --project Add to project scope (default: global) lurus mcp add filesystem --command npx --args @modelcontextprotocol/server-filesystem / Add local filesystem server
lurus mcp add github --url https://mcp.github.com/mcp --type http --header Authorization=Bearer:$GITHUB_TOKEN Add remote GitHub MCP server via URL
lurus mcp add sentry --url https://mcp.sentry.dev/sse --type sse --project Add project-scoped SSE server
lurus mcp add my-server --command ./server.sh --trust Trusted local server (no confirmation on tool use)
- Specify exactly one of
--commandor--url. --args,--env, and--cwdonly work with--command;--headeronly works with--url.headerRefs,includeTools, andexcludeToolsare settings/runtime configuration, notmcp addflags.
mcp remove
lurus mcp remove <name> [options] Removes a configured MCP server.
lurus mcp remove filesystem Remove global server lurus mcp remove db-tools --project Remove project server mcp list
lurus mcp list Lists all configured MCP servers (global and project-specific).
CLI Management
Keep the CLI up to date and inspect commands with built-in help.
update
Updates the Lurus Code CLI to the latest available version.
lurus update [options] Options
--check Check if an update is available without installing How it works
- 1 Reads the currently installed version.
- 2 Queries the npm registry for the latest version (
npm view @lurus/code version). - 3 Runs
npm update -g @lurus/codeif an update is available.
Examples
lurus update --check Check if an update is available
lurus update Install the update
lurus --help Show available commands
lurus chat --help Show flags for one command
CI/CD Commands
These commands are optimized for automated pipelines: headless (no browser), with defined exit codes, and optional GitHub integration.
security-ci
Runs an AI-powered security scan in CI/CD mode. Requires the Pro+ plan. Analyzes code in 4 phases and outputs results as SARIF, JSON, HTML, or text.
lurus security-ci [options] Options
--model <model> — Override AI model --format <format> sarif Output format: sarif, json, html, text --output <path> lurus-security-results.sarif Output file --fail-on <severity> high Exit code ≠ 0 at this severity or higher --diff — Scan only changed files (via git diff) --diff-base <ref> HEAD Git ref for diff comparison --no-upload — Do not upload results to backend --pr-comments — Post findings as PR review comments --comment-min-severity <severity> medium Minimum severity for PR comments Phases
[1/4] Discovery Analyze files and project structure [2/4] Analysis Identify security vulnerabilities [3/4] Verification Verify findings (remove false positives) [4/4] Remediation Generate concrete fix suggestions Exit Codes
Examples
lurus security-ci Standard scan with SARIF output
lurus security-ci --diff --format json --output results.json Scan only changed files (ideal for PRs)
lurus security-ci --diff --diff-base main Compare against main branch
lurus security-ci --fail-on medium Fail already at medium severity
lurus security-ci --pr-comments --comment-min-severity high With PR comments (in GitHub Actions)
lurus security-ci --format html --output security-report.html Generate HTML report for developers
- name: Lurus Security Scan
run: lurus security-ci --diff --pr-comments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} total_findings, blocking_findings, passed code-review-ci
Runs an AI-powered code review in CI/CD mode. Requires the Pro+ plan. Supports automatic PR comments and verdicts (APPROVE / REQUEST_CHANGES).
lurus code-review-ci [options] Options
--model <model> — Override AI model --format <format> json Output format: json, html, text --output <path> lurus-code-review-results.json Output file --fail-on <severity> high Exit code ≠ 0 at this severity or higher --full — Review entire project (default: git diff) --staged — Review only staged changes --diff-base <ref> — Git ref for diff comparison --pr-comments — Post findings as PR review comments --verdict — Submit PR review verdict (APPROVE / REQUEST_CHANGES) --comment-min-severity <severity> medium Minimum severity for PR comments Phases
[1/4] Discovery Identify changed files [2/4] Analysis Analyze code quality and patterns [3/4] Verification Validate findings [4/4] Suggestions Create concrete improvement suggestions Exit Codes
Verdicts
approve Code is fine, PR can be merged needsChanges Changes required (REQUEST_CHANGES) comment Comments only, no formal verdict Examples
lurus code-review-ci Standard review of current git diff
lurus code-review-ci --full Review entire project
lurus code-review-ci --staged Only staged changes (before commit)
lurus code-review-ci --format html --output review.html --pr-comments HTML report with PR comments
lurus code-review-ci --pr-comments --verdict With automatic verdict (APPROVE or REQUEST_CHANGES)
lurus code-review-ci --diff-base develop Compare against feature branch
- name: Lurus Code Review
run: lurus code-review-ci --pr-comments --verdict
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Slash Commands (in Chat)
Slash commands are entered inside an active lurus chat session. They always start with /. Tab completion is available. Code status: 69 registered handlers plus 8 registered aliases.
/help shows all available commands with descriptions.
Session & Info
/help Shows all available slash commands with short descriptions.
/status Shows full session status: model, mode, session ID, turns, cost, token usage, context files, and proxy status.
/cost Compact token usage, session cost, and balance display.
/stats Detailed session statistics: duration, model, mode, turns, tokens, context files, and loaded tools.
/doctor Environment diagnostics including Node.js, Git, working directory, API/proxy path, custom CA status, model, mode, session, CLI version, and OS.
/report Creates a session analysis report.
/report Open HTML report /report --json Export JSON to lurus-report.json /report --json <path> Export JSON to a specific path /changelog Generates a CHANGELOG.md entry in Keep-a-Changelog format from the git log since the last tag.
/mermaid Generates Mermaid diagrams from the codebase.
/mermaid Project architecture diagram /mermaid database schema Database schema diagram /mermaid authentication flow Authentication flow diagram Configuration & Project
/config Shows current configuration: API URL, model, prompt caching, max tokens, fallback/utility/compaction model, model aliases, notifications, trust safeguards, and loaded context sources.
/init Analyzes the current project and generates a LURUS.md with project description, tech stack, structure, conventions, build/test/lint commands, and architecture decisions.
/rules Manages project rules from .lurus/rules/*.md, ~/.lurus/rules/*.md, and LURUS context files.
/rules List all rules /rules list Explicit list view /rules show <name> Show rule content /rules create [name] Create a project rule template Front matter: description, alwaysApply, priority, and optional globs.
/permissions Manages persistent permissions created by permanent approval on tool prompts.
/permissions Show saved permissions /permissions clear Reset project permissions /permissions clear global Reset global permissions /trust Shows or toggles dangerous trust mode for the current session. Enabling requires the confirmation phrase I understand the risks and can be blocked by disableDangerousTrust.
/trust Show current status /trust on Disable permission checks for this session /trust off Re-enable normal permission checks Session Management
/resume Shows previous sessions for the current project and allows resuming them.
/resume Show all sessions /resume <query> Filter sessions by keyword /sessions Manages saved sessions.
/sessions Sessions for current project /sessions here Sessions in current directory /sessions all All sessions /sessions delete <id> Delete a session /recall Searches saved sessions and can load matching sessions.
/recall <query> Find sessions by content /recall --load <id> Load a found session /clear Clears the conversation history of the current session.
/save Exports the current session as a Markdown file.
/save Default timestamped file /save <path> Save to a specific path /rewind Selectively rolls back chat messages or code changes.
/rewind chat Remove recent messages /rewind code Undo recent file changes from checkpoint /memory Shows and manages project-local auto memory under .lurus/memory/.
/memory Show index and topic files /memory clear Delete project memory /memory edit Open MEMORY.md in editor /memory sweep Run consolidation immediately Context Management
/context Shows context window utilization: system prompt, directory tree, conversation tokens, used vs. remaining.
/detach / /drop Removes attached files or folders from the current prompt context. /drop is an alias.
/detach Remove all attachments /detach <number> Remove by index /drop <name-or-path> Alias for `/detach` /copy Copies the last AI response to the clipboard.
/paste Pastes an image from the clipboard into the chat.
/compress / /compact Compresses conversation history via LLM; /compact is an alias.
/refresh / /reindex Rebuilds the file search index for @ autocomplete in the current workspace; /reindex is an alias.
Code Indexing
/indexing Manages semantic code indexing (RAG).
/indexing Show status /indexing on Enable indexing /indexing off Disable indexing /indexing rebuild Rebuild index /indexing clear Reset local index and backend quota Git & GitHub
/commit Generates AI commit messages for staged changes or uses a provided message.
/commit AI generates commit message /commit "my message" Commit directly /create-pr Creates a pull request with AI-generated title and description.
/create-pr Create PR /create-pr --draft Draft PR /create-pr --reviewer <name> Add reviewer /create-pr --label <label> Add label /fix-issue Analyzes and fixes a GitHub issue automatically.
/fix-issue 42
/analyze-issue Analyzes a GitHub issue read-only.
/analyze-issue 42
/fix-pr Automatically fixes open PR review comments for the current PR.
/fix-pr
Tools, Tests & Media
/tools Lists available agent tools.
/tools Names only /tools desc With descriptions /web Loads the content of a URL and adds it to chat context.
/web https://docs.example.com/api
/docs Starts an agent workflow for documentation generation.
/docs Document the project /docs <target> Document a file, folder, module, or free-text target /image / /img Generates an image from a prompt and saves it under .lurus/images/.
/image <prompt> Generate image /image --model=<provider> <prompt> Force provider /image --aspect=landscape <prompt> Choose aspect ratio /image models --refresh Refresh provider list /image-edit / /img-edit Edits an existing image with a prompt.
/image-edit <path> <prompt> Edit image /image-edit --model=<provider> <path> <prompt> Force edit provider /img-edit <path> <prompt> Alias /video / /vid Generates an AI video under .lurus/videos/; --seconds=4|8|12 is required.
/video --seconds=4 <prompt> Portrait video /video --seconds=12 --landscape <prompt> Landscape video /video --seconds=8 --ref=<image-path> <prompt> Use reference image /test Runs tests.
/test Default test command /test npm run test:unit Custom command /test jest auth.spec.ts Specific test file /tdd TDD workflow and TDD guard.
/tdd <feature> Start TDD cycle /tdd on Warn mode /tdd strict Strict mode /tdd off Disable /tdd-implement Implements code for existing failing tests.
/tdd-implement
/edit Opens $EDITOR for multi-line input and sends the saved content as the prompt.
/diff Shows all file changes since session start.
/undo Undoes recent file changes using checkpoints.
Model & Mode
/model Shows or changes the AI model for the current session.
/model Show current model /model sonnet Switch model /utilitymodel Shows or changes the utility model for internal tasks.
/utilitymodel Show /utilitymodel <model> Set /utilitymodel clear Reset /compactionmodel Shows or changes the model for context compaction and memory extraction.
/compactionmodel Show /compactionmodel <model> Set /compactionmodel clear Reset /mode Switches the interaction mode.
/mode agent Implementation mode /mode plan Read-only planning /mode ask Read-only Q&A /mode debug Systematic debugging /agent Shortcut for /mode agent, optionally with a prompt.
/agent Switch to agent /agent <prompt> Switch mode and send prompt /plan Shortcut for /mode plan, optionally with a prompt.
/plan Switch to plan /plan <prompt> Send planning prompt /ask Shortcut for /mode ask, optionally with a prompt.
/ask Switch to ask /ask <prompt> Send question /debug Shortcut for /mode debug, optionally with a prompt.
/debug Switch to debug /debug <prompt> Send debug prompt /max Toggles max mode; auto-compaction is delayed.
/thinking Toggles extended thinking on or off.
/thinking Enable /thinking off Disable /effort Shows or sets reasoning effort: minimal, low, medium, high, xhigh, max.
/effort Show status /effort medium Set medium effort /effort max Set maximum effort /costsaving Shows or changes cost-saving mode for subagents and orchestration roles.
/costsaving Status /costsaving on Enable /costsaving off Disable /displaycost Shows or changes whether EUR costs are printed after turns and at session end.
/displaycost Status /displaycost on Enable /displaycost off Disable Extensions & MCP
/install Installs and manages GitHub packages containing skills and agents.
/install <github-url> Install GitHub URL /install <owner/repo> Install GitHub shorthand /install bundle <url1> <url2> ... Install multiple packages /install list Show installed packages /install remove <name> Remove package /install update [name] Update a package or show the single-package update hint /mcp Shows MCP server status, available tools, and manages the tool manifest.
/mcp Show servers and tools /mcp restart <name> Restart server /mcp refresh-tools Refresh tool registry and manifest /commands Lists loaded custom slash commands from .lurus/commands/*.md and ~/.lurus/commands/*.md.
/agents Manages custom agents. Agents are untrusted by default and must be trusted before /agents run.
/agents list Show agents /agents show <name> Show details /agents run <name> <prompt> Run agent as subagent /agents trust <name> Persistently trust /agents untrust <name> Remove trust /skills Manages skills from bundled, project-local, and global skill directories.
/skills Show skills with status /skills show <name> Show metadata and content /skills activate <name> Persistently activate /skills deactivate <name> Persistently deactivate /skills activate-session <name> Activate for this session only /skills deactivate-session <name> Deactivate for this session only /skills audit Check skills /skillify Converts the current session into a reusable SKILL.md and asks for project or personal save location.
/create-hook Creates hook boilerplate under ./.lurus/hooks/ and registers it in ./.lurus/hooks.json.
/create-hook PreToolUse block-dangerous-bash Create shell hook /create-hook PostToolUse audit/log-tool --ts Create TypeScript hook SessionStart Session starts SessionEnd Session ends PreToolUse Before tool execution PostToolUse After successful tool execution PostToolUseFailure After failed tool execution UserPromptSubmit After user prompt SubagentStart Subagent starts SubagentStop Subagent ends Stop Agent stops PreCompact Before context compaction ConfigChange Valid in hooks.json, no template TaskCompleted Valid in hooks.json, no template Notification Valid in hooks.json, no template /hooks Validates the project hook configuration ./.lurus/hooks.json.
/hooks validate Validate hooks.json Review & Security
/review / /code-review Runs an AI code review; /code-review is an alias.
/review Review current diff /review --provider eu|bedrock|openai|gemini|global|lurus Choose model group /review --full Entire project /review --staged Only staged changes /review --diff-base <ref> Compare against ref /review --html HTML report /review --json <path> JSON export /review --model <alias> Override model /security-review / /scan Runs a security scan; /scan is an alias.
/scan Scan project /scan --provider eu|bedrock|openai|gemini|global|lurus Choose model group /scan --diff Only changed files /scan --diff-base <ref> Compare against ref /scan --html HTML report /scan --json <path> JSON export /scan --model <alias> Override model Orchestration & IDE
/orchestrate Starts a multi-agent workflow.
/orchestrate Show available workflows /orchestrate feature <prompt> Feature development /orchestrate bugfix <prompt> Bug fix /orchestrate refactor <prompt> Refactoring /orchestrate security <prompt> Security workflow /orchestrate review <prompt> Code review /orchestrate auto <spec> Autonomous loop /ide Manages the IDE connection.
/ide Show status /ide enable Connect to VS Code /ide disable Disconnect /quit / /exit Exits the chat session. These commands are handled directly by the chat loop.
Quick Reference
CLI Commands (Top-Level)
lurus lurus chat [prompt...] lurus chat -p "..." lurus chat -c lurus chat -r <id> lurus batch <file> lurus register lurus login [--api-key|--email] lurus logout [--all] lurus status lurus doctor lurus mcp lurus mcp add <name> lurus mcp remove <name> lurus mcp list lurus update [--check] lurus security-ci lurus code-review-ci lurus ext-bridge lurus --help Slash Commands (in Chat)
/help, /status, /cost, /stats, /doctor, /report, /changelog, /mermaid, /quit, /exit
/config, /init, /rules, /rules show <name>, /rules create [name], /permissions, /permissions clear, /trust, /trust on, /trust off
/resume, /sessions, /sessions delete <id>, /sessions all, /recall, /recall --load <id>, /clear, /save, /save <path>, /rewind, /memory, /memory clear, /memory edit, /memory sweep
/context, /detach, /drop, /copy, /paste, /compress, /compact, /refresh, /reindex
/indexing, /indexing on, /indexing off, /indexing rebuild, /indexing clear
/commit, /create-pr, /fix-issue, /analyze-issue, /fix-pr
/tools, /web, /docs, /image, /img, /image-edit, /img-edit, /video, /vid, /test, /tdd, /tdd-implement, /edit, /diff, /undo
/model, /utilitymodel, /compactionmodel, /mode, /agent, /plan, /ask, /debug, /max, /thinking, /effort, /costsaving, /displaycost
/install, /install bundle, /install list, /install update [name], /install remove <name>, /commands, /agents, /agents list, /agents show <name>, /agents run <name> <prompt>, /agents trust <name>, /agents untrust <name>, /skills, /skills show <name>, /skills activate <name>, /skills deactivate <name>, /skills activate-session <name>, /skills deactivate-session <name>, /skills audit, /mcp, /mcp restart <name>, /mcp refresh-tools, /skillify
/create-hook <event> <name> [--ts], /hooks validate
/review, /code-review, /security-review, /scan
/orchestrate, /ide, /ide enable, /ide disable
Best Practices & Code Examples
Practical examples, common pitfalls, and tips for getting the most out of the Lurus Code CLI.
Authentication
Use API Keys in CI/CD – Never Browser Flow
Browser-based login requires user interaction and does not work in headless environments. Always use API keys for pipelines.
✅ Correct – API key via environment variable
# Set in CI/CD secrets (e.g. GitHub Actions) export LURUS_API_KEY=lurus_your_key_here # Or pass directly to command LURUS_API_KEY=lurus_xxx lurus security-ci --diff
❌ Wrong – Browser flow in CI/CD
# This will hang in a headless environment! lurus login # Requires browser interaction
Store the API key as a GitHub Secret (LURUS_API_KEY) and inject it via env: in your workflow.
Always Verify Authentication After Login
After logging in, always verify that the session is active before starting a session.
✅ Correct – Verify after login
lurus login lurus status # ✓ Authenticated # Name: Jane Developer # Plan: pro
If lurus status shows "Not authenticated", run lurus login again or check your API key.
Secure Logout from All Devices
When changing devices or suspecting a compromised session, log out from all devices.
✅ Correct – Log out from all devices
# Log out from all devices (e.g. when changing laptops) lurus logout --all # Then log in again on the new device lurus login
Chat & Interaction
Use --mode plan for Read-Only Analysis
When you only want to analyze code without making changes, use plan mode. This prevents accidental file modifications.
✅ Correct – Read-only analysis
# Analyze architecture without making changes lurus chat -p "Explain the authentication flow" --mode plan # Or switch mode inside the chat lurus chat > /mode plan > Analyze all API endpoints in src/routes/
❌ Suboptimal – Default mode for read-only tasks
# In default mode, the agent might modify files unexpectedly lurus chat -p "Explain the authentication flow" # Agent might create files or make changes
Use /mode plan inside an active session to switch to read-only mode at any time.
Load Context Before Asking Questions
Add relevant files to the context before asking complex questions. This gives the AI agent better information.
✅ Correct – Load context first
lurus chat > /add src/auth/ src/users/ tests/auth/ > /indexing on > Now explain the complete authentication flow and identify potential security issues
❌ Suboptimal – Ask without context
lurus chat > Explain the authentication flow # AI agent has no file context and gives generic answers
Use /context to check how much of the context window is already used.
Resume Sessions Instead of Starting New Ones
Sessions preserve context and history. Resuming is more efficient than starting fresh every time.
✅ Correct – Resume last session
# Continue where you left off lurus chat -c # Or resume a specific session lurus chat --resume abc123def456 # Inside chat: search past sessions > /recall "authentication refactor"
Use /save my-feature.md to export important sessions as Markdown for later reference.
Use --output-format json for Scripting
For automated workflows, use JSON output to process AI responses programmatically.
✅ Correct – JSON output for scripting
# Get structured output and process with jq lurus chat -p "List all public API endpoints as JSON array" \ --output-format json \ --json-schema ./api-schema.json | jq '.endpoints' # Stream JSON for real-time processing lurus chat -p "Analyze this file" --output-format stream-json
Batch Processing
Structure Prompt Files with Comments
Use comments (#) and clear separators (---) to organize batch files for maintainability.
✅ Correct – Well-structured prompt file
# prompts.txt # ============================================ # Batch: Documentation Generation v1.0 # Run: lurus batch prompts.txt -o json # ============================================ # Prompt 1: Auth module Analyze src/auth/auth.service.ts and generate JSDoc comments for all public methods --- # Prompt 2: User module Analyze src/users/user.service.ts and generate JSDoc comments for all public methods --- # Prompt 3: Summary Create a README.md overview for the src/ directory
❌ Suboptimal – Unstructured prompt file
Analyze auth.service.ts --- Analyze user.service.ts --- Create README
Use -m haiku for simple documentation tasks to reduce costs significantly.
Always Use --continue-on-error in CI/CD
In pipelines, a single failing prompt should not abort the entire batch. Use --continue-on-error and check the exit code.
✅ Correct – Error-tolerant batch in CI
# In GitHub Actions
- name: Generate Documentation
run: |
lurus batch doc-prompts.txt \
-o json \
--continue-on-error \
> batch-results.json
# Check how many succeeded
jq '.succeeded, .failed' batch-results.json ❌ Wrong – Batch without error handling
# One failing prompt aborts the entire batch lurus batch doc-prompts.txt # Exit code 1 = pipeline fails immediately
Use Cheaper Models for Simple Tasks
Not every task requires the most powerful model. Use haiku for simple documentation, sonnet for complex analysis.
✅ Correct – Model selection based on task complexity
# Simple documentation → haiku (fast & cheap) lurus batch simple-docs.txt -m haiku # Complex security analysis → opus (most powerful) lurus batch security-analysis.txt -m opus # Default → sonnet (good balance) lurus batch mixed-tasks.txt
Check token costs with /cost in an interactive session before running large batches.
Extensions & Customization
Keep Project Extensions in .lurus/
Use project-local files for team workflows so skills, commands, agents, rules, and hooks are versioned with the codebase.
✅ Correct – Project-local extension files
# Custom slash command .lurus/commands/security-review.md # Project skill .lurus/skills/api-review/SKILL.md # Project agent .lurus/agents/migration-reviewer.md # Project rules and hooks .lurus/rules/coding-style.md .lurus/settings.json
❌ Suboptimal – Hidden user-only workflow
# Only available on one machine ~/.lurus/commands/security-review.md # Team members will not load this command automatically
Use user-level ~/.lurus/ only for personal workflows that should not affect the project.
Use Slash Commands for Interactive Management
Manage installed skill packages and runtime extension state from inside an active chat session.
✅ Correct – Manage extensions in chat
lurus chat > /install https://github.com/org/skill-package > /skills > /commands > /create-hook > /hooks
MCP Server Management
Use --trust Only for Local, Verified Servers
The --trust flag disables permission prompts for a server's tools. Only use it for servers you fully control.
✅ Correct – Trust only local servers
# Local server you wrote yourself → trust is OK lurus mcp add my-db-tools --command ./scripts/db-mcp.sh --trust # External server → never trust without review lurus mcp add filesystem --command npx --args @modelcontextprotocol/server-filesystem / # (No --trust: each tool use requires confirmation)
❌ Dangerous – Trust external servers
# Never do this with untrusted servers! lurus mcp add unknown-server --command npx --args some-unknown-mcp --trust # Could execute arbitrary code without confirmation
Use /mcp in chat to see which tools a server provides before trusting it.
Use Environment Variables for Secrets
Pass API tokens and secrets via --env, never hardcode them in scripts.
✅ Correct – Secrets via environment variables
# Pass GitHub token via --env
lurus mcp add github \
--command npx \
--args @modelcontextprotocol/server-github \
--env GITHUB_TOKEN=$GITHUB_TOKEN
# Or read from environment
lurus mcp add github \
--command npx \
--args @modelcontextprotocol/server-github \
--env GITHUB_TOKEN=${GITHUB_TOKEN} ❌ Wrong – Hardcoded secrets
# Never hardcode tokens! lurus mcp add github \ --command npx \ --args @modelcontextprotocol/server-github \ --env GITHUB_TOKEN=ghp_abc123xyz # Visible in shell history!
Use Project Scope for Project-Specific Tools
Database servers, project-specific APIs, and local tools should be configured per project.
✅ Correct – Project-specific MCP server
# Project database server → only for this project cd /path/to/my-project lurus mcp add db-tools \ --command npx \ --args mcp-postgres-server \ --env DATABASE_URL=$DATABASE_URL \ --project # Global tools (filesystem, GitHub) → global lurus mcp add filesystem \ --command npx \ --args @modelcontextprotocol/server-filesystem /
CI/CD Commands
Always Use --diff in PRs – Never Scan the Entire Project
In PR workflows, only scan changed files. Full project scans are slow and waste credits.
✅ Correct – Scan only changed files
# In GitHub Actions on pull_request events
- name: Lurus Security Scan
run: lurus security-ci --diff --pr-comments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }} ❌ Suboptimal – Full scan on every PR
# Scans entire project on every PR – slow & expensive! - name: Lurus Security Scan run: lurus security-ci # No --diff flag
Use --diff-base main to compare against the main branch instead of HEAD.
Configure Severity Thresholds Progressively
Start with --fail-on critical, then lower the threshold as the team fixes existing issues.
✅ Correct – Progressive severity thresholds
# Phase 1: Only block on critical issues lurus security-ci --diff --fail-on critical # Phase 2: After fixing critical issues lurus security-ci --diff --fail-on high # Phase 3: Strict mode lurus security-ci --diff --fail-on medium
Use --no-upload if you want to run scans without uploading results to the backend.
Use GitHub Actions Outputs for Notifications
Lurus CI commands set GitHub Actions outputs that you can use for Slack/Teams notifications.
✅ Correct – Use outputs for notifications
- name: Lurus Security Scan
id: security
run: lurus security-ci --diff --pr-comments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }}
- name: Notify on Findings
if: steps.security.outputs.blocking_findings > 0
uses: slackapi/slack-github-action@v1
with:
payload: |
{"text": "⚠️ ${{ steps.security.outputs.total_findings }} security findings found!"} Full CI/CD Pipeline: Security + Code Review
Combine security scan and code review in a single workflow for complete AI-powered quality gates.
✅ Complete pipeline example
name: AI Code Quality
on:
pull_request:
branches: [main, develop]
jobs:
ai-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for diff
- name: Install Lurus
run: npm install -g @scramble-cloud/lurus-code-cli
- name: Security Scan
id: security
run: lurus security-ci --diff --pr-comments --fail-on high
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }}
- name: Code Review
id: review
run: lurus code-review-ci --pr-comments --verdict
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }}
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: lurus-security-results.sarif Slash Commands
Initialize Every New Project with /init
Run /init at the start of each new project to give the AI agent full project context.
✅ Correct – Project initialization
# In the project root lurus chat > /init # Analyzing project and generating LURUS.md... # ✓ LURUS.md created # The AI agent now knows: # - Tech stack (TypeScript, React, PostgreSQL) # - Project structure # - Build/test/lint commands # - Coding conventions
Update LURUS.md regularly as the project evolves. The AI agent reads it at every session start.
Use /compress to Extend Long Sessions
When the context window fills up, compress the conversation history instead of starting a new session.
✅ Correct – Compress instead of restart
# Check context usage > /context # Context utilization: ████████░░ 78.3% # Compress when approaching 80% > /compress # ✓ Compressed 45,123 → 8,234 tokens (saved 36,889 tokens) # Continue working > Continue implementing the OAuth2 flow
❌ Suboptimal – Start new session on context full
# Loses all context and history! > /quit lurus chat # New session – AI has no memory of previous work
Use /tdd for Quality-Driven Development
The TDD workflow ensures code quality by writing tests first. Use /tdd on for permanent guard mode.
✅ Correct – TDD workflow
# Enable TDD guard for the session > /tdd on # ✓ TDD guard enabled (warn mode) # Start TDD cycle for a feature > /tdd UserAuthentication # [RED] Writing failing tests... # [GREEN] Implementing minimal code... # [REFACTOR] Improving code quality... # Or implement for existing failing tests > /tdd-implement # Running npm test... 3 tests failing # Implementing fixes...
Use /orchestrate for Complex Multi-Step Tasks
For complex features that require planning, implementation, and testing, use orchestration instead of a single prompt.
✅ Correct – Orchestrated feature development
# Complex feature → use orchestration
> /orchestrate feature "Add OAuth2 login with Google and GitHub"
# Autonomous loop for large tasks
> /orchestrate auto "Implement complete user management with RBAC" \
--max-iterations 20 \
--max-cost 30
# Review all changes after orchestration
> /diff ❌ Suboptimal – Single prompt for complex tasks
# Too complex for a single prompt – inconsistent results > Implement complete OAuth2 login with Google and GitHub, including tests, documentation, and error handling
Use /thinking for Complex Architectural Decisions
Enable extended thinking for complex problems that require deep analysis.
✅ Correct – Extended thinking for complex problems
# Enable extended thinking > /thinking # ✓ Extended thinking enabled # Now ask complex architectural questions > Analyze the current database schema and propose a migration strategy to support multi-tenancy without breaking existing data # Disable for simple tasks (saves tokens) > /thinking off
Extended thinking costs more tokens but significantly improves quality for complex architectural decisions.
Common Errors & Solutions
Error: Not authenticated No valid session or expired token.
Run `lurus login` or set `LURUS_API_KEY` as environment variable.
# Solution 1: Re-login lurus login # Solution 2: Use API key export LURUS_API_KEY=lurus_your_key lurus status
Error: Rate limit exceeded Too many requests in a short time period.
Wait a few seconds and retry. Use `--continue-on-error` in batch mode.
# In batch mode: skip rate limit errors lurus batch prompts.txt --continue-on-error # Check your quota lurus status # Balance: 0.50 € (low!)
Context window full (100%) The conversation history is too long.
Use `/compress` to summarize the history, or `/clear` to start fresh.
# Option 1: Compress (preserves context) > /compress # Option 2: Clear (loses history) > /clear # Option 3: Enable max mode to delay compression > /max
Exit code 2: Scan failed (technical error) Network error, authentication problem, or internal error.
Check authentication status and network connectivity with `lurus doctor`. Run with `--debug` for command-specific details.
# Check authentication lurus status # Diagnose network, proxy and CA configuration without logging in lurus doctor # Run with debug output lurus security-ci --debug # Check if the issue is temporary lurus update --check # Is the CLI up to date?
Extension not loaded The file is in the wrong scope, has invalid frontmatter, or the chat session was started before the file was created.
Check project/user extension paths and inspect loaded items from chat.
# Project-local command .lurus/commands/security-review.md # Project-local skill .lurus/skills/api-review/SKILL.md # In chat: inspect loaded extensions > /skills > /commands > /hooks
MCP server: connection refused Server process failed to start or port is blocked.
Restart the server with `/mcp restart <name>` and check logs.
# In chat: restart the server > /mcp restart my-server # Check server status > /mcp # filesystem ❌ disconnected # Remove and re-add lurus mcp remove my-server lurus mcp add my-server --command ./server.sh
Advanced Command Combinations
Complete PR Workflow
From feature development to merged PR – fully automated.
# 1. Start session and initialize project lurus chat > /init > /mode agent # 2. Develop feature with TDD > /tdd UserAuthentication # 3. Run all tests > /test # 4. Security check > /scan --diff # 5. Code review > /review --staged # 6. Commit and PR > /commit > /create-pr --reviewer team-lead
Automated Nightly Quality Report
A complete quality pipeline that runs every night and generates reports.
# nightly-quality.yml
name: Nightly Quality Report
on:
schedule:
- cron: '0 2 * * *' # Every night at 2am
jobs:
quality-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g @scramble-cloud/lurus-code-cli
# Security scan → HTML report
- run: lurus security-ci --format html --output security.html
env:
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }}
# Code review → JSON report
- run: lurus code-review-ci --full --format json --output review.json
env:
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }}
# Batch: generate changelogs
- run: lurus batch nightly-prompts.txt -o json --continue-on-error
env:
LURUS_API_KEY: ${{ secrets.LURUS_API_KEY }}
- uses: actions/upload-artifact@v4
with:
name: quality-reports
path: |
security.html
review.json Multi-Repository Security Audit
Scan multiple repositories in parallel using a batch file.
# audit-prompts.txt # Security audit for all microservices Analyze src/auth-service/ for security vulnerabilities and generate a SARIF report --- Analyze src/payment-service/ for security vulnerabilities and generate a SARIF report --- Analyze src/user-service/ for security vulnerabilities and generate a SARIF report
# Run audit across all services lurus batch audit-prompts.txt -o json --continue-on-error > audit-results.json # Check results jq '.results[] | select(.status == "error")' audit-results.json
Interactive Session with Full MCP Setup
A fully configured session with GitHub, filesystem, and database tools.
# Setup (once) lurus mcp add github \ --command npx \ --args @modelcontextprotocol/server-github \ --env GITHUB_TOKEN=$GITHUB_TOKEN lurus mcp add filesystem \ --command npx \ --args @modelcontextprotocol/server-filesystem / lurus mcp add db \ --command npx \ --args mcp-postgres-server \ --env DATABASE_URL=$DATABASE_URL \ --project --trust # Start session lurus chat > /mcp # Verify all servers are connected > /indexing on # Enable semantic code search > /mode agent # Full tool access # Now the AI can: # - Read/write files via filesystem MCP # - Query GitHub issues/PRs # - Execute database queries # - Search the codebase semantically
Workflows in Action
See the most important CLI workflows as animated terminal demos. Click the replay button ↺ to restart any animation.
Demo 1: Login & Authentication
Authenticate with Lurus Code in seconds using browser OAuth.
Demo 2: First Chat Session
Start an interactive AI coding session with a single command.
Demo 3: Batch Processing
Process multiple AI tasks in sequence – perfect for CI/CD pipelines.
Demo 4: Security Scan
Run a full project security scan and generate a SARIF report for CI/CD.
Demo 5: Automated Code Review
Run an automated code review in CI and post the verdict as a PR comment.
Installation & Basics
Complete reference for all Lurus Code CLI commands. Learn how to use the AI coding agent from the terminal.