gtc setup
Overview
Sección titulada «Overview»The gtc setup command configures extension packs in your Greentic bundle. It runs setup flows for enabled messaging, event, OAuth, secrets, and runtime extensions, collecting credentials and configuring webhooks where needed.
gtc setup [OPTIONS] <BUNDLE_PATH>Options
Sección titulada «Options»| Option | Description |
|---|---|
--answers <FILE> | Path to answers file (non-interactive) |
--key <KEY> | Encryption/decryption key for answer documents that include secrets |
--dry-run | Preview setup without making changes |
--emit-answers <FILE> | Generate answers template |
--advanced | Include optional fields in answers template |
--tenant <TENANT> | Tenant identifier (default: demo) |
--team <TEAM> | Team identifier |
--env <ENV> | Environment (dev, staging, prod; default: dev) |
--locale <LOCALE> | UI locale as a BCP-47 tag |
--ui / --no-ui | Enable or disable the web setup UI |
--non-interactive | Fail instead of prompting when answers are incomplete |
Interactive Setup
Sección titulada «Interactive Setup»Run setup interactively to be prompted for each extension:
gtc setup ./my-bundleThe CLI will prompt for:
- Extension credentials (API keys, tokens)
- Public URL for webhooks
- Optional configuration options
Non-Interactive Setup
Sección titulada «Non-Interactive Setup»Demo Catalog Flows
Sección titulada «Demo Catalog Flows»Every demo in the greentic-demo catalog publishes a *-setup-answers.json document alongside its pack. Apply it to a bundle that you created with gtc wizard:
gtc setup ./deep-research-demo-bundle --answers https://github.com/greenticai/greentic-demo/releases/latest/download/deep-research-demo-setup-answers.jsonThe same pattern works for any demo — just substitute the demo ID. See Running Demos for the full catalog with descriptions and required credentials.
You can also point gtc setup directly at a published .gtbundle artifact:
gtc setup https://github.com/greenticai/greentic-demo/releases/latest/download/cloud-deploy-demo.gtbundle --answers https://github.com/greenticai/greentic-demo/releases/latest/download/cloud-deploy-demo-setup-answers.jsonGenerate Answers Template
Sección titulada «Generate Answers Template»First, generate a template with all required fields:
# Basic template (required fields only)gtc setup --dry-run --emit-answers answers.json ./my-bundle
# Full template (including optional fields)gtc setup --dry-run --emit-answers answers.json --advanced ./my-bundleAnswers File Format
Sección titulada «Answers File Format»{ "messaging-telegram": { "enabled": true, "public_base_url": "https://xxx.ngrok-free.app", "bot_token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz" }, "messaging-slack": { "enabled": true, "public_base_url": "https://xxx.ngrok-free.app", "api_base_url": "https://slack.com/api", "bot_token": "xoxb-xxx-xxx-xxx", "slack_app_id": "A07XXXXXX", "slack_configuration_token": "xoxe.xoxp-xxx" }, "messaging-teams": { "enabled": false }}Setup answers are JSON. Use gtc setup --dry-run --emit-answers answers.json ./my-bundle to generate the current schema-backed file instead of hand-writing one from memory.
Apply Answers
Sección titulada «Apply Answers»gtc setup --answers answers.json ./my-bundleExtension-Specific Configuration
Sección titulada «Extension-Specific Configuration»Telegram
Sección titulada «Telegram»{ "messaging-telegram": { "enabled": true, "public_base_url": "https://your-domain.com", "bot_token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz" }}How to get credentials:
- Message @BotFather on Telegram
- Send
/newbotand follow prompts - Copy the bot token
{ "messaging-slack": { "enabled": true, "public_base_url": "https://your-domain.com", "bot_token": "xoxb-xxx-xxx-xxx", "slack_app_id": "A07XXXXXX", "slack_configuration_token": "xoxe.xoxp-xxx" }}How to get credentials:
- Go to api.slack.com/apps
- Create a new app or select existing
- Get Bot Token from OAuth & Permissions
- Get App ID from Basic Information
- Get Configuration Token from App Manifest
Microsoft Teams
Sección titulada «Microsoft Teams»{ "messaging-teams": { "enabled": true, "public_base_url": "https://your-domain.com", "app_id": "your-app-id", "app_password": "your-app-password", "tenant_id": "your-tenant-id" }}WhatsApp (via Meta)
Sección titulada «WhatsApp (via Meta)»{ "messaging-whatsapp": { "enabled": true, "public_base_url": "https://your-domain.com", "phone_number_id": "123456789", "access_token": "EAAxxxxx", "verify_token": "your-verify-token" }}Public URL Configuration
Sección titulada «Public URL Configuration»Using ngrok
Sección titulada «Using ngrok»# Start ngrok in separate terminalngrok http 8080
# Copy the HTTPS URL (e.g., https://abc123.ngrok-free.app)# Use this as public_base_url in answersUsing Cloudflared
Sección titulada «Using Cloudflared»# Cloudflared generates URL automatically with gtc startgtc start ./my-bundle --cloudflared onBundle Capabilities
Sección titulada «Bundle Capabilities»The bundle.yaml file can declare capabilities that unlock additional behavior during setup. Capabilities are listed as an array of capability identifiers.
Bundle Assets (greentic.cap.bundle_assets.read.v1)
Sección titulada «Bundle Assets (greentic.cap.bundle_assets.read.v1)»When the greentic.cap.bundle_assets.read.v1 capability is present in bundle.yaml, gtc setup creates an assets/ directory at the bundle root and scaffolds eligible asset files from extension packs into it.
capabilities: - greentic.cap.bundle_assets.read.v1Specifically, public assets from extension packs (currently assets/webchat-gui/ entries) are copied into the bundle-level assets/ directory. This gives you a place to customize extension assets — for example, webchat-gui skins and configuration files — without modifying the original pack contents.
How it works:
- During setup, extension packs that include eligible asset directories (e.g.,
assets/webchat-gui/) have those files scaffolded into the bundle rootassets/directory. - You can then edit these files freely. Bundle-level asset files override pack defaults at runtime.
- This is useful for customizing the look and feel of webchat widgets, adjusting configuration, or applying branded skins.
Setup Flow Execution
Sección titulada «Setup Flow Execution»When you run gtc setup, it:
-
Loads bundle configuration
Reads
bundle.yamland the resolved bundle metadata to find extension packs and setup requirements. -
Validates answers
Checks all required fields are present.
-
Runs setup flows
Executes each extension’s setup flow (e.g., webhook registration).
-
Stores credentials
Saves credentials to the configured secrets store.
-
Runs verification
Executes
verify_flowto confirm setup worked.
Re-run Setup
Sección titulada «Re-run Setup»gtc setup is idempotent. Re-run it with the same answers file after credential or public URL changes:
gtc setup ./my-bundle --answers answers.jsonFor headless automation, combine an answers file with strict non-interactive mode:
gtc setup ./my-bundle --answers answers.json --non-interactive --no-uiTroubleshooting
Sección titulada «Troubleshooting»Webhook Registration Failed
Sección titulada «Webhook Registration Failed»Error: Failed to register webhook: 401 UnauthorizedCheck that your bot token is correct and not expired.
Missing Required Field
Sección titulada «Missing Required Field»Error: Missing required field 'bot_token' for messaging-telegramEnsure all required fields are in your answers file.
Public URL Not Accessible
Sección titulada «Public URL Not Accessible»Error: Webhook verification failed: Connection refusedEnsure your public URL is accessible from the internet. Check ngrok/cloudflared is running.
Credential Not Found
Sección titulada «Credential Not Found»Error: Secret 'slack_bot_token' not foundRun gtc setup to configure the extension, or check your answers file.
Best Practices
Sección titulada «Best Practices»- Use answers files in CI/CD - Avoid interactive prompts in automated pipelines
- Keep credentials secure - Don’t commit answers files with real tokens to git
- Use environment variables - Reference secrets via
$ENV_VARin answers - Test with dry-run - Preview setup before making changes
- Regenerate on URL change - Re-run setup when your public URL changes
Next Steps
Sección titulada «Next Steps»- gtc start - Run the runtime server
- Telegram Setup - Detailed Telegram guide
- Slack Setup - Detailed Slack guide