GTC CLI Overview
Introduction
Sección titulada «Introduction»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
Installation
Sección titulada «Installation»cargo install cargo-binstallcargo binstall gtcgtc installgtc doctorgit clone https://github.com/greenticai/greentic.gitcd greentic/greenticcargo build --releaseexport PATH="$PATH:$(pwd)/target/release"gtc installgtc doctorcargo 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:
gtc --versiongtc doctorCLI Architecture
Sección titulada «CLI Architecture»The gtc binary is a thin router. It owns the top-level UX, then delegates most work to companion binaries installed by gtc install:
| Command | Source Repo | Purpose |
|---|---|---|
gtc install | gtc toolchain installer | Install/update delegated Greentic binaries |
gtc update | gtc toolchain installer | Force-update companion binaries to the latest compatible release |
gtc doctor | gtc | Verify delegated binaries are available |
gtc version | gtc | Print router and toolchain version information |
gtc wizard | greentic-dev | Bundle creation wizard |
gtc setup | greentic-setup | Extension setup, credentials, and configuration |
gtc start | greentic-start | Runtime server |
gtc stop | greentic-start / deployer handoff | Stop a local runtime or destroy a deployed environment |
gtc add-admin | gtc | Register an admin client certificate identity for a local bundle |
gtc remove-admin | gtc | Remove an admin client certificate identity for a local bundle |
gtc admin | greentic + greentic-deployer + greentic-start | Admin access, health, status, and runtime control |
gtc dev | greentic-dev | Developer tooling, including pack, flow, component, MCP, GUI, secrets, and coverage passthroughs |
gtc op | greentic-operator | Operator tooling |
gtc docs | gtc docs helper | Generated 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.
Command Reference
Sección titulada «Command Reference»Global Options
Sección titulada «Global Options»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 execCommands
Sección titulada «Commands»| Command | Description |
|---|---|
version | Print version and toolchain release information |
doctor | Verify that required delegated binaries are available |
install | Install or update delegated Greentic tool binaries |
update | Force-update companion binaries |
add-admin | Register an admin client certificate identity for a local bundle |
remove-admin | Remove an admin client certificate identity for a local bundle |
wizard | Create a new bundle from wizard answers |
setup | Configure extensions and runtime settings in a bundle |
start | Start the runtime server |
stop | Stop a runtime or destroy a deployed environment |
admin | Inspect and use the runtime admin API |
dev | Pass through to developer tools, including pack and flow operations |
op | Pass through to operator tooling |
docs | Documentation and generated-schema helpers |
Common Workflows
Sección titulada «Common Workflows»Create and Run a New Project
Sección titulada «Create and Run a New Project»# 1. Inspect the JSON answer schemagtc wizard --schema
# 2. Validate and apply JSON wizard answersgtc wizard validate --answers wizard-answers.jsongtc wizard apply --answers wizard-answers.json --yes
# 3. Setup extensions and runtime configurationgtc setup ./my-bundle
# 4. Start the runtimegtc start ./my-bundlegtc wizard uses JSON answer files. Coding agents can inspect gtc wizard --schema, generate an answers file, validate it, then apply it non-interactively.
Install and Update the Toolchain
Sección titulada «Install and Update the Toolchain»# Install or repair companion binariesgtc install
# Preview the install plangtc install --dry-run
# Pin a controlled release or manifestgtc install --release 1.0.15gtc install --manifest ./greentic-toolchain.json
# Force-update companion binaries to the latest compatible releasegtc updateDevelopment Workflow
Sección titulada «Development Workflow»# Validate flowsgtc dev flow doctor ./my-bundle/apps/my-app/flows/
# Build a packgtc dev pack build --in ./my-pack/
# Start with verbose logginggtc start ./my-bundle --verbose
# Start with ngrok tunnelgtc start ./my-bundle --ngrok onProduction Deployment
Sección titulada «Production Deployment»# Setup with answers file (non-interactive)gtc setup --answers production-answers.json ./my-bundle
# Start without tunnelsgtc start ./my-bundle --cloudflared off --ngrok offConfiguration File
Sección titulada «Configuration File»GTC can use a configuration file (greentic.toml):
[runtime]host = "0.0.0.0"port = 8080
[logging]level = "info"format = "json"
[telemetry]enabled = trueotlp_endpoint = "http://localhost:4317"Environment Variables
Sección titulada «Environment Variables»| Variable | Description | Default |
|---|---|---|
GREENTIC_LOG_LEVEL | Log verbosity | info |
GREENTIC_CONFIG | Config file path | greentic.toml |
GREENTIC_REDIS_URL | Redis URL | redis://localhost:6379 |
Exit Codes
Sección titulada «Exit Codes»| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Configuration error |
3 | Runtime error |
4 | Validation error |
Getting Help
Sección titulada «Getting Help»# General helpgtc --helpgtc install --helpgtc doctor
# Command-specific helpgtc wizard --helpgtc setup --helpgtc start --helpgtc admin --helpNext Steps
Sección titulada «Next Steps»- gtc wizard - Bundle creation
- gtc setup - Extension setup
- gtc start - Runtime server
- Admin Access - Runtime admin API access and usage
- Building Packs - Pack management