terra-cli

Manage Terra API account configuration and debug integrations from the terminal.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/tryterra/agent-skills --skill terra-cli-tryterra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terra-cli
Source: https://github.com/tryterra/agent-skills/tree/main/skills/terra-cli
Command: npx skills add https://github.com/tryterra/agent-skills --skill terra-cli-tryterra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Terra API account configuration normally requires clicking through the dashboard at dashboard.tryterra.co, which an AI agent cannot do. This Skill lets an agent read and change account state directly from the terminal with the terra CLI, covering environments, providers, webhook destinations, credentials, delivered events, users, team, and billing. ## Core Features & Use Cases - Account and environment management: Audit accounts, enable providers, configure data scopes, point webhook destinations, and compare environments using generated admin API commands. - Integration debugging: Trace missing or failed webhooks, resend events, triage a single user's missing data, and inspect payloads within the 14-day retention window. - Direct API access and scripting: Call any admin or data API endpoint with terra api and terra data-api, with guardrails like --reveal, --yes, --dry-run, exit codes, and JSON/jq output filtering for CI pipelines. - Use Case: A webhook stopped arriving in production. The agent runs terra events list --env dev-prod --outcome failed, inspects the failing payload, discovers the destination points at a dead tunnel, and recreates it with the correct URL and a new signing secret. ## Quick Start Ask the agent to run terra whoami and terra environments list to verify the CLI is installed and authenticated, then have it list the enabled providers and webhook destinations for your environment.

Frequently Asked Questions about terra-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a webhook that never arrived from Terra API?

Run terra events list --env <dev-id> --outcome failed to see failed deliveries, then terra events payload retrieve <event_id> to inspect the payload. You can resend an event with terra events resend to test your handler against real data.

How do I enable a provider and set a webhook destination with the terra CLI?

Use terra unified-api sources enable GARMIN --env <dev-id> to enable a provider, and terra unified-api destinations create --env <dev-id> --type webhook --url <https url> --reveal to create a destination. The create command returns the signing secret, which is why --reveal is required.

Does the terra CLI work in CI without a browser login?

Yes. Set TERRA_ADMIN_TOKEN as an environment variable and every command authenticates without writing to the config file or keyring. Destructive commands need --yes and credential-returning commands need --reveal when no terminal is available.

Why does terra data-api return an empty acknowledgement instead of data?

Reading health data requires -q to_webhook=false. Without it, the API sends the response to the configured webhook destination and returns only an acknowledgement, which looks like an empty result in the terminal.

What is the difference between the Terra admin API and the data API?

The admin API manages account configuration such as environments, providers, destinations, and billing, and is what the CLI's generated commands call. The data API is the integration itself, delivering health data and auth flows, and is reached with terra data-api using the environment's API key.

Why does terra login not allow terra data-api to fetch the environment API key?

The default login deliberately excludes the keys:read scope, which is required to retrieve an environment's API key. The user must run terra login --scope keys:read, or set TERRA_API_KEY directly to supply the key without a lookup.