The telnyx-edge CLI is the primary tool for deploying and managing Edge Compute functions.
Installation
# macOS (Homebrew)
brew tap telnyx/tap
brew install telnyx-edge
# Linux / macOS (direct download)
# Download from https://github.com/team-telnyx/edge-compute/releases
wget -qO- https://github.com/team-telnyx/edge-compute/releases/latest/download/telnyx-edge-linux-amd64.tar.gz | tar xz
sudo mv telnyx-edge /usr/local/bin/
# Verify installation
telnyx-edge --help
Authentication
Login with OAuth
Opens a browser window for OAuth authentication. After successful login, credentials are stored locally.
API Key Authentication
# Set API key directly
telnyx-edge auth api-key set YOUR_API_KEY
# Clear stored API key
telnyx-edge auth api-key clear
Check Authentication Status
Returns your authenticated organization and user info.
Logout
Clears stored credentials.
Function Management
Create a New Function
telnyx-edge new-func -l=<language> -n=<name>
| Flag | Description | Options |
|---|
-l, --language | Function language | python, go, quarkus |
-n, --name | Function name | Alphanumeric, hyphens allowed |
Examples:
# Create a Python function
telnyx-edge new-func -l=python -n=my-webhook
# Create a Go function
telnyx-edge new-func -l=go -n=call-handler
# Create a Java (Quarkus) function
telnyx-edge new-func -l=quarkus -n=enterprise-app
This creates a new directory with:
func.toml — Function configuration
- Starter code in the chosen language
.gitignore with sensible defaults
Deploy a Function
Deploys the function from the current directory. Reads configuration from func.toml.
Options:
| Flag | Description |
|---|
--from-dir | Deploy from a specific directory |
--timeout | Deployment timeout in seconds |
Examples:
# Deploy from current directory
cd my-function
telnyx-edge ship
# Deploy from a specific directory
telnyx-edge ship --from-dir=./my-function
After deployment, the CLI outputs your function URL:
✓ Function deployed successfully
URL: https://my-webhook-abc123.telnyxcompute.com
Delete a Function
telnyx-edge delete-func <function-name>
This permanently deletes the function and all its versions. This action cannot be undone.
Example:
telnyx-edge delete-func my-old-function
List Functions
Lists all functions in your organization with their status and URLs.
Secrets Management
Secrets are encrypted environment variables that are injected at runtime.
Add a Secret
telnyx-edge secrets add <name> "<value>"
Examples:
# Add a single secret
telnyx-edge secrets add DATABASE_URL "postgres://user:pass@host:5432/db"
# Add an API key
telnyx-edge secrets add OPENAI_API_KEY "sk-..."
Secrets are available as environment variables in your function:
import os
db_url = os.environ.get('DATABASE_URL')
List Secrets
Lists secret names (values are not displayed for security).
Delete a Secret
telnyx-edge secrets delete <name>
Example:
telnyx-edge secrets delete OLD_API_KEY
Bindings
Bindings provide automatic authentication to Telnyx services.
Create a Binding
telnyx-edge bindings create
Creates a binding for your organization. This is a one-time setup that enables automatic Telnyx API key injection.
View Current Binding
Shows binding configuration and status.
Validate Binding
telnyx-edge bindings validate
Tests that the binding is working correctly by making a test API call.
Regenerate Binding Tokens
telnyx-edge bindings update
Regenerates binding tokens. Use this if you suspect credentials have been compromised.
Delete Binding
telnyx-edge bindings delete
Removes the binding. Functions will no longer have automatic Telnyx API access.
System Commands
Check CLI Status
Shows CLI version, authentication status, and connectivity to Edge Compute services.
Get Help
# General help
telnyx-edge --help
# Command-specific help
telnyx-edge new-func --help
telnyx-edge ship --help
Update CLI
# macOS (Homebrew)
brew upgrade telnyx-edge
# Linux / direct install
# Download from https://github.com/team-telnyx/edge-compute/releases
wget -qO- https://github.com/team-telnyx/edge-compute/releases/latest/download/telnyx-edge-linux-amd64.tar.gz | tar xz
sudo mv telnyx-edge /usr/local/bin/
Configuration File
Each function has a func.toml configuration file:
[edge_compute]
func_name = "my-webhook"
language = "python"
[env_vars]
LOG_LEVEL = "info"
API_ENDPOINT = "https://api.example.com"
[build]
# Optional build settings
entry_point = "main.py"
Configuration Fields
| Field | Description | Required |
|---|
func_name | Function name (used in URL) | Yes |
language | Runtime language | Yes |
[env_vars] | Environment variables | No |
[build] | Build configuration | No |
See Environment Variables for more configuration options.
Common Workflows
First Deployment
# 1. Login
telnyx-edge auth login
# 2. Create function
telnyx-edge new-func -l=python -n=my-first-function
# 3. Edit code
cd my-first-function
# ... edit your code ...
# 4. Deploy
telnyx-edge ship
Adding Secrets
# 1. Add secrets
telnyx-edge secrets add DATABASE_URL "postgres://..."
telnyx-edge secrets add API_KEY "secret-key"
# 2. Redeploy to pick up secrets
telnyx-edge ship
Setting Up Bindings
# 1. Create binding (one-time)
telnyx-edge bindings create
# 2. Validate it works
telnyx-edge bindings validate
# 3. Deploy function that uses Telnyx SDK
telnyx-edge ship
Troubleshooting
”Not authenticated” Error
# Re-authenticate
telnyx-edge auth logout
telnyx-edge auth login
Deployment Fails
# Check function configuration
cat func.toml
# Verify you're in the right directory
ls -la
# Check CLI status
telnyx-edge status
Function Not Responding
# Check function exists
telnyx-edge list
# Redeploy
telnyx-edge ship
Next Steps