Repository navigation
Expand file tree
/
Copy pathsetup-mount-points.sh
More file actions
executable file
·157 lines (130 loc) · 3.24 KB
/
Copy pathsetup-mount-points.sh
File metadata and controls
executable file
·157 lines (130 loc) · 3.24 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#!/bin/sh
# Creates every file/dir that docker-compose.yml bind-mounts, so docker does not
# turn missing files into directories. Existing files are never overwritten.
#
# Shell, git, ssh and npm files live in the host home (~), the coding agent
# (LLM) dirs live in .home within this repository (git-ignored).
set -eu
LLM_HOME="$(cd "$(dirname "$0")" && pwd)/.home"
# writes stdin into the given file, unless it already exists
seed() {
if [ -f "$1" ]; then
cat > /dev/null
else
cat > "$1"
fi
}
# bash
touch ~/.bash_docker
touch ~/.bash_history
# zsh
touch ~/.zsh_docker
touch ~/.zsh_history
# git
touch ~/.gitconfig
touch ~/.gitignore
# ssh
mkdir -p ~/.ssh
touch ~/.ssh/github.pub
# npm
touch ~/.npmrc
# antigravity (lives within ~/.gemini, next to gemini, plus ~/.config/antigravity)
mkdir -p "$LLM_HOME/.gemini/antigravity-cli" "$LLM_HOME/.config/antigravity"
seed "$LLM_HOME/.gemini/antigravity-cli/settings.json" <<'EOF'
{
"allowNonWorkspaceAccess": true,
"colorScheme": "terminal",
"showTips": false,
"toolPermission": "always-proceed",
"trustedWorkspaces": [
"/app"
]
}
EOF
chmod 700 \
"$LLM_HOME/.gemini/antigravity-cli" \
"$LLM_HOME/.config/antigravity"
chmod 600 "$LLM_HOME/.gemini/antigravity-cli/settings.json"
# claude
mkdir -p "$LLM_HOME/.claude"
seed "$LLM_HOME/.claude/settings.json" <<'EOF'
{
"fileCheckpointingEnabled": false,
"permissions": {
"defaultMode": "bypassPermissions"
},
"skipDangerousModePermissionPrompt": true,
"spinnerTipsEnabled": false,
"switchModelsOnFlag": false,
"theme": "auto"
}
EOF
chmod 700 "$LLM_HOME/.claude"
chmod 600 "$LLM_HOME/.claude/settings.json"
# codex
mkdir -p "$LLM_HOME/.codex"
seed "$LLM_HOME/.codex/config.toml" <<'EOF'
approval_policy = "never"
sandbox_mode = "danger-full-access"
[notice]
hide_full_access_warning = true
EOF
chmod 700 "$LLM_HOME/.codex"
chmod 600 "$LLM_HOME/.codex/config.toml"
# gemini
mkdir -p "$LLM_HOME/.gemini"
seed "$LLM_HOME/.gemini/settings.json" <<'EOF'
{
"general": {
"checkpointing": {
"enabled": false
}
},
"security": {
"disableYoloMode": false,
"folderTrust": {
"enabled": false
}
},
"ui": {
"autoThemeSwitching": true,
"hideTips": true
}
}
EOF
chmod 700 "$LLM_HOME/.gemini"
chmod 600 "$LLM_HOME/.gemini/settings.json"
# opencode
mkdir -p "$LLM_HOME/.config/opencode" "$LLM_HOME/.local/share/opencode"
seed "$LLM_HOME/.config/opencode/opencode.jsonc" <<'EOF'
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"*": "allow"
}
}
EOF
seed "$LLM_HOME/.config/opencode/tui.json" <<'EOF'
{
"$schema": "https://opencode.ai/tui.json",
"theme": "system",
"tips": false
}
EOF
chmod 700 \
"$LLM_HOME/.config/opencode" \
"$LLM_HOME/.local/share/opencode"
chmod 600 \
"$LLM_HOME/.config/opencode/opencode.jsonc" \
"$LLM_HOME/.config/opencode/tui.json"
# pi (configured packages get installed on startup)
mkdir -p "$LLM_HOME/.pi/agent"
seed "$LLM_HOME/.pi/agent/settings.json" <<'EOF'
{
"packages": [
"git:github.com/huggingface/pi-llama"
]
}
EOF
chmod 700 "$LLM_HOME/.pi/agent"
chmod 600 "$LLM_HOME/.pi/agent/settings.json"