CLI ReferenceVersion v5.1.7Apigee X & HybridBun Native
Aft Documentation
Apigee Feature Templater (aft) is a lightning-fast, zero-dependency CLI tool built for modern Apigee development. It converts effortlessly between Apigee ZIP proxy bundles, concise YAML proxies, and JSON formats, while providing modular feature composition, remote Apigee X deployments, and full developer/product exports.
curl -fsSL https://raw.githubusercontent.com/apigee/apigee-templater/main/install.sh | sh
No commands or topics matched your search.
🚀 Installation & Setup
AFT is compiled into single-file, zero-dependency binaries for Linux, macOS, and Windows. No Node.js or Bun runtime is required on the host system.
Option 1: One-Line Installer (Recommended)
Automatically downloads the appropriate binary for your OS and architecture, places it in your PATH, and sets execute permissions.
macOS & Linux (Bash/Zsh)
curl -fsSL https://raw.githubusercontent.com/apigee/apigee-templater/main/install.sh | sh
AFT offers 7 primary commands designed for composable, non-destructive workflows.
aft convert
Default Command
aft [convert] [options] [<input>] [<output>]
The primary engine of AFT. Converts between Apigee proxy ZIP bundles, concise YAML proxies, and JSON formats. Applies and removes modular features, instantiates templates with parameter substitutions, converts between features and SharedFlow ZIP bundles, or creates new proxies and templates from scratch.
Command Options
Option
Description
-i, --input <path|name>
Input ZIP bundle, YAML/JSON file, or remote Apigee resource name.
-o, --output <path>
Target output file or directory path (e.g. proxy.yaml, bundle.zip, ./proxies/).
Apply a feature (or comma-separated list of features) to a template or proxy.
-r, --removeFeature <name>
Remove a feature (or comma-separated list) from a template or proxy.
-p, --parameters <list>
Parameter substitutions for template instantiation (e.g. param1=val1,param2=val2).
-b, --basePath <path>
Base path when scaffolding a new proxy or template (e.g. /v1/weather).
-u, --targetUrl <url>
Backend target URL when scaffolding a new proxy or template.
-n, --name <name>
Resource name for output template, feature, or proxy.
--organization, --org, --project <name>
Target Apigee organization or GCP project for deployment or export.
--environment, --env <name>
Apigee environment name to deploy the proxy revision to (e.g. dev, prod).
--service-account, --sa <name|email>
Google Cloud service account email or name attached to proxy deployment. If not an email address, automatically formats as {sa-name}@{project-id}.iam.gserviceaccount.com.
--delete
Delete Apigee resources defined in input template, product, user, or proxy.
-d, --drz <region>
Specify DRZ endpoint region ('us', 'eu', 'in') for data-residency compliance.
Examples
Convert Apigee ZIP Bundle to concise YAML
Decompresses an Apigee proxy ZIP bundle and generates a clean, single-file YAML specification with all policies, flows, and resources.
Converts a feature YAML file into an Apigee SharedFlow ZIP bundle for deployment as a reusable flow.
aft -i auth-apikey-verify.yaml -f sf -o SF-ApiKeyVerify.zip
Deploy Proxy directly to Apigee Environment
Deploys a local YAML proxy directly to an Apigee X environment, attaching a service account (short name or email) if needed.
aft -i WeatherAPI.yaml --org my-org --environment dev --sa apigee-sa
aft describe
Inspection
aft describe <input> | aft <input>
Inspects and summarizes any local file, remote repository resource (template, proxy, feature, product, or user), or Apigee organization configuration (--project). Renders a high-contrast terminal card detailing the name, description, endpoints, target URLs, flows, policies, parameters, or org runtime settings without modifying or creating files. If given a non-existent filename as a single argument, AFT safely creates an empty template proxy instead.
Command Options
Option
Description
<input>
Path to a local YAML/JSON file, or the identifier of a feature/template in the repository.
-i, --input <path|name>
Explicit flag alternative for the input resource.
--project, --org, --organization <name>
Inspect Apigee organization/project configuration, or scope remote resources.
-f, --format <format>
Output format: 'json' or 'yaml' for raw payloads, or format hint ('proxy', 'template', 'feature', 'product', 'user', 'sf').
-t, --token <token>
Google Cloud OAuth2 token (defaults to Application Default Credentials).
-d, --drz <region>
Specify DRZ endpoint ('us', 'eu', 'in').
Examples
Describe an Apigee Organization / GCP Project
Queries and inspects runtime and organizational configuration for an Apigee organization (GCP project, analytics region, billing type, trial expiration, environments, environment groups, and hostnames).
aft describe --project my-apigee-org
Export Organization Configuration to JSON / YAML
Fetches full organization details and prints the raw JSON or YAML response.
aft describe --project my-apigee-org -f json
Describe a local Proxy YAML
Outputs an overview card showing endpoints, targets, pre/post flows, and policies for a local proxy file.
aft describe SimpleProxy-v1.yaml
Quick inspection shorthand (Single argument)
Passing any existing file or repository resource directly as a single argument automatically triggers describe without writing files.
aft ai-target-googlecloud
Describe a Repository Feature
Fetches and displays metadata, parameters, target endpoints, policies, and flow steps for a catalog feature.
aft describe auth-apikey-verify
Describe an Apigee Product YAML
Displays approval type, environments, proxies, and quota limits defined in an API Product YAML.
aft describe standard-api-product.yaml
Describe a Developer User YAML
Displays developer details, registered apps, and associated credential configurations.
aft describe developer-john.yaml
aft reset
Reset
aft reset <input> [options]
Resets a template, feature, or proxy file to its default empty contents. For templates, removes all features, parameters, endpoints, and targets. For features, removes all policies, flows, and resources while leaving endpoints and targets with no flow steps. For proxies, removes all policies, flows, and resources while leaving endpoints and targets with no flow steps.
Command Options
Option
Description
<input>
Path to a local YAML or JSON template, feature, or proxy file to reset.
-i, --input <path>
Explicit flag alternative for the input file.
-o, --output <path>
Optional destination path to write the reset file to (defaults to in-place overwrite).
Examples
Reset a Template to Empty Starter Definition
Clears all features, parameters, endpoints, and targets from a template file in-place.
aft reset MyTemplate.yaml
Reset a Feature (Clear Policies & Flows)
Removes all policies, flows, and resources from a feature file, leaving endpoints and targets with no flow steps.
aft reset MyFeature.yaml
Reset a Proxy to Clean Endpoints & Targets
Strips all policies, flows, and resources from a proxy while preserving endpoints and target routes.
aft reset SimpleProxy-v1.yaml
Reset and Write to a New File
Resets the input file and writes the clean result to an alternative output destination.
aft reset MyTemplate.yaml -o CleanTemplate.yaml
aft list
Catalog
aft list [options] | aft -l | aft --list
Browses all pre-built templates and features available in the central GitHub repository (https://github.com/gcp-samples/apigee-template-repository ↗). Supports structured output in JSON or YAML formats for integration with CI/CD pipelines and developer tooling. Results are cached locally for 24 hours.
Command Options
Option
Description
-l, --list, --listFeatures
Flag alternative to the 'list' command.
-f, --format <json|yaml>
Output format: 'json' or 'yaml' for machine-readable catalog representations.
--listTemplates
List templates catalog.
Examples
List all Repository Templates and Features in Terminal
Displays an interactive colored list of all available templates and features in the catalog.
aft list
Export Catalog as JSON
Returns the full catalog of features and templates in structured JSON format for scripting.
aft list -f json
Export Catalog as YAML
Outputs the complete catalog of features and templates formatted as YAML.
Installs or displays dynamic shell tab-completion scripts. Provides context-aware auto-completion for commands, flags, formats, and repository feature names across Zsh, Bash, Fish, and Windows PowerShell.
Command Options
Option
Description
install
Auto-detects active shell and appends completion loader to ~/.zshrc, ~/.bashrc, config.fish, or PowerShell $PROFILE.
uninstall
Removes AFT completion configuration from your shell profile.
zsh
Prints raw Zsh completion script to stdout for manual sourcing.
bash
Prints raw Bash completion script to stdout for manual sourcing.
fish
Prints raw Fish completion script to stdout for manual sourcing.
powershell
Prints raw PowerShell completion script to stdout (alias: pwsh).
Examples
Auto-install shell completion for active shell
Detects your shell and configures tab-completion automatically.
aft completion install
Manually source Zsh completion in current session
Quickly activates tab-completion in the current terminal window without editing ~/.zshrc.
source <(aft completion zsh)
Generate completion script for Fish shell
Saves completion rules into Fish configuration directory.
aft completion fish > ~/.config/fish/completions/aft.fish
Uninstall shell completions
Removes all AFT completion hooks from your shell configuration files.
aft completion uninstall
aft skill
Tooling
aft skill <install | uninstall>
Manages the native Apigee Templater skill for AI coding assistants. Installs the SKILL.md specification and guides into ~/.agents/skills/apigee-templater, enabling tools like Google Antigravity, Gemini CLI, Claude Code, Cursor, and Codex to author and debug AFT proxies automatically.
Command Options
Option
Description
install
Installs the apigee-templater skill to ~/.agents/skills/apigee-templater.
uninstall
Removes the apigee-templater skill from ~/.agents/skills/apigee-templater.
Examples
Install AI Agent Skill
Equips local AI coding assistants with Apigee proxy rules, policy patterns, and templater CLI capabilities.
aft skill install
Uninstall AI Agent Skill
Removes the skill definition from the local assistant skills directory.
aft skill uninstall
aft cache
Tooling
aft cache <clear>
Manages the local cache of templates, features, and schemas downloaded from the repository. The cache is stored in ~/.aft/cache/ and automatically expires after 24 hours. Use this command to force an immediate refresh of the catalog.
Command Options
Option
Description
clear
Clears cached features, templates, and products from ~/.aft/cache/.
Examples
Clear local repository cache
Deletes cached repository files so the next AFT command fetches fresh definitions directly from GitHub.
aft cache clear
☁️ Apigee X Cloud Operations
AFT interacts directly with the Google Cloud Apigee management API using standard Application Default Credentials (ADC) or explicit tokens. Use --organization, --org, or --project interchangeably.
Remote Export from Apigee X
Apigee Cloud
Export deployed proxies, SharedFlows, API products, and developer user credentials from an Apigee X organization directly into clean, version-controllable YAML or JSON files.
Examples
Export single Proxy to YAML
Authenticates via gcloud default credentials, downloads the latest proxy revision, and writes a concise YAML file.
Backs up every API product in the organization into separate YAML files inside ./products/.
aft --org my-org -f product -o ./products/
Export Developer User, Apps & Credentials
Exports developer profile, registered apps, API keys, and client secrets.
aft dev@example.com --org my-org -f user -o dev-user.yaml
Export ALL Developers and Apps in an Organization
Exports complete developer registry and credentials to individual YAML files.
aft --org my-org -f user -o ./users/
Export SharedFlow to YAML
Exports an Apigee SharedFlow revision and converts it into a feature YAML format.
aft my-shared-flow --org my-org -f sf -o sf-flow.yaml
Remote Deployment to Apigee X
Apigee Cloud
Deploy local proxies, API products, developer users, and complete multi-resource templates directly to your Apigee X / hybrid environments.
Examples
Deploy Proxy to Environment
Packages the YAML proxy into a bundle, imports it into Apigee X, and deploys a new revision to the 'dev' environment.
aft -i WeatherAPI.yaml --org my-org --environment dev
Deploy Proxy with Google Service Account
Attaches a Google Cloud Service Account to the deployed proxy revision for secure backend identity. Supports --sa or --service-account. If a short name is supplied instead of an email address, it automatically expands to '{sa-name}@{project-id}.iam.gserviceaccount.com'.
Orchestrates a full deployment in one command: deploys the proxy, provisions all associated products, and creates users with app keys.
aft -i FullTemplate.yaml --org my-org --environment dev
Resource Deletion (--delete)
Apigee Cloud
Tears down and deletes Apigee resources defined in local YAML files. Handles multi-resource templates with automatic reverse dependency ordering (Users -> Products -> Proxies).
Examples
Delete Proxy from Apigee
Undeploys all revisions and deletes the proxy from the Apigee organization.
aft -i WeatherAPI.yaml --org my-org --delete
Delete API Product
Deletes the API product from the Apigee organization.
Deletes developer apps, API credentials, and developer account.
aft -i dev-user.yaml --org my-org -f user --delete
Clean up Full Template Environment
Safely cleans up everything created by the template in the correct dependency order.
aft -i FullTemplate.yaml --org my-org --delete
📖 Complete CLI Options Matrix
Complete reference of all command-line options, aliases, and argument expectations supported by AFT.
Flag
Argument
Description
--input, -i
<path|name>
Input path to a ZIP, JSON, or YAML file, or an Apigee resource name.
--output, -o
<path>
Optional file or directory output path (e.g. proxy.yaml, bundle.zip, ./proxies/).
--organization, --org, --project
<name>
Apigee organization or GCP project name to export from, deploy to, or describe (inspect org configuration). All 3 aliases are interchangeable.
--environment, --env
<name>
Apigee environment name to deploy the proxy revision to (e.g. dev, test, prod).
--service-account, --sa
<name|email>
Google Cloud service account email or name attached to proxy deployment. If not an email address, automatically formats as {sa-name}@{project-id}.iam.gserviceaccount.com.
--format, -f
<format>
Resource format: 'proxy', 'template', 'feature', 'product', 'user', or 'sharedflow' ('sf').
--applyFeature, -a
<features>
Feature name or comma-separated list of features to apply to a template or proxy.
--removeFeature, -r
<features>
Feature name or comma-separated list of features to remove from a template or proxy.
--parameters, -p
<list>
Parameter substitutions when instantiating a template (e.g. key1=val1,key2=val2).
--basePath, -b
<path>
Endpoint base path when scaffolding a new proxy or template (e.g. /v1/my-api).
--targetUrl, -u
<url>
Backend target URL when scaffolding a new proxy or template.
--name, -n
<name>
The name for the output template, feature, or proxy.
--list, -l
--
List all templates and features available in the central repository (supports -f json/yaml).
--delete
--
Delete Apigee resources defined in input template, product, user, or proxy.
--token, -t
<token>
Google Cloud OAuth2 token for Apigee API (uses Application Default Credentials if omitted).
--drz, -d
<region>
Use a DRZ Apigee endpoint ('us', 'eu', 'in') for data-residency compliance.
--help, -h
--
Display CLI usage instructions and version information.
--version, -v
--
Display current AFT version number.
🍳 Cookbook & Real-World Recipes
Step-by-step practical workflows for common architectural patterns.
Recipe 1: Building a Multi-Model AI Gateway Proxy
Cookbook
Create an enterprise AI gateway proxy routing to Google Cloud Vertex AI Model Garden with automatic token extraction and authentication.
1. Create an empty template proxy
Initializes a minimal template YAML with default proxy endpoints.
aft -n AI-Gateway -o AI-Gateway.yaml
2. Apply Google Cloud Model Garden target feature
Injects Google Cloud Model Garden targets and token header setup into the proxy.
aft AI-Gateway.yaml -a ai-target-googlecloud -o AI-Gateway.yaml
3. Apply API Key Verification and Rate Limiting
Secures the AI gateway with API key enforcement and per-model quota controls.
aft AI-Gateway.yaml -a auth-apikey-verify,ai-auth-quota -o AI-Gateway.yaml
4. Deploy to Apigee X Environment
Deploys the secured AI gateway proxy directly to the dev environment in Apigee X.
aft -i AI-Gateway.yaml --org my-apigee-org --environment dev
Recipe 2: Bulk Exporting Apigee X Org to Git for CI/CD
Cookbook
Export all proxies, products, and developer credentials from an existing Apigee organization into structured folders for GitOps version control.
1. Export all proxies to ./proxies/ directory
Converts every deployed proxy in the org into a clean YAML file.
aft --org production-org -o ./proxies/
2. Export all API products to ./products/ directory
Exports product definitions with quotas, environments, and allowed proxies.