AgentBlazor Docs

Advanced CLI

Use the CLI only when manual setup is not enough.

The package-first path is the default. The CLI is for scaffold help on an existing app.

Install or update

dotnet tool install --global AgentBlazor.Cli --version 0.1.0-preview.11
dotnet tool update --global AgentBlazor.Cli --version 0.1.0-preview.11

Standard run order

agentblazor init ./MySolution.slnx --host MyBlazorApp
agentblazor scaffold ./MySolution.slnx --host MyBlazorApp --provider openai --diff
agentblazor scaffold ./MySolution.slnx --host MyBlazorApp --provider openai --approve
dotnet restore ./MySolution.slnx --force-evaluate
dotnet build ./MySolution.slnx --no-restore -nologo
agentblazor doctor ./MySolution.slnx --host MyBlazorApp
agentblazor validate ./MySolution.slnx --host MyBlazorApp

What to pass as the target

  • Use .sln or .slnx when the app lives in a larger solution.
  • Use .csproj when you want to point directly at the host project.
  • Use --host when a solution contains more than one project candidate.
  • For hosted WebAssembly, target the server host project.

Provider flags

agentblazor scaffold ./MySolution.slnx --host MyBlazorApp --provider openai
agentblazor scaffold ./MySolution.slnx --host MyBlazorApp --provider azure-openai
agentblazor scaffold ./MySolution.slnx --host MyBlazorApp --provider ollama

What scaffold --diff should tell you

  • Which packages will be added.
  • Which startup and shell files will be touched.
  • Whether the host stays automatic or review-first.
  • What still needs manual follow-through.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.