Skip to main content
Get started with Tenderly CLI by following this step-by-step guide. You’ll learn how to authenticate, initialize a project, and push your first smart contract to Tenderly.

Prerequisites

Before you begin, make sure you have:

Step 1: Authenticate

First, log in to your Tenderly account using the CLI:
tenderly login
The interactive login will open your browser and prompt you to authorize the CLI.
For CI/CD environments, use the access key method. You can generate an access key in your Tenderly Dashboard.

Step 2: Initialize Your Project

Navigate to your smart contract project directory and initialize Tenderly:
cd your-project-directory
tenderly init
This command will:
  1. Detect your project type (Hardhat, Truffle, Foundry, or Brownie)
  2. Prompt you to select or create a Tenderly project
  3. Create a tenderly.yaml configuration file
The CLI will guide you through:
  • Selecting an existing project or creating a new one
  • Configuring your project settings
tenderly init
# Select a project or create a new one
# Answer the prompts to complete setup

Example tenderly.yaml

After initialization, your tenderly.yaml file will look like this:
account_id: ""
project_slug: my-project

Step 3: Configure Your Framework

Depending on your framework, you may need additional setup:
Install the Tenderly Hardhat plugin:
npm install --save-dev @tenderly/hardhat-tenderly
Add to your hardhat.config.js:
require("@tenderly/hardhat-tenderly");
Or for TypeScript (hardhat.config.ts):
import "@tenderly/hardhat-tenderly";
See the Hardhat Integration Guide for complete details.

Step 4: Deploy and Verify Your Contracts

Now you’re ready to deploy and push your contracts to Tenderly!
1

Deploy your contracts

Deploy your contracts to your target network using your framework’s deployment tools:
npx hardhat run scripts/deploy.js --network mainnet
2

Push contracts to Tenderly

After deployment, push your contracts to the Tenderly Dashboard:
tenderly contracts push
You can specify networks:
tenderly contracts push --networks 1,5
Or add a tag for organization:
tenderly contracts push --tag v1.0.0
3

Verify contracts

Alternatively, verify contracts without adding them to your project:
tenderly contracts verify

Step 5: View Your Contracts

After pushing, you’ll see output like this:
Successfully pushed Smart Contracts for project my-project. You can view your contracts at:
https://dashboard.tenderly.co/contract/mainnet/0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
Visit the URL to see your contract in the Tenderly Dashboard, where you can:
  • Debug transactions
  • Monitor contract activity
  • Set up alerts
  • Simulate transactions

Common Workflows

For local development and testing:
# 1. Start local network
npx hardhat node

# 2. Deploy contracts
npx hardhat run scripts/deploy.js --network localhost

# 3. Verify on Tenderly
tenderly contracts verify --networks 31337
For mainnet or testnet deployments:
# 1. Deploy to network
npx hardhat run scripts/deploy.js --network mainnet

# 2. Push to Tenderly with tag
tenderly contracts push --networks 1 --tag production-v1.0.0
For deploying across multiple networks:
# Deploy to multiple networks
tenderly contracts push --networks 1,137,42161
Configure in tenderly.yaml:
project_slug: my-project

Next Steps

Now that you’ve completed the quickstart, explore more features:

Contract Management

Learn advanced contract management features

Web3 Actions

Automate workflows with Web3 Actions

DevNets

Create development networks on-demand

Configuration

Customize your tenderly.yaml configuration

Troubleshooting

If login fails, try:
  • Check your credentials
  • Use --force to override existing login
  • Generate a new access key from the Dashboard
tenderly login --force
If you see “You need to initiate the project first”:
tenderly init --re-init
Ensure your project has:
  • Compiled artifacts (build files)
  • Deployment records
  • Valid project structure for your framework
For Hardhat, make sure you’re using the @tenderly/hardhat-tenderly plugin.

Getting Help

Build docs developers (and LLMs) love