tenderly init command sets up the Tenderly CLI for a project by creating a tenderly.yaml configuration file that links your local environment to a Tenderly project.
Usage
Prerequisites
You must be logged in before initializing a project. Run
tenderly login if you haven’t authenticated yet.Interactive Initialization
Run the command without flags for an interactive setup:- Detect your deployment framework (Truffle, Hardhat, etc.)
- Verify the project directory structure
- Fetch your available Tenderly projects
- Prompt you to select or create a project
Flags
The project slug to use for initialization.If the project exists, it will be used automatically. If it doesn’t exist, combine with
--create-project to create it.Creates the project specified by
--project if it doesn’t exist.Force re-initialization of an already initialized project.Use this to change the project configuration or switch to a different Tenderly project.
Skip directory structure validation.By default, the CLI validates that your current directory contains a supported framework structure (Truffle, Hardhat, etc.). Use this flag to initialize in any directory.
Examples
Basic Initialization
Initialize with Specific Project
Create New Project During Init
Re-initialize Existing Project
If you need to change project settings:Force Init Without Framework Detection
What Gets Created
After successful initialization, atenderly.yaml file is created in your project directory:
tenderly.yaml
Configuration Fields
- account_id: Your Tenderly account ID
- project_slug: The project identifier (format:
username/project-namefor shared projects, or justproject-namefor personal projects) - provider: The detected deployment framework (e.g.,
hardhat,truffle,foundry)
Behavior
Detect Framework
Unless
--force is used, detects your deployment framework by checking for:- Hardhat configuration files
- Truffle directories
- Foundry structure
- Other supported frameworks
Project Selection
- If
--projectis provided, uses that project - Otherwise, presents an interactive selection menu
- Option to create a new project if needed
Error Scenarios
Not Logged In
tenderly login
Already Initialized
tenderly init --re-init
Wrong Directory
If not in a valid framework directory:--force to skip validation
Failed to Fetch Projects
tenderly update
Configuration Updates
You can modify the generatedtenderly.yaml file manually or use --re-init:
The
tenderly.yaml file should be committed to version control so team members can use the same Tenderly project.Next Steps
After initialization:- Push contracts: Use
tenderly pushto upload your verified contracts - Export transactions: Run
tenderly exportto analyze historical transactions - Configure monitoring: Set up alerts and monitoring in the Tenderly dashboard
- Run simulations: Use
tenderly simulatefor transaction simulations