feat(shorebird_cli): Add --json output for agentic CLI consumption (#3717)

Co-authored-by: Nick Weatherley <nick@Nicks-MacBook-Pro.local>
This commit is contained in:
nickshorebird
2026-04-28 09:35:32 -04:00
committed by GitHub
parent cfc18286f8
commit c77f86f04c
13 changed files with 1257 additions and 20 deletions
+9
View File
@@ -19,6 +19,15 @@ if [[ ! -d "$BIN_DIR/cache/flutter/$FLUTTER_VERSION/bin" ]]; then
rm -f "$BIN_DIR/cache/shorebird.stamp"
fi
# When --json is passed, tell shared.sh to redirect bootstrap output
# (flutter --version, pub get, git) to stderr so stdout is pure JSON.
for arg in "$@"; do
if [[ "$arg" == "--json" ]]; then
export SHOREBIRD_JSON_MODE=true
break
fi
done
source "$BIN_DIR/../third_party/flutter/bin/internal/shared.sh"
# We currently depend on a forked (3.7.8 stable) Flutter shared.sh script