omnish 1.6.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -2
- package/README.md +30 -18
- package/config.example.json +1 -0
- package/dist/downloads/omnish-claude/install.sh +174 -0
- package/dist/downloads/omnish-claude/uninstall.sh +114 -0
- package/dist/downloads/omnish-claude.tar.gz +0 -0
- package/dist/downloads/omnish-cursor/install.sh +162 -0
- package/dist/downloads/omnish-cursor/uninstall.sh +107 -0
- package/dist/downloads/omnish-cursor.tar.gz +0 -0
- package/dist/index.js +424 -391
- package/dist/omnish-claude/README.md +80 -0
- package/dist/omnish-claude/hooks/omnish-notify.py +213 -0
- package/dist/omnish-claude/hooks/omnish-notify.sh +13 -0
- package/dist/omnish-claude/install.sh +174 -0
- package/dist/omnish-claude/omnish-notify.json.example +8 -0
- package/dist/omnish-claude/scripts/doctor.sh +99 -0
- package/dist/omnish-claude/skill/SKILL.md +39 -0
- package/dist/omnish-claude/skill/files-and-sharing.md +94 -0
- package/dist/omnish-claude/skill/notifications.md +113 -0
- package/dist/omnish-claude/skill/setup-paths.md +81 -0
- package/dist/omnish-claude/uninstall.sh +114 -0
- package/dist/omnish-cursor/README.md +176 -0
- package/dist/omnish-cursor/hooks/__pycache__/omnish-notify.cpython-313.pyc +0 -0
- package/dist/omnish-cursor/hooks/omnish-notify.py +563 -0
- package/dist/omnish-cursor/hooks/omnish-notify.sh +13 -0
- package/dist/omnish-cursor/hooks/omnish-session-start.sh +48 -0
- package/dist/omnish-cursor/install.sh +162 -0
- package/dist/omnish-cursor/omnish-notify.json.example +13 -0
- package/dist/omnish-cursor/rules/omnish-notify.mdc +45 -0
- package/dist/omnish-cursor/scripts/doctor.sh +126 -0
- package/dist/omnish-cursor/skill/SKILL.md +129 -0
- package/dist/omnish-cursor/skill/files-and-sharing.md +94 -0
- package/dist/omnish-cursor/skill/notifications.md +155 -0
- package/dist/omnish-cursor/skill/setup-paths.md +81 -0
- package/dist/omnish-cursor/uninstall.sh +107 -0
- package/dist/ui/assets/{index-aUJGrxrr.js → index-BwG51a2I.js} +10 -10
- package/dist/ui/index.html +16 -1
- package/package.json +36 -28
- package/scripts/fix-node-pty-perms.mjs +41 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Remove Omnish Cursor bundle entries from ~/.cursor (keeps unrelated hooks).
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
CURSOR_DIR="${CURSOR_DIR:-$HOME/.cursor}"
|
|
6
|
+
HOOKS_JSON="$CURSOR_DIR/hooks.json"
|
|
7
|
+
|
|
8
|
+
REMOVE_HOOKS=1
|
|
9
|
+
REMOVE_SKILL=1
|
|
10
|
+
REMOVE_CONFIG=0
|
|
11
|
+
|
|
12
|
+
usage() {
|
|
13
|
+
cat <<EOF
|
|
14
|
+
Usage: $(basename "$0") [options]
|
|
15
|
+
|
|
16
|
+
Remove Omnish Cursor integration installed by install.sh.
|
|
17
|
+
|
|
18
|
+
Options:
|
|
19
|
+
--hooks-only Remove hooks + rule + hooks.json entries only
|
|
20
|
+
--skill-only Remove ~/.cursor/skills/omnish only
|
|
21
|
+
--with-config Also delete ~/.cursor/omnish-notify.json
|
|
22
|
+
-h, --help Show this help
|
|
23
|
+
EOF
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
while [[ $# -gt 0 ]]; do
|
|
27
|
+
case "$1" in
|
|
28
|
+
--hooks-only)
|
|
29
|
+
REMOVE_HOOKS=1
|
|
30
|
+
REMOVE_SKILL=0
|
|
31
|
+
shift
|
|
32
|
+
;;
|
|
33
|
+
--skill-only)
|
|
34
|
+
REMOVE_HOOKS=0
|
|
35
|
+
REMOVE_SKILL=1
|
|
36
|
+
shift
|
|
37
|
+
;;
|
|
38
|
+
--with-config)
|
|
39
|
+
REMOVE_CONFIG=1
|
|
40
|
+
shift
|
|
41
|
+
;;
|
|
42
|
+
-h | --help)
|
|
43
|
+
usage
|
|
44
|
+
exit 0
|
|
45
|
+
;;
|
|
46
|
+
*)
|
|
47
|
+
echo "error: unknown option: $1" >&2
|
|
48
|
+
usage >&2
|
|
49
|
+
exit 1
|
|
50
|
+
;;
|
|
51
|
+
esac
|
|
52
|
+
done
|
|
53
|
+
|
|
54
|
+
OMNISH_COMMANDS=(
|
|
55
|
+
"./hooks/omnish-session-start.sh"
|
|
56
|
+
"./hooks/omnish-notify.sh"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if [[ "$REMOVE_HOOKS" -eq 1 && -f "$HOOKS_JSON" ]]; then
|
|
60
|
+
python3 - "$HOOKS_JSON" "${OMNISH_COMMANDS[@]}" <<'PY'
|
|
61
|
+
import json
|
|
62
|
+
import sys
|
|
63
|
+
from pathlib import Path
|
|
64
|
+
|
|
65
|
+
hooks_path = Path(sys.argv[1])
|
|
66
|
+
remove_cmds = set(sys.argv[2:])
|
|
67
|
+
data = json.loads(hooks_path.read_text(encoding="utf-8"))
|
|
68
|
+
hooks = data.get("hooks") or {}
|
|
69
|
+
changed = False
|
|
70
|
+
for event, entries in list(hooks.items()):
|
|
71
|
+
if not isinstance(entries, list):
|
|
72
|
+
continue
|
|
73
|
+
filtered = [
|
|
74
|
+
e for e in entries
|
|
75
|
+
if not (isinstance(e, dict) and e.get("command") in remove_cmds)
|
|
76
|
+
]
|
|
77
|
+
if len(filtered) != len(entries):
|
|
78
|
+
changed = True
|
|
79
|
+
hooks[event] = filtered
|
|
80
|
+
if changed:
|
|
81
|
+
hooks_path.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8")
|
|
82
|
+
print(f"updated {hooks_path} (removed omnish hook entries)")
|
|
83
|
+
else
|
|
84
|
+
print(f"no omnish hook entries in {hooks_path}")
|
|
85
|
+
PY
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
if [[ "$REMOVE_HOOKS" -eq 1 ]]; then
|
|
89
|
+
rm -f \
|
|
90
|
+
"$CURSOR_DIR/hooks/omnish-notify.sh" \
|
|
91
|
+
"$CURSOR_DIR/hooks/omnish-notify.py" \
|
|
92
|
+
"$CURSOR_DIR/hooks/omnish-session-start.sh" \
|
|
93
|
+
"$CURSOR_DIR/rules/omnish-notify.mdc"
|
|
94
|
+
echo "removed hook scripts and omnish-notify rule"
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
if [[ "$REMOVE_SKILL" -eq 1 ]]; then
|
|
98
|
+
rm -rf "$CURSOR_DIR/skills/omnish"
|
|
99
|
+
echo "removed $CURSOR_DIR/skills/omnish"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
if [[ "$REMOVE_CONFIG" -eq 1 ]]; then
|
|
103
|
+
rm -f "$CURSOR_DIR/omnish-notify.json"
|
|
104
|
+
echo "removed $CURSOR_DIR/omnish-notify.json"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
echo "Done. Restart Cursor if hooks were removed."
|
|
Binary file
|