gtdx CLI
Esta página aún no está disponible en tu idioma.
gtdx (Greentic Designer Extensions CLI) is the current authoring tool for Greentic
extensions. An extension is a WebAssembly component (target wasm32-wasip2) packaged
as a signed .gtxpack archive that the runtime and store load. describe.json is the
extension manifest and the single source of truth for its metadata; signing uses
ed25519.
gtdx --version # e.g. gtdx 1.1.1gtdx --helpThe --home <HOME> option (env GREENTIC_HOME, default ~/.greentic) is available on
every subcommand and overrides the Greentic home directory used for keys, registries,
and local installs.
Authoring Inner Loop
Section titled “Authoring Inner Loop”The authoring path is: scaffold with gtdx new, iterate with gtdx dev, then sign and
publish with gtdx keygen + gtdx login + gtdx publish.
gtdx new — scaffold a new extension
Section titled “gtdx new — scaffold a new extension”gtdx new my-extensiongtdx new my-extension --kind design --id com.example.my-extensiongtdx new my-extension --yes # non-interactive: resolve from flags/defaultsgtdx new # launch the interactive wizardScaffolds a new extension project. Run with no name on a terminal to launch the
interactive wizard, or pass --yes to resolve everything from flags and defaults.
Key options:
--kind <KIND>— extension kind, one ofdesign(default),bundle,deploy,provider,wasm-component,mcp,llm.--from-openapi <SPEC>— (with--kind mcp) seed the extension from an OpenAPI/Swagger spec instead of the empty echo skeleton:gtdxshells out togreentic-mcp-gento generate awasix:mcp/routercomponent and auto-authorsdescribe.json(network from the spec’sservers, plussecret_requirements). See Creating MCP Tools.--id <ID>— reverse-DNS extension id (defaultcom.example.<name>).--version <VERSION>— initial version (default0.1.0).--author <AUTHOR>— defaults togit config user.name.--license <LICENSE>— SPDX license id (defaultApache-2.0).--dir <DIR>— output directory (default./<name>).--no-git— skipgit init;--force— overwrite an existing target.-w, --wizard— force the interactive wizard even when a name/flags are given.
The scaffold includes a working WASM component (src/lib.rs), the vendored WIT contract
under wit/ (pinned by .gtdx-contract.lock), describe.json, i18n/en.json, a
build.sh, a ci/local_check.sh quality gate, and AI-agent onboarding files: an
AGENTS.md, a CLAUDE.md that points to it, and a .claude/ directory with
pre-approved build permissions and a /check quality-gate command. The AGENTS.md
documents which values are scaffold placeholders to replace and which files
(describe.json sha256 fields, .gtdx-contract.lock, wit/deps/, src/bindings.rs)
are generated and must never be hand-edited.
gtdx dev — developer inner loop
Section titled “gtdx dev — developer inner loop”gtdx dev # watch mode (default): rebuild + pack + reinstall on savegtdx dev --once # build + install once, then exit (CI-friendly)gtdx dev --no-install # build and pack only; skip installationgtdx dev --release # build with --release (default is debug for speed)Runs the inner loop: on each source change it rebuilds the component, packs the
.gtxpack, and installs it into the local registry under GREENTIC_HOME. Useful
options: --debounce-ms <MS> (file-watch debounce, default 500), --force-rebuild
(runs cargo clean -p <crate> first), --manifest <PATH> (path to Cargo.toml), and
--mount <PATH> to build+pack+install a built extension once the way gtdx install
would (conflicts with --watch/--once).
gtdx validate / gtdx lint — check describe.json
Section titled “gtdx validate / gtdx lint — check describe.json”gtdx validate # describe.json against the JSON Schemagtdx lint # cross-field invariants beyond JSON Schemagtdx lint --publish # also reject placeholder 0000… sha256 (E_SHA256_ZERO)validate checks an extension directory’s describe.json against the schema (default
path ., or pass a PATH). lint checks cross-field invariants such as id pattern and
schema host (default --dir .); --publish enables publish-only rules. Run both after
any edit to describe.json, and gtdx lint --publish right before publishing.
gtdx doctor — diagnose the environment
Section titled “gtdx doctor — diagnose the environment”gtdx doctorgtdx doctor --offline # skip network probesDiagnoses installed extensions and the local toolchain (cargo, cargo-component, the
wasm32-wasip2 target), the configured registries, and stored credentials.
It also reports designer compatibility: whether the Designer you have installed can
actually load each installed extension. This is the check that catches the most common
first-time failure — an extension built against the current contract silently skipped by
an older Designer, so it never shows up in /api/extensions:
designer compatibility ✓ greentic-designer 1.1.7 /usr/local/bin/greentic-designer ✗ my-ext 0.1.0: declares greentic.ai/v2, which designer 1.1.7 cannot load — upgrade greentic-designer to >=1.2.0Set GREENTIC_DESIGNER_BIN to check a Designer built from a checkout instead of the one
on PATH. See Designer Compatibility for the full
version matrix.
Signing and Publishing
Section titled “Signing and Publishing”For the full distribution flow and trust model, see Publishing Extensions.
gtdx keygen — generate a signing keypair
Section titled “gtdx keygen — generate a signing keypair”gtdx keygen # print a new ed25519 private keygtdx keygen --out ~/.greentic/keys/my-key.key # write to a file (mode 0600)Generates an ed25519 keypair for signing extension artifacts. With --out, writes the
private key to a file that must not already exist.
gtdx login / gtdx logout — registry authentication
Section titled “gtdx login / gtdx logout — registry authentication”gtdx login # browser/device login to the default registrygtdx login --registry store.greentic.cloudgtdx login --token "$GTDX_TOKEN" # non-interactive (CI)gtdx logout --registry store.greentic.cloudlogin stores the token at ~/.greentic/credentials.toml. When --token is omitted it
falls back to the GTDX_TOKEN env var, then to browser login; --no-browser prints the
URL instead of opening it, and --paste skips device login to paste a token manually.
gtdx sign — sign a describe.json
Section titled “gtdx sign — sign a describe.json”gtdx sign ./describe.json --key ~/.greentic/keys/my-key.keygtdx sign ./describe.json --key-env GREENTIC_EXT_SIGNING_KEY_PEMSigns a describe.json in place with ed25519. Provide the PKCS8 PEM key with --key
(file) or --key-env (env var, default GREENTIC_EXT_SIGNING_KEY_PEM).
gtdx publish — publish to a registry
Section titled “gtdx publish — publish to a registry”gtdx publish --registry store.greentic.cloud --sign --key-id my-keygtdx publish --dry-run # build + pack + validate; skip registry writegtdx publish --registry local # publish to the local registryBuilds, packs, validates, and writes the .gtxpack to a registry. The --registry
value accepts local, a file://<path>, an oci://<host>/<namespace> URI, or a named
entry from ~/.greentic/config.toml (default local). Common options:
--sign— sign the.gtxpack; pair with--key-id <ID>(loads~/.greentic/keys/<id>.key),--key <FILE>, or--key-env <VAR>.--trust <loose|normal|strict>— trust level (defaultloose).--version <VERSION>— override thedescribe.jsonversion for this run (CI bumps).--dry-run— build/pack/validate only;--verify-only— skip build, only check for a version conflict;--force— overwrite an existing version.--dist <DIR>— also copy the artifact here (default./dist).--wasm <PATH>— pack a pre-builtwasm32-wasip2component instead of runningcargo component build(for externally produced components such as generated MCP components).--oci-token <TOKEN>— bearer token foroci://registries (falls back toGHCR_TOKEN,GITHUB_TOKEN,OCI_TOKEN).-w, --wizard— prompt for registry, mode, signing, and trust interactively.
gtdx verify — verify a signature
Section titled “gtdx verify — verify a signature”gtdx verify ./describe.jsongtdx verify ./my-extension/gtdx verify ./dist/my-extension-0.1.0.gtxpack --trusted-key <base64-ed25519>Verifies an extension signature. Accepts a describe.json file (inline signature), an
extension directory, or a .gtxpack archive (full chain: signature + manifest binding +
ledger). Without --trusted-key it only checks describe self-consistency (integrity, not
authenticity); with --trusted-key <base64> it requires the signature to come from that
exact key.
Installing and Managing Extensions
Section titled “Installing and Managing Extensions”gtdx install / gtdx uninstall
Section titled “gtdx install / gtdx uninstall”gtdx install ./dist/my-extension-0.1.0.gtxpackgtdx install my-extension --version 0.1.0 --registry store.greentic.cloudgtdx uninstall my-extensioninstall takes a registry name (with --version) or a path to a local .gtxpack.
Options include -y, --yes (skip the permission prompt) and --trust <strict|normal|loose>.
gtdx list
Section titled “gtdx list”gtdx listgtdx list --kind design --statusLists installed extensions. --kind filters by design, bundle, deploy,
provider, mcp, or all (default); --status adds an enabled/disabled column.
gtdx enable / gtdx disable
Section titled “gtdx enable / gtdx disable”gtdx enable greentic.foo@0.1.0gtdx disable greentic.fooEnable or disable an installed extension by id, optionally with @version.
gtdx info / gtdx search
Section titled “gtdx info / gtdx search”gtdx search slack --kind provider --limit 10gtdx info my-extension --version 0.1.0search does partial-name matching against a registry (omit the query to list
everything). info shows metadata for one extension.
gtdx outdated / gtdx update
Section titled “gtdx outdated / gtdx update”gtdx outdatedgtdx update my-extensiongtdx update --all -youtdated checks installed extensions for available updates; update updates one
extension (or --all) to the latest permitted version.
gtdx registries
Section titled “gtdx registries”gtdx registries listgtdx registries add store https://store.greentic.cloud --token-env GTDX_TOKENgtdx registries set-default storegtdx registries remove storeShow or modify configured registries (list, add <NAME> <URL>, remove,
set-default).
gtdx component register
Section titled “gtdx component register”gtdx component register --helpRegisters a component-tool by URL against greentic-designer-admin.
See Also
Section titled “See Also”- Writing Extensions — the end-to-end authoring path.
- Publishing Extensions — packaging, signing, and distribution details.
- Designer Compatibility — the Designer ↔
apiVersion↔ SDK version matrix, and why a built extension can be invisible.