Dazzle

Estágios em nuvem para agentes de IA — ambientes de navegador isolados que renderizam e transmitem seu conteúdo para Twitch, Kick, Restream e RTMP personalizado.

Documentação

dazzle

O CLI oficial e servidor MCP para Dazzle — stages em nuvem para agentes de IA e transmissão ao vivo.

Um único binário, duas interfaces:

  • CLI — acesso completo ao shell para agentes de codificação (Claude Code, Cursor, terminais) e automação
  • Servidor MCP (dazzle mcp) — integração stdio para clientes em sandbox (Claude Desktop, VS Code, qualquer host MCP)

Dazzle CLI demo

Instalação

macOS / Linux

curl -sSL https://dazzle.fm/install.sh | sh

Windows (PowerShell)

irm https://dazzle.fm/install.ps1 | iex

Outras opções

go install github.com/dazzle-labs/cli/cmd/dazzle@latest

Binários pré-compilados para macOS (arm64/amd64), Linux (amd64/arm64) e Windows (amd64/arm64) estão na página de releases.

Início Rápido (CLI)

dazzle login                              # authenticate (opens browser)
dazzle stage create my-stage              # create a stage
dazzle stage up                           # activate — starts streaming
dazzle stage sync ./my-app --watch        # push content, auto-refresh on changes
dazzle stage screenshot -o preview.png    # verify output
dazzle destination add                    # add Twitch/Kick/custom RTMP
dazzle destination attach my-destination  # go live

Início Rápido (MCP)

Adicione à configuração do seu cliente MCP:

{
  "mcpServers": {
    "dazzle": {
      "command": "dazzle",
      "args": ["mcp"]
    }
  }
}

O servidor MCP inicia sem credenciais — agentes podem chamar guide para conhecer a plataforma e cli ["login"] para autenticar.

Ferramentas MCP

FerramentaDescrição
cliExecuta um comando CLI do dazzle. Use ["--help"] para descobrir comandos disponíveis. A saída é JSON.
edit_fileEdita um arquivo no workspace do stage por substituição exata de string. O old_string deve corresponder exatamente uma vez no arquivo. Use read_file primeiro para ver o conteúdo atual.
guideObtém a referência completa do Dazzle — primeiros passos, comandos CLI, capacidades de conteúdo e configuração de streaming. Leia isto antes de criar ou modificar conteúdo do stage.
list_filesLista todos os arquivos no workspace do stage (~/.dazzle/stages/{stage}/). Retorna caminhos relativos, um por linha.
read_fileLê um arquivo do workspace do stage (~/.dazzle/stages/{stage}/{path}).
screenshotCaptura uma captura de tela da saída atual do navegador do stage. Retorna uma imagem PNG.
syncSincroniza o workspace do stage (~/.dazzle/stages/{stage}/) com o stage ao vivo. Execute após escrever arquivos para enviar conteúdo. Equivalente a 'dazzle stage sync {workspace-dir}'.
write_fileEscreve um arquivo no workspace do stage (~/.dazzle/stages/{stage}/{path}). Cria diretórios pai conforme necessário. Use isto para construir conteúdo que pode então ser sincronizado com o stage.

Ferramentas de workspace

As ferramentas de workspace (write_file, read_file, edit_file, list_files, sync) armazenam arquivos em ~/.dazzle/stages/{stage-id}/ no sistema de arquivos do host. Isso faz a ponte entre ambientes em sandbox (ex.: Claude Desktop) onde o bash do agente roda em um contêiner isolado e não pode compartilhar arquivos com o processo CLI.

Fluxo de trabalho: write_file → edit_file (iterar) → sync → screenshot (verificar)

Limitações: Sem shell/exec — não é possível executar ferramentas de build (npm, tailwind, etc.) no workspace. O conteúdo deve ser HTML/CSS/JS pré-construído. Agentes com acesso completo ao sistema de arquivos e shell (ex.: Claude Code) devem usar dazzle stage sync diretamente para a experiência completa.

Recursos MCP

URIDescrição
https://dazzle.fm/llms-full.txtReferência completa do Dazzle — primeiros passos, ajuda do CLI e guia de criação de conteúdo.
https://dazzle.fm/llms.txtGuia de início rápido do Dazzle — visão geral da plataforma, configuração, fundamentos do CLI e links de documentação.

CLI vs MCP — qual usar?

