Output Formats
The Tenderly CLI supports two output modes: text (human-readable) and json (machine-readable). You can switch between them using the--output flag.
Text Output (Default)
Text output is designed for human readability with colors, formatting, and helpful messages.Usage
Features
Colorized Output
Text mode includes color-coded messages:
- Green - Success messages and important values
- Red - Error messages and warnings
- Yellow - Informational messages
- Blue - Highlights and context
Progress Indicators
Visual feedback for long-running operations:
- Spinner animations during uploads
- Status messages for multi-step processes
- Progress updates for large operations
Formatted Tables
Structured data presented in readable tables and lists
Examples
Login Output
Login Output
Whoami Output
Whoami Output
Contract Push Output
Contract Push Output
Actions Deploy Output
Actions Deploy Output
Error Output
Error Output
JSON Output
JSON output is designed for programmatic consumption, scripting, and automation.Usage
Features
Structured Data
All output is valid JSON that can be parsed by tools like
jq, programming languages, or other CLI toolsMachine Readable
No colors, spinners, or formatting characters - just pure JSON data
Consistent Format
Predictable structure across all commands makes automation reliable
Examples
Whoami JSON Output
Whoami JSON Output
Version JSON Output
Version JSON Output
Error JSON Output
Error JSON Output
Parsing JSON Output
JSON output is particularly useful for automation and scripting.Using jq
jq is a powerful JSON processor for the command line.
Using Python
Using Node.js
Using Shell Scripts
Logging and Debug Output
The--debug flag enables verbose logging regardless of output mode.
Debug Mode
What Debug Mode Shows
API Requests
API Requests
Details about HTTP requests made to Tenderly API:
- Request method and URL
- Request headers
- Request body
- Response status
- Response body
File Operations
File Operations
Information about file system operations:
- Files being read
- Directories being scanned
- Build artifacts being processed
- Config files being loaded
Processing Steps
Processing Steps
Internal processing details:
- Contract compilation detection
- Network resolution
- Action function resolution
- Validation steps
Debug Output Example
CI/CD Integration
Combine output modes and logging for effective CI/CD pipelines.GitHub Actions Example
Script Example
Best Practices
Choose the Right Mode
- Text mode for interactive terminal use
- JSON mode for scripts and automation
- Debug mode for troubleshooting
Error Handling
Always check exit codes in scripts:The CLI returns:
0on success1on error
Parse JSON Safely
When using JSON output:
- Validate JSON before parsing
- Check for error fields
- Handle missing fields gracefully
- Use proper JSON parsers (jq, json.parse, etc.)
Capture Debug Logs
In CI/CD, consider saving debug output: