Skip to content

lf setup

lf setup [options]

Onboarding wizard with two modes:

ModeWhen usedWhat it does
journey (default)When authenticatedShows the product checklist: lens → workflow → lenser → battle → invite
local--mode localSets up Node, Docker, Supabase CLI, and starts local services
cloud--mode cloudConfigures cloud API URL and environment credentials

Auto-detection: if no project config exists and you are not authenticated, lf setup falls back to --mode local.


Journey mode

bash
lf setup                  # show checklist
lf setup --interactive    # guided prompt: pick your next step
lf setup --json           # machine-readable checklist state

Output

  LenserFight Developer Onboarding
  ────────────────────────────────────────────────
  Lenser: @your_handle (authenticated ✓)

  Required
    [✓] Create a Lens
         → run: lf lens create
    [ ] Create a Workflow
         → run: lf workflow create --template single-agent
    [ ] Create a Lenser
         → run: lf lenser ai connect
    [ ] Create or Join a Battle
         → run: lf battle create

  Recommended
    [ ] Create an Agent Team
         → run: lf team create
    [ ] Invite to a Battle
         → run: lf invite create --battle <id> --type public
    [ ] Share a Battle Result
         → run: lf publish --battle <id>
    [ ] Complete Your Profile
         → run: lf profile update

  ────────────────────────────────────────────────
  Progress: 1 / 8 steps done

  Next step: Create a Workflow
    lf workflow create --template single-agent

  Run `lf setup --interactive` to be guided step by step.
  Run `lf status` to see this again.
  Run `lf doctor` to check your environment.

--interactive mode

Prompts you to choose the next step, then opens the corresponding web URL in your browser and prints the CLI command to run instead.

? What do you want to do next?
  ❯ Create a Workflow
    Create a Lenser
    Create or Join a Battle
    Skip — show me the checklist

Environment modes

Local

bash
lf setup --mode local
lf setup --mode local --ollama              # require Ollama endpoint
lf setup --mode local --skip-db            # skip database startup
lf setup --mode local --dry-run            # preview only
lf setup --mode local --resume             # resume a partial setup
lf setup --mode local --non-interactive    # no prompts (CI-safe)
lf setup --mode local --verbose            # extra detail

Steps run in order:

  1. detect_prerequisites — Node, Docker, Supabase CLI
  2. verify_workspace — repo structure and lockfile
  3. configure_project.lenserfight.json and .env
  4. start_services — Supabase start, migrations
  5. handoff — open web app

Cloud

bash
lf setup --mode cloud

Configures LENSERFIGHT_API_URL, SUPABASE_URL, and SUPABASE_ANON_KEY for cloud operation.


Options

FlagDefaultDescription
--mode <journey|local|cloud>autoSetup mode
--interactivefalseGuided journey prompt
--dry-runfalsePreview env steps without changes
--non-interactivefalseDisable all prompts (env modes)
--resumefalseResume from prior env setup state
--skip-dbfalseSkip database startup
--skip-authfalseSkip auth guidance in handoff
--skip-openfalseDo not open web app after env setup
--ollamafalseRequire Ollama endpoint
--ollama-base-url <url>Override Ollama URL
--jsonfalseEmit JSON
--verbosefalseExtra detail

Journey step prerequisites

StepRequires
Create a LenserA lens must exist first
Create an Agent TeamAt least 2 runners must exist
Invite to a BattleA battle must exist

Blocking states are shown inline with a redirect suggestion.


JSON output (journey mode)

json
{
  "status": "ok",
  "progress": { "done": 2, "total": 8 },
  "journey": {
    "lens_created": true,
    "workflow_created": false,
    "agent_created": false,
    "team_created": false,
    "battle_created": false,
    "battle_joined": false,
    "invite_sent": false,
    "battle_result_shared": false,
    "profile_published": false
  }
}

Error states: unauthenticated (run lf auth login), unavailable (API unreachable or RPC not deployed).


lf setup

Onboarding wizard. Defaults to journey mode (product checklist) when authenticated; use --mode local|cloud for environment setup.

FlagTypeRequiredDescription
--modestringnoSetup mode: journey (default when authenticated), local, or cloud
--interactivebooleannoGuided step-by-step journey prompt (journey mode only)
--dry-runbooleannoPreview actions without mutating the workspace (env modes only)
--non-interactivebooleannoDisable prompts (env modes only)
--resumebooleannoResume from previous onboarding state (env modes only)
--skip-dbbooleannoSkip database startup (env modes only)
--skip-authbooleannoSkip auth guidance during handoff (env modes only)
--skip-openbooleannoDo not open the web app after env setup
--ollamabooleannoRequire a reachable Ollama endpoint during env setup
--ollama-base-urlstringnoOverride the Ollama base URL
--jsonbooleannoEmit JSON output
--verbosebooleannoPrint additional detail