跳转到内容

GTC CLI Overview

The GTC CLI (gtc) is the primary command-line interface for the Greentic platform. It provides commands for:

  • Creating and managing bundles
  • Setting up extensions and runtime configuration
  • Running the runtime server
  • Installing and checking delegated Greentic tools
  • Delegating development operations to greentic-dev
Terminal window
cargo install cargo-binstall
cargo binstall gtc
gtc install
gtc doctor

cargo binstall gtc is the recommended install path. It installs the thin gtc router, and gtc install installs the companion binaries that the router delegates to. Do not install greentic-cli or individual companion crates directly for normal use; use gtc install so the toolchain stays consistent.

Verify installation:

Terminal window
gtc --version
gtc doctor

The gtc binary is a thin router. It owns the top-level UX, then delegates most work to companion binaries installed by gtc install:

CommandSource RepoPurpose
gtc installgtc toolchain installerInstall/update delegated Greentic binaries
gtc updategtc toolchain installerForce-update companion binaries to the latest compatible release
gtc doctorgtcVerify delegated binaries are available
gtc versiongtcPrint router and toolchain version information
gtc wizardgreentic-devBundle creation wizard
gtc setupgreentic-setupExtension setup, credentials, and configuration
gtc startgreentic-startRuntime server
gtc stopgreentic-start / deployer handoffStop a local runtime or destroy a deployed environment
gtc add-admingtcRegister an admin client certificate identity for a local bundle
gtc remove-admingtcRemove an admin client certificate identity for a local bundle
gtc admingreentic + greentic-deployer + greentic-startAdmin access, health, status, and runtime control
gtc devgreentic-devDeveloper tooling, including pack, flow, component, MCP, GUI, secrets, and coverage passthroughs
gtc opgreentic-operatorOperator tooling
gtc docsgtc docs helperGenerated schema documentation maintenance

gtc itself is intentionally small. Install it with cargo binstall gtc, then run gtc install to install or update the companion binaries behind those subcommands.

Terminal window
gtc [OPTIONS] <COMMAND>
Options:
-h, --help Print help
-V, --version Print version
--locale <BCP47> UI locale for gtc help/output
--debug-router Print resolved binary and args before exec
CommandDescription
versionPrint version and toolchain release information
doctorVerify that required delegated binaries are available
installInstall or update delegated Greentic tool binaries
updateForce-update companion binaries
add-adminRegister an admin client certificate identity for a local bundle
remove-adminRemove an admin client certificate identity for a local bundle
wizardCreate a new bundle from wizard answers
setupConfigure extensions and runtime settings in a bundle
startStart the runtime server
stopStop a runtime or destroy a deployed environment
adminInspect and use the runtime admin API
devPass through to developer tools, including pack and flow operations
opPass through to operator tooling
docsDocumentation and generated-schema helpers
Terminal window
# 1. Inspect the JSON answer schema
gtc wizard --schema
# 2. Validate and apply JSON wizard answers
gtc wizard validate --answers wizard-answers.json
gtc wizard apply --answers wizard-answers.json --yes
# 3. Setup extensions and runtime configuration
gtc setup ./my-bundle
# 4. Start the runtime
gtc start ./my-bundle

gtc wizard uses JSON answer files. Coding agents can inspect gtc wizard --schema, generate an answers file, validate it, then apply it non-interactively.

Terminal window
# Install or repair companion binaries
gtc install
# Preview the install plan
gtc install --dry-run
# Pin a controlled release or manifest
gtc install --release 1.0.15
gtc install --manifest ./greentic-toolchain.json
# Force-update companion binaries to the latest compatible release
gtc update
Terminal window
# Validate flows
gtc dev flow doctor ./my-bundle/apps/my-app/flows/
# Build a pack
gtc dev pack build --in ./my-pack/
# Start with verbose logging
gtc start ./my-bundle --verbose
# Start with ngrok tunnel
gtc start ./my-bundle --ngrok on
Terminal window
# 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 can use a configuration file (greentic.toml):

greentic.toml
[runtime]
host = "0.0.0.0"
port = 8080
[logging]
level = "info"
format = "json"
[telemetry]
enabled = true
otlp_endpoint = "http://localhost:4317"
VariableDescriptionDefault
GREENTIC_LOG_LEVELLog verbosityinfo
GREENTIC_CONFIGConfig file pathgreentic.toml
GREENTIC_REDIS_URLRedis URLredis://localhost:6379
CodeMeaning
0Success
1General error
2Configuration error
3Runtime error
4Validation error
Terminal window
# General help
gtc --help
gtc install --help
gtc doctor
# Command-specific help
gtc wizard --help
gtc setup --help
gtc start --help
gtc admin --help