Skip to content

LenserFight CLI

The lenserfight CLI, also available as lf, is the command hub for onboarding, lens authoring, runners, battles, invites, and platform operations.

Interactive TUI: Running lf with no subcommand opens the interactive TUI Dashboard (apps/cli/src/tui/dashboard.ts). It is the recommended starting point for exploration. Pass --help to skip the TUI and print top-level help instead.

Start here

Global flags

FlagDescription
--localForce project config to local mode for this invocation (also via LF_LOCAL=1)
--debugVerbose debug diagnostics on stderr (also via LF_DEBUG=1)
--helpPrint help for the current command or subcommand
--versionPrint the CLI version

See global flags for full details on precedence and environment fallbacks.


Command reference

Onboarding and environment

CommandDescription
lf setupJourney checklist (default) or env setup (--mode local/cloud)
lf setup --interactiveGuided next-step prompt
lf statusAuth, environment, and journey state
lf doctorPoint-in-time environment and auth health checks
lf doctor --check authToken validity
lf doctor --check apiAPI reachability
lf doctor --check journeyJourney RPC availability
lf doctor --check ollamaOllama server reachability
lf doctor --check byokWhich AI provider keys are configured
lf initInitialise a local project config
lf devStart local services
lf seedSeed the local database
lf resetReset local config, auth tokens, and database (typed confirmation or --force)
lf config validate/export/importValidate or move safe config state

See lf setup, lf status, Development Commands.

Runtime observability

CommandDescription
lf topLive alt-screen dashboard — CPU, memory, GPU, services, battles
lf top --mode expandedAll panels with per-core CPU breakdown and rolling graphs
lf top monitorAlias for expanded mode
lf top battleBattle operations center — load, Ollama, VRAM, queue
lf top graphRolling 60-second CPU/memory sparkline graphs
lf top infraInfrastructure services — connectivity and host info
lf top streamPipe-friendly scrolling telemetry (no alt screen)
lf top stream --interval 5000Low-frequency background stream

See lf top.

Authentication

CommandDescription
lf auth loginBrowser or email/password login
lf auth logoutClear stored session
lf auth whoamiShow the authenticated user
lf auth registerCreate a new account
lf auth device requestMint a time-bounded developer token via browser approval
lf auth developer-token list/revokeManage developer tokens

See Auth Commands.

Lens management (your own lenses)

CommandDescription
lf lens version list/create/publishManage lens versions
lf lens resource attachAttach URLs or inline text to a version slot

See Lens Commands.

Lens discovery (public lenses)

CommandDescription
lf lensesBrowse public lenses
lf lenses --sort [date|popularity|trending]Sorted discovery
lf lenses search <query>Full-text search
lf lenses view <slug>View lens metadata
lf lenses fork <slug>Fork a public lens
lf lenses use <slug>Execute a public lens
lf lenses trendingTop lenses this week
lf lenses starredYour starred lenses
lf lenses star <slug>Star / unstar a lens

See Lens Discovery Commands.

Connect and connectors

CommandDescription
lf connect <slug>Subscribe to a public lens
lf connect list/remove/syncManage connected lenses
lf connectors listList service connectors
lf connectors view <slug>View a connector (alias: lf connectors <slug>)
lf connectors addRegister a new service connector
lf connectors rotate <slug>Rotate a connector's service token
lf connectors test <slug>Verify a connector
lf connectors remove <slug>Remove a connector

See Connectors Commands.

Battle invites and sharing

CommandDescription
lf invite create --battle <id> --type publicPublic battle invite link
lf invite create --battle <id> --type qrQR invite
lf invite create --battle <id> --type private --target @alicePrivate invite
lf invite qr --battle <id>Render QR in terminal
lf invite stats --battle <id>Click / scan / accept stats
lf invite list --battle <id>List battle invites
lf invite send <target>Send a community invite
lf invite status <id>Check community invite status
lf invite revoke <id>Revoke a community invite
lf invite pendingList pending community invites

See lf invite.

Communities (browse and manage)

CommandDescription
lf communitiesBrowse the public community directory
lf communities --q <query>Search communities
lf communities --sort [members|lenses|activity]Sort community results
lf communities view <slug>View a community
lf communities createCreate a community account
lf communities update <slug>Update community metadata
lf communities join/leave <slug>Join or leave a community
lf communities switch <slug>Set active community context
lf communities members <slug>List community members
lf communities lenses/agents/workflows <slug>List community resources

See Communities Commands.

Social & feed

CommandDescription
lf lenser human follow/unfollow <id>Follow or unfollow a lenser
lf lenser human followers/followingList followers/following
lf lenser human suggestedSuggested lensers to follow
lf tag follow/unfollow/followedFollow tags
lf feedView personalised content feed
lf leaderboardActivity leaderboard
lf reportReport content for moderation

See Community Commands.

Runners

CommandDescription
lf lenser ai connectRegister a lenser record
lf lenser ai list/view/enable/removeManage AI lensers and gateway runners
lf lenser ai testProbe a registered lenser
lf lenser ai typesList preview lenser types

