Skip to main content
Global flags can be used with any Tenderly CLI command to modify behavior, control output, and specify custom configuration paths.

Available Global Flags

—debug

Enables debug-level logging for troubleshooting issues.
--debug
boolean
default:"false"
Turns on debug level logging with detailed information about command execution.
tenderly push --debug
Debug mode also enables caller information in logs to help identify where errors occur in the CLI source code.

—reset-provider

Clears the deployment provider configuration.
--reset-provider
boolean
default:"false"
Clears the set deployment provider. If not provided, the CLI will use the provider from tenderly.yaml.
tenderly push --reset-provider
This is useful when:
  • Switching between different framework providers
  • The provider was incorrectly detected
  • You want to force provider re-detection

—output

Controls the output format of command results.
--output
string
default:"text"
Specifies which output mode to use: text or json.
tenderly whoami --output text
The JSON output mode is particularly useful for:
  • Scripting and automation
  • Parsing CLI output programmatically
  • CI/CD pipeline integration
Example JSON output:
{
  "username": "john-doe",
  "email": "[email protected]",
  "account_id": "abc123"
}

—global-config

Specifies a custom name for the global configuration file.
--global-config
string
default:"config"
Global configuration file name (without the extension). The file is stored in ~/.tenderly/.
tenderly login --global-config production-config
This looks for ~/.tenderly/production-config.yaml instead of the default ~/.tenderly/config.yaml. Use cases:
  • Managing multiple Tenderly accounts
  • Separating development and production credentials
  • Team-specific configurations

—project-config

Specifies a custom name for the project configuration file.
--project-config
string
default:"tenderly"
Project configuration file name (without the extension). The file is stored in your project directory.
tenderly push --project-config tenderly-staging
This looks for tenderly-staging.yaml instead of the default tenderly.yaml. Use cases:
  • Multiple deployment environments (staging, production)
  • Different project configurations for different branches
  • Testing configurations without modifying the main file

—project-dir

Specifies the directory where your smart contract project resides.
--project-dir
string
default:"."
The directory in which your Truffle/Hardhat/etc project resides. Defaults to the current working directory.
tenderly push --project-dir /path/to/my/project
Using --project-dir is preferred over running cd commands when working with projects in different directories.
Example with relative path:
tenderly push --project-dir ../contracts

Combining Flags

You can combine multiple global flags in a single command:
tenderly push --debug --output json --project-dir /path/to/project

Configuration Priority

The Tenderly CLI uses the following priority order for configuration:
  1. Command-line flags (highest priority)
  2. Project configuration (tenderly.yaml)
  3. Global configuration (~/.tenderly/config.yaml)
  4. Default values (lowest priority)
# If tenderly.yaml has project_slug: "my-project"
# But you run:
tenderly push --project-slug other-project

# The CLI will use "other-project" (flag takes priority)

Global Configuration File

The global configuration file is stored at ~/.tenderly/config.yaml and contains:
token: "your-auth-token"
account_id: "your-account-id"
username: "your-username"
email: "[email protected]"
The global configuration file is created automatically when you run tenderly login. Never commit this file to version control as it contains authentication credentials.

Examples

tenderly push --debug --output json > debug-output.json
This captures detailed debug information in JSON format for analysis.
# Instead of:
cd /path/to/project && tenderly push

# Use:
tenderly push --project-dir /path/to/project
tenderly push \
  --project-config tenderly-staging \
  --project-dir ./contracts \
  --debug
# Login with production account
tenderly login --global-config prod-config

# Login with development account
tenderly login --global-config dev-config

# Use production account for push
tenderly push --global-config prod-config

Environment Variables

While the CLI primarily uses configuration files and flags, you can also set some behavior through environment variables:
# Set project directory via environment
export TENDERLY_PROJECT_DIR=/path/to/project
tenderly push
Command-line flags always take precedence over environment variables.

Common Patterns

CI/CD Integration

#!/bin/bash
# deploy.sh

tenderly contracts push \
  --output json \
  --project-dir $CI_PROJECT_DIR \
  --project-config tenderly-prod \
  > deployment-result.json

# Check if deployment was successful
if [ $? -eq 0 ]; then
  echo "Deployment successful"
else
  echo "Deployment failed"
  cat deployment-result.json
  exit 1
fi

Multiple Environment Management

# .bashrc or .zshrc aliases
alias tenderly-dev='tenderly --global-config dev-config'
alias tenderly-prod='tenderly --global-config prod-config'

# Usage
tenderly-dev push
tenderly-prod push

See Also

Build docs developers (and LLMs) love