A macOS counterpart of CoreDesktop's configure, with the same drop-in items in configure.d/: - core: Mail, Calendar and Contacts through a configuration profile, Superpanel as an app, Nextcloud files through the Nextcloud app, and Element; with test-and-fix, password change and removal - tailscale: join the Core's network through headscale - backup: restic to Nextcloud through rclone, run by launchd through an app that can be given Full Disk Access - storage: SMB shares mounted the way Finder does, again at login and on network changes - agents, claude, opencode, hermes, sandbox: install the agents and run them in Anthropic's sandbox runtime (Seatbelt on macOS) - ai-servers: LLM servers on this Mac or the network, for the agents Apps and tools macOS lacks are offered for download, checked against their makers' Team IDs and notarization, or published SHA-256 sums. Everything runs on macOS' bash 3.2 with only built-in tools. smoketest/ runs scenarios in fresh macOS VMs with Tart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
728 B
Bash
28 lines
728 B
Bash
#!/bin/bash
|
|
|
|
# configure reads TITLE and DESCRIPTION
|
|
# shellcheck disable=SC2034
|
|
TITLE="opencode"
|
|
# shellcheck disable=SC2034
|
|
DESCRIPTION="Sign in to AI providers"
|
|
|
|
source "$CONNECTOR/configure.d/lib/json.sh"
|
|
source "$CONNECTOR/configure.d/lib/agents.sh"
|
|
|
|
is_installed() {
|
|
agent_installed opencode
|
|
}
|
|
|
|
# Signed in to at least one provider
|
|
is_configured() {
|
|
json_get 'Object.keys(d).length > 0' < "$HOME/.local/share/opencode/auth.json"
|
|
}
|
|
|
|
run_configure() {
|
|
echo "Choose a provider and sign in or paste its API key. You can pick the model inside opencode with /models."
|
|
unsandboxed opencode auth login || return 1
|
|
while confirm "Sign in to another provider?"; do
|
|
unsandboxed opencode auth login || return 1
|
|
done
|
|
}
|