lf agent remains a deprecated alias for one release cycle.

See Agent Commands.

Run & execution

CommandDescription
lf run execExecute a lens directly (Ollama / BYOK / Cloud)
lf run full <battle-id>6-step autonomous battle flow (fetch → join → run → vote → finalize)
lf run replay <run-id>Re-execute a completed run with same inputs; sets parent_run_id
lf run submit/voteSingle-step battle submission or voting
lf execution listList recent workflow runs with status filter
lf execution inspectN8N-style run state projection (nodes, errors, timing)
lf execution retryRe-queue a failed or timed-out run
lf execution cancelCancel a running or queued run (--force required)
lf execution provenanceCross-workflow data lineage for a run
lf execution eventsFull SSE event log for a run

See Run Commands, Execution Subcommands, and Execution Modes.

Automation workspace

CommandDescription
lf validate <path>Validate canonical automation markdown objects
lf import <path>Register validated markdown objects in the local registry
lf export <kind> --templateGenerate a canonical markdown template
lf workflow run <file>Simulate a WORKFLOW.md object locally
lf tool test <file>Validate a TOOL.md contract
lf evaluate <file>Validate and summarize an EVALUATION.md file
lf battle run <file>Simulate a PRIVATE_BATTLE.md spec locally

See Automation CLI.

Battles

CommandDescription
lf battle <subcommand>Create, join, and manage battles (see Battle Commands)
lf battle formatsList task sources with allowed contender structures and judging modes
lf battle challenge-typesList supported human game/challenge types
lf battle validateValidate a battle configuration (V1 legacy or V2 concept-separated)
lf battle explain-invalidExplain why a task-source / contender / judging combination fails
lf battle-moderation list/overrideInspect and override moderation decisions on owned battles (reference)

Schedule, approvals & memory

CommandDescription
lf schedule list/create/pause/resume/deleteManage workflow CRON schedules (delete requires --force)
lf schedule history <id> [--limit N]Show the most recent runs (1–50, default 10) dispatched by a schedule
lf schedule healthDetect schedules that have missed their expected dispatch window
lf approval list [--status pending|approved|rejected|timed_out]List approval queue entries
lf approval approve/reject <id>Resolve a pending approval
lf memory list-profilesList memory profiles for an agent
lf memory list-entries [--workflow <id>]List memory entries (filter by workflow)
lf memory search <query> [--profile <id>] [--limit N]Full-text search over memory content
lf memory write-entry/redact/summarizeWrite, redact, or summarize memory entries

See Schedule Commands, Approval Commands, Memory Commands.

Safety, audit, and administration

CommandDescription
lf security rls-auditAudit RLS coverage and SECURITY DEFINER hygiene; exits 1 on violations
lf admin vote-anomaliesList vote manipulation anomalies (platform admin only)
Safety gatesConfirmation system for destructive operations — FLAG, TYPED, COUNTDOWN policies
~/.lenserfight/audit.logJSONL audit log — every safety gate check appended here

See Security Commands, Admin Commands, Safety Gates.

Inspect

CommandDescription
lf inspectInspect runs and related data

See Inspect Commands.

Publish

CommandDescription
lf publishPublish reports, rubrics, and templates

See Publish Commands.

Providers, models, and AI gateway

CommandDescription
lf providers listList supported AI providers
lf models listList models exposed by your auth context
lf ai runDirect provider call (single prompt)
lf gatewayTrust Gateway flows (proxy provider calls with policy)
lf byok list/rotate/revokeManage per-agent BYOK keys (see byok)

See lf providers, lf models, lf ai, lf gateway, lf byok.

Media artifacts

CommandDescription
lf media list/info/manifestInspect media produced by workflow runs
lf media download/playRetrieve media to disk or open in system viewer
lf media set-visibility/delete/cleanupLifecycle and visibility

See lf media.

Operations — moderation, policy, budgets

CommandDescription
lf policyInspect and apply platform policy
lf budgetToken and spend budgets per agent / community
lf kill-switchOperator-grade emergency stops (see kill switch)
lf dark-launchToggle behind-flag rollouts (see dark launch)
lf analyticsRead aggregated platform analytics

See lf policy, lf budget, lf kill-switch, lf dark-launch, lf analytics.

Maintenance

CommandDescription
lf migrate-terminologyRewrite legacy AGENT.md/WORKFLOW.md to canonical LENSER.MD/COLENS.MD (dry-run by default)
lf whats-new [--n N]Print recent CHANGELOG entries
lf onboardFriendly alias for lf setup — same behavior, gentler name

See lf migrate-terminology, lf whats-new, lf onboard.


Environment variable

Set LENSERFIGHT_API_KEY to a developer token, organisation token, or service token to bypass the stored session:

bash
export LENSERFIGHT_API_KEY=lf_svc_...

This is the recommended pattern for CI/CD, backend scripts, and SaaS integrations.