Skip to main content
Most Sentry CLI commands support the --json flag to output machine-readable JSON instead of human-formatted text. This makes it easy to integrate with scripts, CI/CD pipelines, and other automation tools.

Using the —json Flag

Add --json to any supported command:

Commands with JSON Support

Organization Commands

Project Commands

Issue Commands

Authentication Commands

Parsing JSON Output

Using jq

jq is a powerful command-line JSON processor:

Using Python

Using Node.js

Using Bash

CI/CD Integration

GitHub Actions

.github/workflows/monitor-issues.yml

GitLab CI

.gitlab-ci.yml

Jenkins Pipeline

Jenkinsfile

Best Practices

Troubleshooting

Invalid JSON Output

If you get invalid JSON, check if there are error messages mixed with the output:

Empty Output

Empty arrays are valid JSON:
This means no issues match your filters. Check:
  • Date range (--period)
  • Status filter (--status)
  • Project selection

Encoding Issues

If you see encoding errors with special characters: