Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·79 lines (70 loc) · 1.81 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·79 lines (70 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh
set -eu
agent="${CODEROAM_AGENT:-auto}"
session_id="${CODEROAM_SESSION_ID:-codex-session}"
workdir="${CODEROAM_WORKDIR:-$(pwd)}"
install_mode="${CODEROAM_INSTALL_MODE:-stable}"
usage() {
cat <<'EOF'
Usage: install.sh [--agent auto|codex|claude|gemini|opencode|none] [--session-id ID] [--workdir PATH] [--stable|--head]
Environment:
CODEROAM_AGENT Agent setup target. Default: auto
CODEROAM_SESSION_ID Active session id. Default: codex-session
CODEROAM_WORKDIR Workspace path for generated agent commands. Default: current directory
CODEROAM_INSTALL_MODE "stable" or "head". Default: stable
EOF
}
while [ "$#" -gt 0 ]; do
case "$1" in
--agent)
agent="${2:-}"
shift 2
;;
--session-id)
session_id="${2:-}"
shift 2
;;
--workdir)
workdir="${2:-}"
shift 2
;;
--stable)
install_mode="stable"
shift
;;
--head)
install_mode="head"
shift
;;
--help|-h)
usage
exit 0
;;
*)
echo "unknown option: $1" >&2
usage >&2
exit 2
;;
esac
done
if ! command -v brew >/dev/null 2>&1; then
echo "Homebrew is required. Install it first: https://brew.sh/" >&2
exit 1
fi
brew tap dnikolayev/coderoam https://github.com/dnikolayev/coderoam.git </dev/null
if command -v brew >/dev/null 2>&1 && brew trust --help >/dev/null 2>&1 </dev/null; then
brew trust dnikolayev/coderoam >/dev/null 2>&1 </dev/null || true
fi
case "$install_mode" in
stable)
brew install dnikolayev/coderoam/coderoam </dev/null
;;
head)
brew install --HEAD dnikolayev/coderoam/coderoam </dev/null
;;
*)
echo "CODEROAM_INSTALL_MODE must be 'head' or 'stable'" >&2
exit 2
;;
esac
coderoam setup --print --agent "$agent" --workdir "$workdir" --session-id "$session_id"