-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
24 lines (19 loc) · 739 Bytes
/
Copy pathinstall.sh
File metadata and controls
24 lines (19 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
set -euo pipefail
INSTALL_DIR="${OPENCODE_SWITCH_INSTALL_DIR:-$HOME/.local/bin}"
SCRIPT="$INSTALL_DIR/opcode-switch"
KEYS_DIR="$HOME/.opencode/keys"
echo "→ Installing opcode-switch to $INSTALL_DIR"
mkdir -p "$INSTALL_DIR"
mkdir -p "$KEYS_DIR"
curl -fsSL -o "$SCRIPT" https://raw.githubusercontent.com/srmdn/opcode-kit/main/bin/opcode-switch
chmod +x "$SCRIPT"
echo
echo "✓ opcode-switch installed"
echo " Canonical home: https://github.com/srmdn/opcode-kit"
echo
echo "Quickstart:"
echo " opcode-switch # list accounts"
echo " opcode-switch --add mykey sk-… # add an account"
echo " opcode-switch mykey # switch to it"
echo " opcode-switch --verify # check key works"