---
title: "Flyctl meets JSON"
description: "Flyctl adds a --json, or -j, flag that presents command output as JSON to support automation around Fly applications. For GraphQL-backed commands it emits the API data, while logs become structured JSON and deployment progress arrives as a stream of Source/Status/Message objects. The post demonstrates piping flyctl list apps --json through jq to filter fields, convert hostnames and statuses to CSV, and select undeployed apps whose names feed xargs flyctl info --json -a; jq -s then gathers the resulting objects into an array. Because deployment output currently mixes JSON with non-JSON messages, the post recommends using --detach and polling flyctl status or running flyctl monitor instead of relying on the JSON stream for deployment monitoring."
---

# Flyctl meets JSON

[Fly.io](https://yomu.fyi/company/fly-io) · Jun 23, 2020

**Type:** Announcement

## Summary

Flyctl adds a --json, or -j, flag that presents command output as JSON to support automation around Fly applications. For GraphQL-backed commands it emits the API data, while logs become structured JSON and deployment progress arrives as a stream of Source/Status/Message objects. The post demonstrates piping flyctl list apps --json through jq to filter fields, convert hostnames and statuses to CSV, and select undeployed apps whose names feed xargs flyctl info --json -a; jq -s then gathers the resulting objects into an array. Because deployment output currently mixes JSON with non-JSON messages, the post recommends using --detach and polling flyctl status or running flyctl monitor instead of relying on the JSON stream for deployment monitoring.

## Context

The new flag is intended to enable custom automation solutions for workflows involving Fly applications, including processing command output for other applications and management platforms.

## Approach / What changed

Flyctl adds --json, short for -j, and emits JSON for command results, structured logs, and deployment progress messages. The examples use jq to filter, reshape, convert, and collect the output, while deployment monitoring uses --detach with status polling or flyctl monitor.

## Takeaways

- flyctl list apps --json returns an array containing application ID, name, status, deployment state, hostname, and organization.
- jq can transform Flyctl JSON into CSV, filter applications with .Deployed==false, and use xargs to run flyctl info --json for each matching app.
- Deployment JSON is currently mixed with non-JSON messages, so the post advises against using that stream for monitoring and recommends --detach, flyctl status, or flyctl monitor.

**Tags:** [Fly](https://yomu.fyi/topic/fly), [jq](https://yomu.fyi/topic/jq)

- Source: [Fly.io](https://fly.io/blog/flyctl-meets-json)
- Source URL: https://fly.io/blog/flyctl-meets-json
- Ingested by Yomu: 2026-09-03T01:23:29.952Z

[Read original post](https://fly.io/blog/flyctl-meets-json)
