Skip to main content
FlowDeck is designed for automation. Every command supports JSON output for machine parsing and configuration files for reproducible builds, making it ideal for CI/CD pipelines, shell scripts, and AI-powered development tools.

Quick Start

# Save project settings once
flowdeck init -w MyApp.xcworkspace -s MyApp -S "iPhone 16"

# Run commands without repeating options
flowdeck build --json
flowdeck test --json
flowdeck run

JSON Output Mode

Add --json or -j to any command for machine-readable NDJSON (newline-delimited JSON) output:
flowdeck build --json
flowdeck test --json
flowdeck simulator list --json

Event Types

FlowDeck emits structured events that you can parse line-by-line:
Event TypeDescriptionWhen Emitted
statusProgress updatesDuring operations (building, testing, launching)
outputRaw process outputBuild output, test output, logs
diagnosticCompiler errors/warningsWhen xcodebuild reports issues
resultOperation completionAt end of build, test, clean operations
app_logInformational messagesStatus messages, configuration info
messageStructured messagesWarnings, errors, info with context
test_startedTest case startedWhen a test begins
test_passedTest case passedWhen a test succeeds
test_failedTest case failedWhen a test fails (includes failure details)
test_skippedTest case skippedWhen a test is skipped
configurationBuild configurationAt start of build/run/test
configuration events include the resolved Derived Data path so automation can trace build artifacts.

Event Structure

All events follow a standardized structure:
{
  "type": "status",
  "timestamp": "2025-01-13T10:30:45.123Z",
  "operation": "BUILD",
  "message": "Building",
  "stage": "BUILDING",
  "data": {
    "progress": 0.5,
    "phase": "Compiling"
  }
}

Parsing JSON Output

Use jq or similar tools to extract specific information:
# Check if build succeeded
flowdeck build --json | jq -s 'last | select(.type == "result") | .data.success'

# Get all errors
flowdeck build --json | jq 'select(.type == "diagnostic") | select(.data.severity == "error")'

# Count test failures
flowdeck test --json | jq -s '[.[] | select(.type == "test_failed")] | length'

# Get test summary
flowdeck test --json | jq 'select(.type == "result") | .data.summary'

Shell Script Example

#!/bin/bash
set -e

# Build and check result
flowdeck build --json | while IFS= read -r line; do
  type=$(echo "$line" | jq -r '.type')

  if [ "$type" = "diagnostic" ]; then
    severity=$(echo "$line" | jq -r '.data.severity')
    message=$(echo "$line" | jq -r '.message')
    if [ "$severity" = "error" ]; then
      echo "ERROR: $message" >&2
    fi
  fi

  if [ "$type" = "result" ]; then
    success=$(echo "$line" | jq -r '.data.success')
    if [ "$success" = "true" ]; then
      echo "Build succeeded"
    else
      echo "Build failed" >&2
      exit 1
    fi
  fi
done

Configuration Files

Store build settings in JSON files for reproducible builds:
flowdeck build --config .flowdeck/config.json
flowdeck test --config .flowdeck/config.json --json

Config File Structure

{
  "workspace": "MyApp.xcworkspace",
  "scheme": "MyApp",
  "configuration": "Debug",
  "platform": "iOS",
  "version": "18.0",
  "simulatorUdid": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
  "derivedDataPath": "/tmp/flowdeck-derived-data",
  "xcodebuild": {
    "args": ["-enableCodeCoverage", "YES"],
    "env": {
      "CI": "true"
    }
  },
  "appLaunch": {
    "args": ["-SkipOnboarding"],
    "env": {
      "DEBUG_MODE": "1"
    }
  }
}

Config File Fields

FieldTypeRequiredDescription
workspacestringYesPath to .xcworkspace or .xcodeproj
schemestringYesScheme name to build
configurationstringNoBuild configuration (Debug/Release)
platformstringNoTarget platform: iOS, macOS, watchOS, tvOS, visionOS
versionstringNoOS version (e.g., 18.0)
simulatorUdidstringNoSpecific simulator UDID
deviceUdidstringNoPhysical device UDID
derivedDataPathstringNoCustom derived data directory (default: ~/Library/Developer/FlowDeck/DerivedData)
xcodebuildobjectNoPassthrough settings for xcodebuild
appLaunchobjectNoArguments and env vars passed to app at launch
See Configuration File for complete reference and examples.

Init Command

Save project settings to avoid repeating options on every command:
# Save settings
flowdeck init -w MyApp.xcworkspace -s MyApp -S "iPhone 16"

# Now run commands without options
flowdeck build
flowdeck test
flowdeck run
Settings are saved to ~/.flowdeck/ and automatically loaded by subsequent commands.

Init Options

OptionShortDescription
--workspace-wPath to workspace or project
--scheme-sScheme name
--simulator-SSimulator name or UDID
--device-DDevice name or UDID
--configuration-CBuild configuration

Exit Codes

All commands return appropriate exit codes for scripting:
CodeDescription
0Success
1Failure (build failed, tests failed, etc.)
64Usage error (invalid arguments)
flowdeck build --json && echo "Build passed" || echo "Build failed"

Environment Variables

VariableDescription
FLOWDECK_LICENSE_KEYLicense key for CI/CD (no activation needed)
DEVELOPER_DIROverride Xcode installation path
FLOWDECK_NO_UPDATE_CHECKSet to 1 to disable update notifications

Common Automation Patterns

Pattern 1: Config-Driven Builds

# Create config files for different scenarios
flowdeck build --config .flowdeck/debug-config.json
flowdeck build --config .flowdeck/release-config.json
flowdeck test --config .flowdeck/ci-config.json --json

Pattern 2: State-Driven Shortcuts

# Setup once
flowdeck init -w MyApp.xcworkspace -s MyApp -S "iPhone 16"

# Run repeatedly without options
flowdeck build
flowdeck test
flowdeck run

Pattern 3: JSON Streaming

# Parse events as they stream
flowdeck build --json | while read -r event; do
  echo "$event" | jq -r 'select(.type == "status") | .message'
done

Pattern 4: CI/CD Pipeline

# Full CI workflow
flowdeck clean --all
flowdeck build --config .flowdeck/ci-config.json --json
flowdeck test --config .flowdeck/ci-config.json --json

# Check results
if flowdeck test --json | jq -s 'last | .data.success' | grep -q true; then
  echo "All tests passed"
else
  echo "Tests failed"
  exit 1
fi

Pattern 5: Dynamic Simulator Selection

# Find and use a specific simulator
UDID=$(flowdeck simulator list -P iOS --json | \
  jq -r '.[] | select(.name | contains("iPhone 16")) | .udid' | head -1)

flowdeck init -w MyApp.xcworkspace -s MyApp -S "$UDID"
flowdeck build --json

Commands with JSON Support

Most commands support --json output:
CommandJSON SupportNotes
buildYesFull event streaming
runYesIncludes app logs
testYesTest results with details
cleanYesClean status events
logsYesStructured log events
simulator listYesArray of simulators
simulator bootYesBoot status
device listYesArray of devices
project schemesYesArray of schemes
project configsYesArray of configurations
appsYesRunning app list
license statusYesLicense details

AI Agent Integration

FlowDeck’s JSON output makes it ideal for AI-powered development tools like Claude Code, Cursor, and CodeX. The structured output allows AI agents to:
  • Parse build errors and suggest fixes
  • Monitor test results and identify failing tests
  • Automate build-test-fix cycles
  • Track simulator and device state
See AI Agent Integration for setup guides for specific AI tools.

Next Steps