fix: ocp-connect writes to all shell rc files + system-level env vars

- Writes to both .bashrc and .zshrc on macOS (covers both shells)
- macOS: launchctl setenv for GUI apps and daemons
- Linux: ~/.config/environment.d/ocp.conf for systemd user services
- Ensures IDEs and daemons can discover OCP models

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-12 12:58:27 +10:00
co-authored by Claude Opus 4.6
parent cb6c2a8b5f
commit 7f46405152
2 changed files with 67 additions and 27 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ OCP Connect
source /home/user/.bashrc
```
After running, reload your shell (`source ~/.bashrc` or `source ~/.zshrc`) and your IDE will automatically use the remote OCP.
After running, reload your shell (`source ~/.bashrc` or `source ~/.zshrc`). On macOS, the script also sets `launchctl setenv` so GUI apps and daemons can see the env vars immediately (resets on reboot — re-run `ocp-connect` after restart).
**Manual setup** — if you prefer not to use the script:
```bash