omnish 2.1.7 → 2.1.9
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 +21 -0
- package/README.md +8 -2
- package/contrib/install-omnish.sh +224 -0
- package/dist/downloads/omnish-claude.tar.gz +0 -0
- package/dist/downloads/omnish-cursor.tar.gz +0 -0
- package/dist/index.js +281 -281
- package/dist/install-script-url.cjs +24 -0
- package/package.json +5 -3
- package/scripts/install-script-url.cjs +24 -0
- package/scripts/node-version.cjs +53 -64
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.9] - 2026-07-11
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Platform install script:** `https://platform.omnish.dev/action/install-omnish.sh` served from tunnel-relay; `platform.omnish.dev` in Caddy site block with `tunnel.omnish.dev`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Install UX:** README, preinstall, and docs lead with platform installer one-liner; unpkg fallback retained. Installer shows banner, steps, and quick-start path to first `!` command.
|
|
19
|
+
- **`scripts/install-script-url.cjs`:** canonical public installer URL.
|
|
20
|
+
|
|
21
|
+
## [2.1.8] - 2026-07-11
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **Self-service install on old Node:** bootstrap script ships in the npm tarball; preinstall errors lead with `curl -fsSL https://unpkg.com/omnish@<version>/contrib/install-omnish.sh | bash` (no private GitHub raw URL). EBADENGINE flood is called out as ignorable noise.
|
|
26
|
+
- **`contrib/install-omnish.sh`:** Debian/Ubuntu VPS uses NodeSource first (replaces apt Node 12), installs `build-essential` for native modules, prints next steps after install.
|
|
27
|
+
- **Docs/README:** install section split into “already on Node 22” vs “old Node — run bootstrap”.
|
|
28
|
+
|
|
10
29
|
## [2.1.7] - 2026-07-11
|
|
11
30
|
|
|
12
31
|
### Added
|
|
@@ -93,6 +112,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
93
112
|
|
|
94
113
|
- Documentation and formatting updates across chat components and feature docs.
|
|
95
114
|
|
|
115
|
+
[2.1.9]: https://github.com/labKnowledge/omnish/compare/v2.1.8...v2.1.9
|
|
116
|
+
[2.1.8]: https://github.com/labKnowledge/omnish/compare/v2.1.7...v2.1.8
|
|
96
117
|
[2.1.7]: https://github.com/labKnowledge/omnish/compare/v2.1.6...v2.1.7
|
|
97
118
|
[2.1.6]: https://github.com/labKnowledge/omnish/compare/v2.1.5...v2.1.6
|
|
98
119
|
[2.1.5]: https://github.com/labKnowledge/omnish/compare/v2.1.4...v2.1.5
|
package/README.md
CHANGED
|
@@ -109,12 +109,16 @@ Names are alphanumeric plus `_`/`-`, max 32 characters; several names are reserv
|
|
|
109
109
|
|
|
110
110
|
## Install from npm
|
|
111
111
|
|
|
112
|
-
**
|
|
112
|
+
**Recommended — one command (works on old Node, VPS, macOS, Linux):**
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
curl -fsSL https://
|
|
115
|
+
curl -fsSL https://platform.omnish.dev/action/install-omnish.sh | bash
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
The installer upgrades Node when needed, installs build tools on Debian/Ubuntu, runs `npm install -g omnish`, and prints your next steps (`link` → `allow` → `start` → first `!` command).
|
|
119
|
+
|
|
120
|
+
### Already on Node 22.13+
|
|
121
|
+
|
|
118
122
|
```bash
|
|
119
123
|
npm install -g omnish
|
|
120
124
|
omnish link
|
|
@@ -122,6 +126,8 @@ omnish allow +YOUR_E164
|
|
|
122
126
|
omnish run
|
|
123
127
|
```
|
|
124
128
|
|
|
129
|
+
`npm install -g omnish` on Node below 22.13 will fail by design — use the installer above instead (do not fight `EBADENGINE` warnings on distro Node 12).
|
|
130
|
+
|
|
125
131
|
**Single phone:** omnish runs on a PC or server; you link it like WhatsApp Web (one QR scan on your phone). See [Quick start — One phone with WhatsApp](docs/guides/quick-start.md#one-phone-with-whatsapp).
|
|
126
132
|
|
|
127
133
|
**npm 11+ install warnings:** You may see advisory `allow-scripts` notices for native dependencies (`node-pty`, `better-sqlite3`, etc.). Install still succeeds; omnish pre-declares these in `allowScripts`. The `prebuild-install` deprecation warning comes from upstream native modules and is harmless.
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# omnish bootstrap installer — upgrades Node 22.13+ when needed, then npm install -g omnish.
|
|
3
|
+
# Canonical URL: https://platform.omnish.dev/action/install-omnish.sh
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
OMNISH_NPM_SPEC="${OMNISH_NPM_SPEC:-omnish}"
|
|
7
|
+
NODE_MAJOR="${OMNISH_NODE_MAJOR:-22}"
|
|
8
|
+
NVM_INSTALL_URL="${NVM_INSTALL_URL:-https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh}"
|
|
9
|
+
|
|
10
|
+
banner() {
|
|
11
|
+
cat <<'EOF'
|
|
12
|
+
|
|
13
|
+
omnish — allowlisted inbox → your real shell
|
|
14
|
+
────────────────────────────────────────────
|
|
15
|
+
WhatsApp / Telegram / 20+ channels. No AI layer.
|
|
16
|
+
Commands run on YOUR machine. You control the allowlist.
|
|
17
|
+
|
|
18
|
+
EOF
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
step() {
|
|
22
|
+
echo ""
|
|
23
|
+
echo "▸ $1"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
need() {
|
|
27
|
+
command -v "$1" >/dev/null 2>&1 || {
|
|
28
|
+
echo "error: required command not found: $1" >&2
|
|
29
|
+
exit 1
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
is_debian_ubuntu() {
|
|
34
|
+
[[ -f /etc/debian_version ]] && command -v apt-get >/dev/null 2>&1
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
node_version_ok() {
|
|
38
|
+
node -e "
|
|
39
|
+
const [maj, min] = process.versions.node.split('.').map(Number);
|
|
40
|
+
const ok = maj > 22 || (maj === 22 && min >= 13);
|
|
41
|
+
process.exit(ok ? 0 : 1);
|
|
42
|
+
" 2>/dev/null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
current_node() {
|
|
46
|
+
if command -v node >/dev/null 2>&1; then
|
|
47
|
+
node -v
|
|
48
|
+
else
|
|
49
|
+
echo "(not installed)"
|
|
50
|
+
fi
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
install_omnish() {
|
|
54
|
+
need npm
|
|
55
|
+
step "Installing omnish CLI (npm install -g ${OMNISH_NPM_SPEC}) …"
|
|
56
|
+
npm install -g "${OMNISH_NPM_SPEC}"
|
|
57
|
+
echo ""
|
|
58
|
+
if command -v omnish >/dev/null 2>&1; then
|
|
59
|
+
echo "✓ omnish $(omnish --version 2>/dev/null || echo 'installed')"
|
|
60
|
+
else
|
|
61
|
+
echo "✓ omnish installed (reopen shell if omnish not found)"
|
|
62
|
+
fi
|
|
63
|
+
echo ""
|
|
64
|
+
cat <<'EOF'
|
|
65
|
+
You're ready. Run these next (≈2 minutes to first command):
|
|
66
|
+
|
|
67
|
+
omnish link Link WhatsApp (QR) or Telegram (--tg <token>)
|
|
68
|
+
omnish allow +E164 Allow your phone number (shell access = password)
|
|
69
|
+
omnish start Run the gateway in the background
|
|
70
|
+
|
|
71
|
+
Then message yourself: !pwd or !ls
|
|
72
|
+
|
|
73
|
+
Docs: https://omnish.dev · Help: omnish --help
|
|
74
|
+
EOF
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
ensure_build_deps() {
|
|
78
|
+
if ! is_debian_ubuntu; then
|
|
79
|
+
return 0
|
|
80
|
+
fi
|
|
81
|
+
step "Installing build tools (better-sqlite3, node-pty native modules) …"
|
|
82
|
+
export DEBIAN_FRONTEND=noninteractive
|
|
83
|
+
apt-get update -qq
|
|
84
|
+
apt-get install -y build-essential python3 curl ca-certificates
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
load_nvm() {
|
|
88
|
+
if [[ -s "${NVM_DIR:-$HOME/.nvm}/nvm.sh" ]]; then
|
|
89
|
+
# shellcheck source=/dev/null
|
|
90
|
+
. "${NVM_DIR:-$HOME/.nvm}/nvm.sh"
|
|
91
|
+
return 0
|
|
92
|
+
fi
|
|
93
|
+
return 1
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
try_nvm() {
|
|
97
|
+
if load_nvm; then
|
|
98
|
+
step "Upgrading Node via nvm (${NODE_MAJOR}, set as default) …"
|
|
99
|
+
nvm install "${NODE_MAJOR}"
|
|
100
|
+
nvm alias default "${NODE_MAJOR}"
|
|
101
|
+
nvm use default
|
|
102
|
+
return 0
|
|
103
|
+
fi
|
|
104
|
+
return 1
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
try_fnm() {
|
|
108
|
+
if command -v fnm >/dev/null 2>&1; then
|
|
109
|
+
step "Upgrading Node via fnm (${NODE_MAJOR}) …"
|
|
110
|
+
fnm install "${NODE_MAJOR}"
|
|
111
|
+
fnm default "${NODE_MAJOR}"
|
|
112
|
+
eval "$(fnm env)"
|
|
113
|
+
return 0
|
|
114
|
+
fi
|
|
115
|
+
return 1
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
try_nodesource() {
|
|
119
|
+
if ! is_debian_ubuntu; then
|
|
120
|
+
return 1
|
|
121
|
+
fi
|
|
122
|
+
need curl
|
|
123
|
+
step "Upgrading Node via NodeSource ${NODE_MAJOR}.x (replaces old apt node) …"
|
|
124
|
+
curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash -
|
|
125
|
+
apt-get install -y nodejs
|
|
126
|
+
hash -r 2>/dev/null || true
|
|
127
|
+
return 0
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
install_nvm() {
|
|
131
|
+
need curl
|
|
132
|
+
step "Installing nvm, then Node ${NODE_MAJOR} …"
|
|
133
|
+
curl -fsSL "${NVM_INSTALL_URL}" | bash
|
|
134
|
+
load_nvm || {
|
|
135
|
+
echo "error: nvm install finished but nvm.sh is missing. Open a new shell and re-run:" >&2
|
|
136
|
+
echo " curl -fsSL https://platform.omnish.dev/action/install-omnish.sh | bash" >&2
|
|
137
|
+
exit 1
|
|
138
|
+
}
|
|
139
|
+
nvm install "${NODE_MAJOR}"
|
|
140
|
+
nvm alias default "${NODE_MAJOR}"
|
|
141
|
+
nvm use default
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
print_manual_help() {
|
|
145
|
+
cat <<EOF
|
|
146
|
+
|
|
147
|
+
omnish needs Node.js 22.13 or newer.
|
|
148
|
+
You have: $(current_node)
|
|
149
|
+
|
|
150
|
+
Automatic upgrade failed. Pick one path:
|
|
151
|
+
|
|
152
|
+
Debian/Ubuntu VPS (replaces old apt node, e.g. v12):
|
|
153
|
+
curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash -
|
|
154
|
+
apt-get install -y nodejs build-essential python3
|
|
155
|
+
node -v
|
|
156
|
+
npm install -g ${OMNISH_NPM_SPEC}
|
|
157
|
+
|
|
158
|
+
nvm:
|
|
159
|
+
curl -o- ${NVM_INSTALL_URL} | bash
|
|
160
|
+
# restart shell
|
|
161
|
+
nvm install ${NODE_MAJOR}
|
|
162
|
+
nvm alias default ${NODE_MAJOR}
|
|
163
|
+
npm install -g ${OMNISH_NPM_SPEC}
|
|
164
|
+
|
|
165
|
+
Official installers:
|
|
166
|
+
https://nodejs.org/en/download
|
|
167
|
+
|
|
168
|
+
Re-run the guided installer anytime:
|
|
169
|
+
curl -fsSL https://platform.omnish.dev/action/install-omnish.sh | bash
|
|
170
|
+
|
|
171
|
+
EOF
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
main() {
|
|
175
|
+
banner
|
|
176
|
+
step "Checking Node.js (need 22.13+, you have $(current_node))"
|
|
177
|
+
|
|
178
|
+
if command -v omnish >/dev/null 2>&1 && command -v node >/dev/null 2>&1 && node_version_ok; then
|
|
179
|
+
echo "omnish is already installed."
|
|
180
|
+
omnish --version 2>/dev/null || true
|
|
181
|
+
echo "To upgrade: npm install -g omnish@latest"
|
|
182
|
+
exit 0
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
if command -v node >/dev/null 2>&1 && node_version_ok; then
|
|
186
|
+
install_omnish
|
|
187
|
+
exit 0
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
# Debian/Ubuntu VPS (common: distro Node 12 from apt) — NodeSource first.
|
|
191
|
+
if is_debian_ubuntu; then
|
|
192
|
+
ensure_build_deps
|
|
193
|
+
if try_nodesource && node_version_ok; then
|
|
194
|
+
install_omnish
|
|
195
|
+
exit 0
|
|
196
|
+
fi
|
|
197
|
+
fi
|
|
198
|
+
|
|
199
|
+
if try_nvm || try_fnm; then
|
|
200
|
+
if node_version_ok; then
|
|
201
|
+
install_omnish
|
|
202
|
+
exit 0
|
|
203
|
+
fi
|
|
204
|
+
fi
|
|
205
|
+
|
|
206
|
+
if try_nodesource && node_version_ok; then
|
|
207
|
+
install_omnish
|
|
208
|
+
exit 0
|
|
209
|
+
fi
|
|
210
|
+
|
|
211
|
+
if [[ "$(uname -s)" != "MINGW"* && "$(uname -s)" != "MSYS"* && "$(uname -s)" != "CYGWIN"* ]]; then
|
|
212
|
+
if install_nvm; then
|
|
213
|
+
if node_version_ok; then
|
|
214
|
+
install_omnish
|
|
215
|
+
exit 0
|
|
216
|
+
fi
|
|
217
|
+
fi
|
|
218
|
+
fi
|
|
219
|
+
|
|
220
|
+
print_manual_help
|
|
221
|
+
exit 1
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
main "$@"
|
|
Binary file
|
|
Binary file
|