Skip to content

Referência de Comandos

Referência completa dos comandos do Lumo CLI. Use lumo <comando> --help para a ajuda detalhada de qualquer um: a tabela abaixo lista o que existe, o --help explica cada flag em detalhe.

TIP

Termos como tipo de carga (--context), mesa, rascunho/publicado e star schema estão explicados na página de Conceitos.

TIP

A maioria dos comandos aceita referências no formato tipo:id - por exemplo: flow:42, table:23913, app:7, credential:539. Nunca passe um número avulso; sempre inclua o prefixo do tipo.


Por onde começar

A tabela de comandos é exaustiva e ordenada alfabeticamente, o que é ótimo para procurar e péssimo para aprender. Esta seção dá a ordem em que os comandos costumam aparecer no trabalho real. Ela não repete o que cada comando faz nem quais flags ele aceita: isso está na tabela, gerada do próprio código.

1. Entrar. lumo auth login, depois lumo tenants list para achar o tenant e lumo init <tenant-id> para criar o workspace no diretório atual. lumo auth status confirma a sessão.

2. Olhar antes de mexer. lumo status mostra o que mudou localmente. lumo list <tipo> enumera recursos, lumo info <tipo>:<id> abre um, lumo columns table:<id> mostra as colunas de uma tabela DW e lumo diff <tipo>:<id> mostra a mudança pendente. Todos são de leitura e seguros para repetir.

3. Sincronizar. lumo fetch verifica o servidor sem tocar nos seus arquivos; lumo pull traz as mudanças para eles; lumo push envia as suas. lumo lint valida o YAML contra o schema, e o push já roda o lint sozinho antes de enviar.

4. Criar e remover. lumo new <tipo> cria um recurso novo; lumo rm <tipo>:<id> remove.

5. Clonar, editar, publicar. Recurso publicado é somente leitura. O ciclo é sempre clone (vira rascunho seu) → editar → publish (volta a ser compartilhado). Vale para flows (lumo flow clone / lumo flow publish, numa mesa de dados) e para apps (lumo app clone / lumo app publish, numa mesa de aplicação).

WARNING

Publicar é uma decisão humana. Um recurso publicado fica somente leitura e é compartilhado com outros usuários. Construa e itere como rascunho; publique apenas quando o trabalho estiver pronto.

6. Executar. lumo flow run dispara um flow publicado; lumo flow run-node executa um nó isolado de um rascunho. lumo flow status e lumo flow logs acompanham, lumo flow cancel interrompe. Do outro lado, lumo schedule run / pause / resume controla o agendamento, e lumo agent restart o agente.

7. Variáveis. lumo variables list / get / set / unset mexem no workspace local; lumo push variables envia ao servidor.


Todos os comandos

