feat: Linux compatibility fixes for cross-platform PAI #288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 4 critical Linux compatibility issues, enabling PAI installation on Google Gemini CLI and other Linux environments.
Motivation
After contributing Google Cloud TTS (#285), we tested PAI installation on Linux (Ubuntu/WSL2) to enable use with Google Gemini CLI. Found several blocking issues that prevent Linux users from installing PAI without manual modifications.
What's Changed
Key Improvements
sed Command: Added USERNAME fallback and platform detection for macOS BSD vs GNU sed
PATH Detection: Conditional Homebrew path only if directory exists
systemd Auto-Start: Full Linux support using systemd best practices (percent-h, WorkingDirectory, loginctl linger)
Documentation: New PLATFORM.md tracking all 22 platform issues with community contribution roadmap
Testing
Tested on Ubuntu 24.04 (WSL2) with systemd 255:
Breaking Changes
None. macOS functionality unchanged. Pure additions for Linux support.
Aligns with PAI Principles
Simple platform detection via uname, UNIX philosophy with native tools, transparent user-visible logic, deterministic behavior, removes macOS-only assumptions.
Generated with Claude Code