CLIMCP
Melhor paraAgentes de codificação, terminais, CI/CDClaude Desktop, VS Code, clientes em sandbox
Sistema de arquivosAcesso completo — escreva em qualquer lugar, execute ferramentas de buildSomente workspace (~/.dazzle/stages/{id}/)
ShellSim — npm, tailwind, qualquer toolchainNão — somente conteúdo pré-construído
Sincronização de conteúdodazzle stage sync ./dirwrite_file + sync
Captura de teladazzle stage screenshot -o file.pngFerramenta screenshot (retorna JPEG)
Autenticaçãodazzle login ou DAZZLE_API_KEYcli ["login"] via MCP

Referência do CLI

Usage: dazzle <command> [flags]

Dazzle — cloud stages for streaming.

A stage is a cloud browser environment that renders and streams your content.
Sync a local directory (must contain an index.html) and everything visible in
the browser window is what gets streamed to viewers.

Your content runs in a real browser with full access to standard web APIs (DOM,
Canvas, WebGL, Web Audio, fetch, etc.). localStorage is persisted across stage
restarts — use it to store app state that should survive between sessions.

Workflow:
 1. dazzle login # authenticate (one-time)
 2. dazzle s new my-stage # create a stage
 3. dazzle s up # bring it up — starts streaming to Dazzle
 4. dazzle s sync ./my-app -w # sync + auto-refresh on changes
 5. dazzle s ss -o preview.png # take a screenshot to verify
 6. dazzle s down # stop streaming and shut down

Auth: dazzle login, or set DAZZLE_API_KEY for headless/CI use. Stage selection:
use -s <name>, DAZZLE_STAGE env, or auto-selected if only one.

https://dazzle.fm

Flags:
  -h, --help              Show context-sensitive help.
  -j, --json              Output as JSON.
  -s, --stage=STRING      Stage name or ID ($DAZZLE_STAGE).
      --api-url=STRING    API URL ($DAZZLE_API_URL).

Commands:
  version                          Print version information.
  update                           Update dazzle to the latest release.
  guide                            Show content authoring guide (rendering tips,
                                   performance, best practices).
  login                            Authenticate with Dazzle (opens browser).
  logout                           Clear stored credentials.
  whoami                           Show current user.
  stage (s) list (ls)              List stages.
  stage (s) create (new)           Create a stage.
  stage (s) delete (rm)            Delete a stage.
  stage (s) up                     Activate a stage.
  stage (s) down                   Deactivate a stage.
  stage (s) status (st)            Show stage status.
  stage (s) stats                  Show live pipeline stats.
  stage (s) preview                Show the shareable preview URL for a running
                                   stage.
  stage (s) sync (sy)              Sync a local directory to the stage. This is
                                   the primary way to push content — use --watch
                                   for live development.
  stage (s) refresh (r)            Reload the stage entry point.
  stage (s) event (ev) emit (e)    Push a named event with JSON data to
                                   the running page — dispatched as a DOM
                                   CustomEvent. Use this to send real-time data
                                   from external processes (other agents, APIs,
                                   etc.) without re-syncing or reloading.
  stage (s) logs (l)               Retrieve stage console logs.
  stage (s) screenshot (ss)        Capture a screenshot of the stage.
  stage (s) info                   Get current stream title and category.
  stage (s) title                  Set the stream title (not supported for
                                   Restream).
  stage (s) category               Set the stream category or game (not
                                   supported for Restream).
  stage (s) chat send              Send a message to live chat (not supported
                                   for Restream).
  destination (dest) list (ls)     List broadcast destinations.
  destination (dest) add (create,new)
                                   Add a broadcast destination.
  destination (dest) delete (rm)
                                   Remove a broadcast destination.
  destination (dest) attach (set)
                                   Attach a destination to a stage.
  destination (dest) detach (unset)
                                   Detach a destination from a stage.

Run "dazzle <command> --help" for more information on a command.
Subcomandos de stage
Usage: dazzle stage (s) <command> [flags]

Manage stages — create, sync content, screenshot, stream.

Flags:
  -h, --help              Show context-sensitive help.
  -j, --json              Output as JSON.
  -s, --stage=STRING      Stage name or ID ($DAZZLE_STAGE).
      --api-url=STRING    API URL ($DAZZLE_API_URL).