Tabela completa, gerada a partir do Use, do Short e das flags de cada comando cobra em cmd/lumo/*.go, na main do lumo-cli. É a única lista de comandos desta documentação: não existe uma segunda tabela escrita à mão para divergir dela.

ComandoDescriçãoFlags
lumo agentAgent management & investigation: link, restart, migrate, events, health-
lumo agent events <agent:id>List problem schedule-events for an agent (missed/late/error/crashed)--status
lumo agent health <agent:id>Show the agent's 24h health pulse (uptime, memory, jobs, queue, timeline)--range --full --mac
lumo agent linkLink an external agent to this tenant via its token--token --name
lumo agent migrateBulk-rebind flows and credentials to another agent--flows --credentials --to-agent --force
lumo agent restart <agent:id>Force a remote agent to restart-
lumo appBI app operations: query, export, open-
lumo app change-table <app:id>Swap a table reference inside an app to a compatible one--from-table --to-table --dry-run --force
lumo app clone <app:id>Clone an app under a new name--name
lumo app dashboard-preview <app:id>Run each widget's query and return data + visual JSON (no PNG render)--dashboard --widget --filter --limit --sql-only --debug-sql
lumo app export <app:id>Export a dashboard as PNG/PDF/SVG--dashboard --image-format --output --dark-theme --landscape
lumo app export-widget <app:id>Export a single widget as PNG--dashboard --widget --image-format --output --dark-theme
lumo app open <app:id>Open the app in the browser (or print the URL)--no-browser
lumo app publish <app:id>Publish an app to a desk (drift-protected via If-Match)--desk --new
lumo app query <app:id>Run a BI engine query against an app--fields --filter --order-by --limit --sql-only
lumo authAuthentication commands-
lumo auth loginLog in to Horus BI--email --password --otp --local
lumo auth logoutLog out and clear stored credentials-
lumo auth statusShow current authentication status-
lumo backupSnapshot the local workspace as a tar.gz--output --exclude-state
lumo columns <table:id>List the columns of a DW table-
lumo credentialCredential operations: test, query, schema, transfer-
lumo credential query <credential:id>Run an ad-hoc SQL query against the source--sql --limit --timeout
lumo credential schema <credential:id>List schemas / tables / columns visible through this credential--schema --timeout
lumo credential test <credential:id>Test connectivity to the source via its agent-
lumo credential transfer <credential:id>Rebind the credential to a different agent--to-agent
lumo diff <resource>Show diff between WORKING / STATE / SERVER--include-remote --field
lumo fetch [resource...]Refresh STATE from the server (does not modify WORKING)--parallel --full
lumo flowImperative flow operations: clone, publish, run, node-level execution-
lumo flow cancelCancel a running flow execution--execution --force
lumo flow clone <flow:id>Clone a flow under a new name--name --dry-run
lumo flow export-node <flow:id>Export a node's output as a downloadable artifact--node
lumo flow force-batchDispatch a batch of flows in dependency order (a template apply's reloadPlan)--from-reload-plan
lumo flow logs <flow:id>Show execution history for a flow-
lumo flow nodes <flow:id>List nodes of a flow (internalId + kind + description) for run-node lookup--type
lumo flow preview-node <flow:id>Preview a node's output rows without writing--node
lumo flow publish <flow:id>Publish a flow to a desk (drift-protected via If-Match)--desk --new --copy-data --dry-run
lumo flow run <flow:id>Trigger a flow execution--wait --context --temporal-days
lumo flow run-node <flow:id>Execute a single node (write side-effects)--node --wait
lumo flow status <flow:id>Show runtime status for a flow (running / idle / queued)-
lumo flow sync-table <flow:id>Create or sync a flow's DW table from its InsertDatawarehouse node--node --name
lumo info <flow|table|app|credential|dw-desk|bi-desk|schedule|agent>:<id>Show read-only metadata and runtime status for a resource--full --dependents --field
lumo init <tenant-id> [<dir>]Bootstrap a workspace for a Horus BI tenant--recover --fetch-only
lumo lint [file...]Validate dual-document YAML files against the v2 schemas--strict
lumo list <kind>List resources of a kind (flow, table, app, credential, dw-desk, bi-desk, schedule, agent, variables)--search --desk --remote --limit --offset
lumo log [resource]Show audit log of sync operations--count --limit --since --operation --errors
lumo new <flow|table|app|credential|schedule|dw-desk|bi-desk>Create a new resource on the server (eager: server-first → STATE → WORKING)-
lumo new appCreate a new BI application--name --table
lumo new bi-deskCreate a new application desk (publish target for apps)--name
lumo new credentialCreate a new HEC credential--name --type
lumo new dw-deskCreate a new data desk (publish target for flows / tables)--name
lumo new flowCreate a new flow--name --load-type
lumo new scheduleCreate a new schedule--name --cron
lumo new tableCreate a new DW table - must combine --from-flow + --node (workflow C)--name --from-flow --node --from-node
lumo pull [resource...]Refresh STATE then overwrite WORKING with the cached payload--discard-local --no-fetch --parallel --dry-run
lumo push [resource...]Save local edits to the server--dry-run --no-lint --parallel --continue-on-error --force-ours --i-know-what-im-doing --force-recreate
lumo rm <flow|table|app|credential|schedule|dw-desk|bi-desk|agent>:<id>Delete a resource on the server and locally--force --yes --cascade --dry-run
lumo scaffold [<kind> [<variant>]]Print embedded YAML reference + examples for any Lumo kind--variant
lumo scaffold lsFlat list of every embedded scaffold (kind.variant - tagline)-
lumo scheduleSchedule operations: run, pause, resume, logs-
lumo schedule logs <schedule:id>List recent trigger executions for a schedule--since --tail
lumo schedule pause <schedule:id>Pause a schedule (sets ativo=false)-
lumo schedule resume <schedule:id>Resume a schedule (sets ativo=true)-
lumo schedule run <schedule:id>Trigger a schedule one-shot-
lumo statusShow local-modified, deleted, and untracked resources--summary --filter
lumo tableTable operations: truncate, preview-
lumo table clone <table:id>(not supported) - clone the FLOW that owns the table instead-
lumo table preview <table:id>Preview rows from the DW table--limit
lumo table truncate <table:id>Remove all rows from the DW table (schema preserved)--force --yes --dry-run
lumo tenantsTenant discovery-
lumo tenants listList tenants available to the authenticated user-
lumo updateAtualiza o lumo para a última versão (binário + skills)--check
lumo variablesTenant variable operations: list, get, set, unset-
lumo variables get <key>Read one variable by key--remote
lumo variables listList all tenant variables--remote
lumo variables set <key>=<value>Create or update a tenant variable--from-stdin
lumo variables unset <key>Remove a tenant variable-
lumo versionPrint build information-

Códigos de Saída

Retirados de cmd/lumo/errors.go e dos pontos onde o CLI de fato os retorna.

ExitSignificadoPrimeira ação
0Sucesso (inclui "nada a fazer" e "sem diff")-
1Erro genérico. O lumo diff também usa 1 no sentido Unix: "há diff"Leia a mensagem em stderr. Vindo do diff, é resultado, não erro
2Erro de usoLeia lumo <cmd> --help
3Servidor mudou desde sua última sincronizaçãolumo diff <r> e escolha pull / merge / --force-ours
4Conflito local + servidorMesclagem manual
5Recurso não encontradoVerifique tipo:id; talvez lumo fetch
6Problema de auth/acessolumo auth login; se o acesso mudou, re-execute lumo init <tenant-id>
7Rede/timeout, retriávelExecute novamente o mesmo comando
8Lint/schema falhouLeia o caminho; corrija o YAML
9Validação do servidor falhouLeia a mensagem; comum: FLOW_READONLY (clone primeiro), SCHEDULE_UNPUBLISHED_FLOW
10Servidor 5xxTransitório. Tente uma vez; se persistir, pare e reporte
11Workspace já inicializado no diretório, ou vinculado a outro tenant. Só o lumo init retorna este códigolumo init <tenant-id> --recover para reaproveitar o .lumo/ que já está lá, ou escolha outro diretório
12Recurso ainda não sincronizado localmentelumo fetch <r> primeiro
13rm bloqueado por dependênciasExecute com --cascade ou remova os dependentes primeiro
14Pré-condição (If-Match) falhoulumo fetch, re-edite e faça push novamente
15Aplicação parcial: o servidor ignorou ao menos 1 campoWorkspace já auto-corrigido; leia o diff no stdout e corrija a causa raiz
20lumo update precisa de privilégioExecute a ação que o comando imprime (ex.: sudo lumo update)
21lumo update falhou (rede/checksum/IO)Tente novamente; se persistir, verifique a conectividade

NOTE

São seguros para retry: comandos de leitura (status, info, list, columns, diff, log, fetch). Não são seguros para retry cego: imperativos (new, push, clone, publish, run, rm, truncate). O estado pode ter mudado, resolva antes de tentar novamente.


Flags Globais

Valem para qualquer comando. Geradas de root.PersistentFlags() em cmd/lumo/root.go.

FlagDescrição
--debugverbose debug output to stderr
--formatoutput format: text | json | yaml (yaml is honored by info and diff; other commands fall back to text or json)
--no-colordisable colored output
--no-inputdisable interactive prompts
--serverAPI base URL (overrides workspace.json)
--workspaceworkspace path (default: walk up from PWD)

Além destas, o cobra adiciona --help (-h) a todo comando.