Repository navigation
Expand file tree
/
Copy pathghost.sh
More file actions
61 lines (59 loc) · 3.08 KB
/
Copy pathghost.sh
File metadata and controls
61 lines (59 loc) · 3.08 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
#!/usr/bin/env bash
# GHOST — interactive launcher for device ID reset tools.
# Run: bash ghost.sh
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
LINUX_DIR="$SCRIPT_DIR/src/linux"
# shellcheck source=src/linux/id_reset_common.sh
source "$LINUX_DIR/id_reset_common.sh"
while true; do
show_banner "Interactive Menu"
echo " --- IDE Resets ---"
echo " 1) Reset Cursor machine IDs"
echo " 2) Reset Devin machine IDs (formerly Windsurf)"
echo " 3) Reset Trae machine IDs (derived paths - see note in script)"
echo " 4) Reset Qoder machine IDs (derived paths - see note in script)"
echo " 5) Reset QoderWork machine IDs (derived paths - see note in script)"
echo " 6) Reset ZCode machine IDs (derived paths - see note in script)"
echo " 7) Reset MiniMax/OpenCode machine IDs (derived paths - see note in script)"
echo " --- System ---"
echo " 8) Generate hardware fingerprint (JSON)"
echo " 9) Reset system machine-id only (requires root)"
echo " --- ZCode Multi-Instance (PR 8, derived - see notes) ---"
echo " 10) Launch a ZCode clone (Second..Sixth)"
echo " 11) Reset a ZCode clone (identity + userData)"
echo " 12) Launch a light headless worker (clone home)"
echo " 13) Sync ZCode MCPs to clones (definitions-only)"
echo " 0) Exit"
echo ""
read -r -p "Select an option [0-13]: " choice
case "$choice" in
# || true: a child exiting non-zero (declined kill, non-root
# ResetMachineId, failed reset) must not kill the menu via set -e.
1) bash "$LINUX_DIR/reset_cursor.sh" || true ;;
2) bash "$LINUX_DIR/reset_devin.sh" || true ;;
3) bash "$LINUX_DIR/reset_trae.sh" || true ;;
4) bash "$LINUX_DIR/reset_qoder.sh" || true ;;
5) bash "$LINUX_DIR/reset_qoderwork.sh" || true ;;
6) bash "$LINUX_DIR/reset_zcode.sh" || true ;;
7) bash "$LINUX_DIR/reset_minimax_opencode.sh" || true ;;
8) bash "$LINUX_DIR/change_device_id.sh" Fingerprint || true ;;
9) bash "$LINUX_DIR/change_device_id.sh" ResetMachineId || true ;;
10)
read -r -p "Instance (Second|Third|Fourth|Fifth|Sixth): " inst
bash "$LINUX_DIR/launch_zcode_clone.sh" --instance "$inst" || true ;;
11)
read -r -p "Instance (Second|Third|Fourth|Fifth|Sixth): " inst
bash "$LINUX_DIR/reset_zcode.sh" --instance "$inst" || true ;;
12)
read -r -p "Instance (Second|Third|Fourth|Fifth|Sixth): " inst
bash "$LINUX_DIR/launch_zcode_cli_light.sh" --instance "$inst" || true ;;
13)
read -r -p "Instance (Second|Third|Fourth|Fifth|Sixth|All): " inst
bash "$LINUX_DIR/sync_zcode_assets.sh" --instance "$inst" || true ;;
0) info "Goodbye."; exit 0 ;;
*) err "Invalid option: $choice" ;;
esac
echo ""
read -r -p "Press Enter to continue..." _dummy
done