-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdicklesworthstone-stack.sh
More file actions
352 lines (328 loc) · 12.3 KB
/
Copy pathdicklesworthstone-stack.sh
File metadata and controls
352 lines (328 loc) · 12.3 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
#!/usr/bin/env sh
set -eu
# =============================================================================
# Dicklesworthstone Stack Installer/Updater
# =============================================================================
#
# NOTE: This is a wholesale install and update script. It is not intended to be cloned and used straight away without paying attention to the individual components you want to use. Please review the individual `install_all()` and `update_all()` functions and the comments for each component before running. The easiest way of eliminating any given component is to manually comment out items from these two orchestration scripts commands before running them.
#
#
# A curated set of command-line utilities from the Dicklesworthstone "Agent
# Flywheel (ACFS)" software ecosystem for AI-assisted development workflows.
#
# Website: https://agent-flywheel.com/
# Setup: https://github.com/Dicklesworthstone/agentic_coding_flywheel_setup
# Author: https://github.com/Dicklesworthstone
#
# -----------------------------------------------------------------------------
# ASSUMPTIONS
# -----------------------------------------------------------------------------
# - uv is installed and on PATH
# - python3 is installed and on PATH
# - curl is installed and on PATH
# - bash is recommended (sh fallback works for most installers)
#
# -----------------------------------------------------------------------------
# BEHAVIOR
# -----------------------------------------------------------------------------
# - Runs installs/updates from the user root directory ($HOME) to avoid
# accidentally performing project-local actions.
# - Some tools are installed once per user (global CLI + home-directory
# config), while others require per-repository setup (hooks, registrations).
#
# -----------------------------------------------------------------------------
# COMPONENTS (in recommended install order)
# -----------------------------------------------------------------------------
#
# 1) NTM - Named Tmux Manager
# https://github.com/Dicklesworthstone/ntm
# A tmux-based session manager for running and supervising multiple AI
# coding agents in parallel. Provides dashboards, activity/health
# monitoring, output streaming, and tooling to search/extract/diff agent
# output. Supports "robot mode" commands for scripting and integrations.
#
# 2) SLB - Simultaneous Launch Button
# https://github.com/Dicklesworthstone/slb
# A two-person-rule CLI for AI agent workflows that gates potentially
# destructive commands behind explicit peer review. Classifies commands
# into risk tiers and tracks approvals in a local SQLite state store.
#
# 3) UBS - Ultimate Bug Scanner
# https://github.com/Dicklesworthstone/ultimate_bug_scanner
# A fast, multi-language bug scanner designed to catch common production
# issues with a single command. Emits CI-friendly output and machine-
# readable reports for automation.
#
# 4) CASS - Coding Agent Session Search
# https://github.com/Dicklesworthstone/coding_agent_session_search
# A unified search/index tool for local coding-agent history across
# multiple assistants (Claude Code, Codex, Gemini, Cursor, Aider, etc.).
# Provides an interactive TUI and automation-friendly JSON/robot modes.
#
# 5) CASS Memory (cm) - Procedural Memory for Agents
# https://github.com/Dicklesworthstone/cass_memory_system
# A "procedural memory" layer that turns past coding sessions into a
# searchable playbook of rules and anti-patterns. Helps agents reuse
# proven patterns instead of reinventing.
#
# 6) CAAM - Coding Agent Account Manager
# https://github.com/Dicklesworthstone/coding_agent_account_manager
# A utility for instantly switching between multiple authenticated
# accounts for subscription-based AI coding CLIs by backing up and
# restoring local auth files. Supports cooldown tracking and rotation.
#
# 7) RU - Repo Updater
# https://github.com/Dicklesworthstone/repo_updater
# An automation-friendly CLI for keeping many GitHub repositories
# synchronized. Clones missing repos, pulls updates, detects diverged/
# dirty/conflict states, and prints actionable resolution commands.
#
# 8) DCG - Destructive Command Guard
# https://github.com/Dicklesworthstone/destructive_command_guard
# A safety hook to intercept and block destructive shell/git commands
# before they execute in agent-driven workflows. Provides explanations
# and safer alternatives via an "explain" mode.
#
# 9) MCP Agent Mail (mcp_agent_mail) - INSTALLED LAST
# https://github.com/Dicklesworthstone/mcp_agent_mail
# A mailbox-style coordination system for coding agents supporting
# messaging, acknowledgements, and advisory file reservations. Stores
# state in SQLite while writing human-auditable artifacts into Git.
# NOTE: Requires per-repo registration; typically updated manually.
#
# =============================================================================
log() { printf "%s\n" "$*" >&2; }
die() { log "ERROR: $*"; exit 1; }
need_cmd() {
command -v "$1" >/dev/null 2>&1 || die "Missing required command: $1"
}
run_bash() {
# Prefer bash for curl|bash installers; fall back to sh.
if command -v bash >/dev/null 2>&1; then
bash -lc "$*"
else
sh -lc "$*"
fi
}
epoch() { date +%s; }
# Yellow "==> " indicator
yellow() {
# ANSI yellow: 33
printf "\033[33m==> %s\033[0m\n" "$*" >&2
}
preflight() {
need_cmd curl
need_cmd uv
need_cmd python3
}
# ---- per-tool install/update ----
# NTM
# Repo URL: https://github.com/Dicklesworthstone/ntm
install_ntm() {
yellow "Installing NTM"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/ntm/main/install.sh | bash'
cd "$_orig_dir"
}
update_ntm() {
yellow "Updating NTM"
local _orig_dir="$(pwd)"
cd "$HOME"
if command -v ntm >/dev/null 2>&1; then
run_bash 'ntm upgrade --yes'
else
install_ntm
fi
cd "$_orig_dir"
}
# SLB
# Repo URL: https://github.com/Dicklesworthstone/slb
install_slb() {
yellow "Installing SLB"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/slb/main/scripts/install.sh | bash'
cd "$_orig_dir"
}
update_slb() {
yellow "Updating SLB"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/slb/main/scripts/install.sh | bash'
cd "$_orig_dir"
}
# UBS
# Repo URL: https://github.com/Dicklesworthstone/ultimate_bug_scanner
install_ubs() {
yellow "Installing UBS"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/ultimate_bug_scanner/master/install.sh?$(epoch)\" | bash -s --"
cd "$_orig_dir"
}
update_ubs() {
yellow "Updating UBS"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/ultimate_bug_scanner/master/install.sh?$(epoch)\" | bash -s --"
cd "$_orig_dir"
}
# CASS
# Repo URL: https://github.com/Dicklesworthstone/coding_agent_session_search
install_cass() {
yellow "Installing CASS"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/coding_agent_session_search/main/install.sh | bash -s -- --easy-mode --verify'
cd "$_orig_dir"
}
update_cass() {
yellow "Updating CASS"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/coding_agent_session_search/main/install.sh | bash -s -- --easy-mode --verify'
cd "$_orig_dir"
}
# CASS Memory
# Repo URL: https://github.com/Dicklesworthstone/cass_memory_system
install_cass_memory() {
yellow "Installing CASS Memory"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/cass_memory_system/main/install.sh | bash -s -- --easy-mode --verify'
cd "$_orig_dir"
}
update_cass_memory() {
yellow "Updating CASS Memory"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash 'curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/cass_memory_system/main/install.sh | bash -s -- --easy-mode --verify'
cd "$_orig_dir"
}
# CAAM
# Repo URL: https://github.com/Dicklesworthstone/coding_agent_account_manager
install_caam() {
yellow "Installing CAAM"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/coding_agent_account_manager/main/install.sh?$(epoch)\" | bash"
cd "$_orig_dir"
}
update_caam() {
yellow "Updating CAAM"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/coding_agent_account_manager/main/install.sh?$(epoch)\" | bash"
cd "$_orig_dir"
}
# RU
# Repo URL: https://github.com/Dicklesworthstone/repo_updater
install_ru() {
yellow "Installing RU"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/repo_updater/main/install.sh?ru_cb=$(epoch)\" | bash"
cd "$_orig_dir"
}
update_ru() {
yellow "Updating RU"
local _orig_dir="$(pwd)"
cd "$HOME"
if command -v ru >/dev/null 2>&1; then
run_bash 'ru self-update'
else
install_ru
fi
cd "$_orig_dir"
}
# DCG
# Repo URL: https://github.com/Dicklesworthstone/destructive_command_guard
install_dcg() {
yellow "Installing DCG"
local _orig_dir="$(pwd)"
cd "$HOME"
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/master/install.sh?$(epoch)\" | bash -s -- --easy-mode"
cd "$_orig_dir"
}
update_dcg() {
yellow "Updating DCG"
local _orig_dir="$(pwd)"
cd "$HOME"
if command -v dcg >/dev/null 2>&1; then
run_bash 'dcg update'
else
install_dcg
fi
cd "$_orig_dir"
}
# MCP Agent Mail (LAST)
# Repo URL: https://github.com/Dicklesworthstone/mcp_agent_mail
#
# NOTE: Keep these commands here for reference, but this component should be
# updated manually (because it is commonly wired per-repo via registrations and
# optional guards).
install_mcp_agent_mail() {
yellow "Installing MCP Agent Mail (mcp_agent_mail) — SKIPPED (manual)"
local _orig_dir="$(pwd)"
cd "$HOME"
# Manual install:
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/mcp_agent_mail/main/scripts/install.sh?$(epoch)\" | bash -s -- --yes"
cd "$_orig_dir"
}
update_mcp_agent_mail() {
yellow "Updating MCP Agent Mail (mcp_agent_mail) — SKIPPED (manual)"
local _orig_dir="$(pwd)"
cd "$HOME"
# Manual update (re-run installer):
run_bash "curl -fsSL \"https://raw.githubusercontent.com/Dicklesworthstone/mcp_agent_mail/main/scripts/install.sh?$(epoch)\" | bash -s -- --yes"
cd "$_orig_dir"
}
# ---- orchestration ----
install_all() {
log "Installing Dicklesworthstone stack..."
install_ntm # Named Tmux Manager
install_slb # Simultaneous Launch Button
install_ubs # Ultimate Bug Scanner
install_cass # Coding Agent Session Search
install_cass_memory # CASS Memory (cm)
install_caam # Coding Agent Account Manager
install_ru # Repo Updater
install_dcg # Destructive Command Guard
# install_mcp_agent_mail # MCP Agent Mail (manual)
log "Done."
}
update_all() {
log "Updating Dicklesworthstone stack..."
update_ntm # Named Tmux Manager
update_slb # Simultaneous Launch Button
update_ubs # Ultimate Bug Scanner
update_cass # Coding Agent Session Search
update_cass_memory # CASS Memory (cm)
update_caam # Coding Agent Account Manager
update_ru # Repo Updater
update_dcg # Destructive Command Guard
update_mcp_agent_mail # MCP Agent Mail (manual)
log "Done."
}
usage() {
cat <<'EOF'
Usage:
dicklesworthstone-stack.sh install # install all components (from $HOME)
dicklesworthstone-stack.sh update # update all components (from $HOME)
dicklesworthstone-stack.sh help
Assumes:
- uv, python3, curl are already installed and on PATH.
Notes:
- MCP Agent Mail is intentionally skipped by default; see the script comments
for the manual install/update one-liners.
EOF
}
preflight
cmd="${1:-help}"
case "$cmd" in
install) install_all ;;
update) update_all ;;
help|-h|--help) usage ;;
*) die "Unknown command: $cmd (try: help)" ;;
esac