Skip to content

First run: without an agentlab.yaml, configure and up ask one question — use the detected defaults or customize? — and only Customize runs the form #125

Description

@teemow

Part of #119.

Problem

A first agentlab up (or agentlab configure without --defaults) on a terminal runs the whole form — cluster name, users and passwords, components, ports, models — before anything happens. configure --defaults writes the right lab for nearly everyone (the platform with agents, observability and Backstage on; the discovery fills in this machine's free ports and host model servers), but a newcomer does not know the flag and up never offers it: loadOrCreateConfig in main.go goes straight to forms.Run.

Proposed solution

With no agentlab.yaml, on a terminal, both agentlab configure (without --defaults) and every command that creates the config on the way (up foremost — loadOrCreateConfig serves them all) run the discovery and print its report as today, then ask one huh confirm — along the lines of "No agentlab.yaml yet. Use the detected defaults — the agent platform with agents, observability and Backstage, three users, the free ports above — or customize every option?" Affirmative Use the defaults: what configure --defaults does (Validate, Save, the saved-configuration summary configure prints, with agentlab configure named as the way to change it later). Negative Customize: the form, as today.

Unchanged: configure --defaults and the component flags pin without a question; configure on an existing agentlab.yaml runs the form with the current values; off a terminal a missing agentlab.yaml is refused with the configure --defaults pointer — CI and coding agents write the config explicitly, and keep doing so.

The question names the components, so "defaults" means something without opening the docs.

Acceptance criteria

  • In an empty directory on a terminal, agentlab up prints the discovery, asks the one question, and after Use the defaults continues into the boot with the canonical lab saved; after Customize the form runs as today.
  • agentlab configure without flags in an empty directory asks the same question; with --defaults it asks nothing.
  • With stdin not a terminal, a missing agentlab.yaml is refused with the configure --defaults pointer as today.
  • A scripted-keystroke test covers both answers.
  • docs/getting-started.md's quick start shows agentlab up as the first command and configure as the way to customize.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions