Ir al contenido

Resumen de GTC CLI

La GTC CLI (gtc) es la interfaz principal de línea de comandos para la plataforma Greentic. Proporciona comandos para:

  • Crear y gestionar bundles
  • Configurar providers
  • Ejecutar el servidor runtime
  • Construir y validar packs/flows
Ventana de terminal
cargo install greentic-cli

Verifica la instalación:

Ventana de terminal
gtc --version

El binario gtc compone subcomandos de múltiples repos:

ComandoRepositorio fuentePropósito
gtc wizardgreentic-devAsistente de creación de bundles
gtc setupgreentic-setupConfiguración de providers
gtc startgreentic-startServidor runtime
gtc packgreentic-packConstrucción de packs
gtc flowgreentic-flowValidación de flows
Ventana de terminal
gtc [OPTIONS] <COMMAND>
Options:
-v, --verbose Enable verbose output
-q, --quiet Suppress non-essential output
--config <PATH> Path to config file
-h, --help Print help
-V, --version Print version
ComandoDescripción
wizardCrear un nuevo bundle a partir de las respuestas del asistente
setupConfigurar providers en un bundle
startIniciar el servidor runtime
packGestión de packs (build, verify, publish)
flowGestión de flows (validate, doctor)
Ventana de terminal
# 1. Create bundle from wizard
gtc wizard --answers wizard-answers.yaml
# 2. Setup providers (interactive)
gtc setup ./my-bundle
# 3. Start the runtime
gtc start ./my-bundle
Ventana de terminal
# Validate flows
gtc flow doctor ./my-bundle/apps/my-app/flows/
# Build a pack
gtc pack build ./my-pack/
# Start with verbose logging
gtc start ./my-bundle --verbose
# Start with ngrok tunnel
gtc start ./my-bundle --ngrok on
Ventana de terminal
# Setup with answers file (non-interactive)
gtc setup --answers production-answers.json ./my-bundle
# Start without tunnels
gtc start ./my-bundle --cloudflared off --ngrok off

GTC puede usar un archivo de configuración (greentic.toml):

greentic.toml
[runtime]
host = "0.0.0.0"
port = 8080
[nats]
enabled = true
url = "nats://localhost:4222"
[logging]
level = "info"
format = "json"
[telemetry]
enabled = true
otlp_endpoint = "http://localhost:4317"
VariableDescripciónValor por defecto
GREENTIC_LOG_LEVELVerbosidad de logsinfo
GREENTIC_CONFIGRuta del archivo de configuracióngreentic.toml
GREENTIC_NATS_URLURL del servidor NATSnats://localhost:4222
GREENTIC_REDIS_URLURL de Redisredis://localhost:6379
CódigoSignificado
0Éxito
1Error general
2Error de configuración
3Error de runtime
4Error de validación
Ventana de terminal
# General help
gtc --help
# Command-specific help
gtc wizard --help
gtc setup --help
gtc start --help