LazyAI Commands¶
Session Management¶
Track AI agent sessions with full audit trail.
Start a Session¶
Output:
List Sessions¶
Output:
Sessions:
---------
🟢 ses_1779583480 | Implement user authentication | 2026-05-24T00:44:40Z
🔴 ses_1779582575 | Fix login bug | 2026-05-24T00:29:34Z
Show Session Details¶
Output:
Session: ses_1779583480
Goal: Implement user authentication
Status: active
Started: 2026-05-24T00:44:40Z
Dispatches:
[completed] implementer: Implement auth middleware
[completed] reviewer: Review auth implementation
End a Session¶
Output:
Health Checks¶
Validate your environment before starting work.
Run Doctor¶
Doctor reports setup integrity first, then these 6 environment checks:
sqlite3dependencygitdependencyjqdependency (optional warning)bashdependencyollamaprovider onlocalhost:11434(warning if unavailable)- Disk space usage
JSON Output¶
Useful for CI/CD pipelines and automated monitoring.
Setup and Configuration Commands¶
These setup-core commands cover common maintenance tasks around an initialized LazyAI project.
Manage MCP Servers¶
Enable or disable cataloged MCP servers, then compile per-tool configs.
Configure Local Defaults¶
Create and update .opencode/config.yaml.
Create an Artifact¶
Generate agents, skills, prompts, commands, templates, or hooks.
Manage Sidecars¶
Point optional docs/specs/plans directories at workspace, project, or global scope. --scope defaults to project when omitted; a workspace-scope config is created by running sidecar init --scope workspace from the shared ancestor directory — there is no separate registration step and no sidecar attach command.
Import an Existing Setup¶
Import an existing tool setup into LazyAI-managed form.
Migrate Older LazyAI or ai-setup Config¶
Move older LazyAI or ai-setup files into the current canonical format.
Update the CLI Binary¶
Check or install a GitHub Release for lazyai-cli.
Inspect Setup Inventory¶
Scan or plan supported setup targets without starting runtime execution.
Audit Trail¶
Immutable hash-chained ledger for tracking all actions.
Initialize Ledger¶
Creates .specify/ledger.jsonl with a genesis entry.
Append Events¶
lazyai-cli ledger append dispatch "agent=implementer task=auth"
lazyai-cli ledger append session_start "goal=Implement auth"
lazyai-cli ledger append validation "status=pass agents=8"
Verify Integrity¶
Verifies: - Hash chain continuity - Entry hash correctness - No tampering detected
Show Entries¶
Shows last 10 entries with truncated hashes.
Validation¶
Check agent and skill file structure.
Validate Agents¶
Checks:
- YAML frontmatter present (error)
- # System Prompt heading present (error)
- Managed marker present (warning)
- Section heading after # System Prompt present (warning)
Validate Skills¶
Checks:
- Confirm SKILL.md directory structure
- Verify required YAML frontmatter fields (name, description)
- Verify quick reference sections are present and non-empty where required
- Validate referenced scripts for skills with command actions are resolvable
Runtime migration note¶
Legacy task, workflow, orchestration, mcp-setup, and obsolete eval CLI commands were removed during the runtime refactor. Repository harness scripts are not replacements for those product commands.
See ../migration/fortnite-orchestrator-removal.md and ../concepts/product-boundaries.md for replacements, rollback guidance, and current command ownership.
Agent Message Bus¶
SQLite-based messaging between agents.
Send a Message¶
Receive Messages¶
Note: This marks all unread messages for the agent as read and shows the 10 most recent messages.
Broadcast¶
Git Integration¶
Sync Changes¶
Safety note: This command stages and commits ALL changes in the current repository after showing the file list and asking for confirmation. Use --force to skip the confirmation prompt.
Backup¶
Create Backup¶
Restore from Backup¶
Safety note: This overwrites current LazyAI data with the backup contents. Use --force to skip the confirmation prompt.
Secrets¶
Store a Secret¶
Retrieve a Secret¶
Safety note: Secrets are stored locally using the OS keychain when available, or a fallback file in ~/.lazyai/secrets/ (not encrypted at rest). Do not use for production credentials.
Notifications¶
Configure Webhook¶
Safety note: The webhook URL is stored in the local config file. Ensure the URL is trusted and uses HTTPS.
Send a Test Notification¶
Metrics¶
Export Metrics¶
Writes metrics.prom (Prometheus format) in the current directory. Use -o to specify a different path.
Generate Dashboard¶
Writes dashboard.html in the current directory. Use -o to specify a different path.
Completion¶
Generate shell completion scripts.
# Bash
source <(lazyai-cli completion bash)
# Zsh
source <(lazyai-cli completion zsh)
# Fish
lazyai-cli completion fish | source
Typical Workflow¶
# 1. Check environment
lazyai-cli doctor
# 2. Start session
lazyai-cli session start "Implement feature X"
# 3. Work with agents...
# (agent dispatches are automatically logged)
# 4. Validate changes
lazyai-cli validate agents
# 5. Check audit trail
lazyai-cli ledger verify
# 6. End session
lazyai-cli session end ses_1234567890