Commands:
  stage (s) list (ls)              List stages.
  stage (s) create (new)           Create a stage.
  stage (s) delete (rm)            Delete a stage.
  stage (s) up                     Activate a stage.
  stage (s) down                   Deactivate a stage.
  stage (s) status (st)            Show stage status.
  stage (s) stats                  Show live pipeline stats.
  stage (s) preview                Show the shareable preview URL for a running
                                   stage.
  stage (s) sync (sy)              Sync a local directory to the stage. This is
                                   the primary way to push content — use --watch
                                   for live development.
  stage (s) refresh (r)            Reload the stage entry point.
  stage (s) event (ev) emit (e)    Push a named event with JSON data to
                                   the running page — dispatched as a DOM
                                   CustomEvent. Use this to send real-time data
                                   from external processes (other agents, APIs,
                                   etc.) without re-syncing or reloading.
  stage (s) logs (l)               Retrieve stage console logs.
  stage (s) screenshot (ss)        Capture a screenshot of the stage.
  stage (s) info                   Get current stream title and category.
  stage (s) title                  Set the stream title (not supported for
                                   Restream).
  stage (s) category               Set the stream category or game (not
                                   supported for Restream).
  stage (s) chat send              Send a message to live chat (not supported
                                   for Restream).

Flags de stage sync

Usage: dazzle stage (s) sync (sy) <dir> [flags]

Sync a local directory to the stage. This is the primary way to push content —
use --watch for live development.

Arguments:
  <dir>    Local directory to sync (must contain an index.html entry point).

Flags:
  -h, --help                  Show context-sensitive help.
  -j, --json                  Output as JSON.
  -s, --stage=STRING          Stage name or ID ($DAZZLE_STAGE).
      --api-url=STRING        API URL ($DAZZLE_API_URL).

  -w, --watch                 Watch for file changes and automatically re-sync.
      --entry="index.html"    HTML entry point file (default: index.html).

Flags de stage screenshot

Usage: dazzle stage (s) screenshot (ss) [flags]

Capture a screenshot of the stage.

Flags:
  -h, --help              Show context-sensitive help.
  -j, --json              Output as JSON.
  -s, --stage=STRING      Stage name or ID ($DAZZLE_STAGE).
      --api-url=STRING    API URL ($DAZZLE_API_URL).

  -o, --out=STRING        Output file path (default: temp file).

Subcomandos de stage event

Usage: dazzle stage (s) event (ev) <command>

Send real-time data to the running page without reloading. Events are dispatched
as DOM CustomEvents — use this for async updates from subagents, APIs, or other
processes.

Flags:
  -h, --help              Show context-sensitive help.
  -j, --json              Output as JSON.
  -s, --stage=STRING      Stage name or ID ($DAZZLE_STAGE).
      --api-url=STRING    API URL ($DAZZLE_API_URL).

Commands:
  stage (s) event (ev) emit (e)    Push a named event with JSON data to
                                   the running page — dispatched as a DOM
                                   CustomEvent. Use this to send real-time data
                                   from external processes (other agents, APIs,
                                   etc.) without re-syncing or reloading.
Subcomandos de destino
Usage: dazzle destination (dest) <command> [flags]

Manage broadcast destinations (Twitch, YouTube, etc).

Flags:
  -h, --help              Show context-sensitive help.
  -j, --json              Output as JSON.
  -s, --stage=STRING      Stage name or ID ($DAZZLE_STAGE).
      --api-url=STRING    API URL ($DAZZLE_API_URL).

Commands:
  destination (dest) list (ls)    List broadcast destinations.
  destination (dest) add (create,new)
                                  Add a broadcast destination.
  destination (dest) delete (rm)
                                  Remove a broadcast destination.
  destination (dest) attach (set)
                                  Attach a destination to a stage.
  destination (dest) detach (unset)
                                  Detach a destination from a stage.

Resolução de Stage

Para comandos com escopo de stage, o stage é resolvido nesta ordem:

  1. Flag -s / --stage ou variável de ambiente DAZZLE_STAGE
  2. Seleção automática se você tiver exatamente um stage
dazzle stage sync ./app --stage my-stage   # explicit
export DAZZLE_STAGE=my-stage               # or set for your session

Configuração

Variáveis de ambiente (substituem arquivos de configuração e credenciais armazenadas):

VariávelFinalidadePadrão
DAZZLE_API_KEYChave de API — pule dazzle login para CI, scripts, comandos avulsoscredenciais armazenadas
DAZZLE_API_URLURL base da APIhttps://dazzle.fm
DAZZLE_STAGENome ou ID do stageseleção automática se houver apenas um

Arquivos de configuração (permissões ~/.config/dazzle/, 0600):

config.json        # { "api_url": "..." }
credentials.json   # { "api_key": "dzl_...", "email": "..." }

Segurança

  • Chave de API armazenada em ~/.config/dazzle/credentials.json com permissões 0600
  • Transmitida como token Bearer somente via HTTPS
  • Nunca registrada em logs, nunca exibida, nunca enviada a terceiros
  • Sem telemetria — sem dados de uso, relatórios de falha ou analytics
  • Todo o código-fonte é open source e auditável

Licença

Apache 2.0 — veja LICENSE