omnish 2.1.8 → 2.2.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 CHANGED
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.2.0] - 2026-07-11
11
+
12
+ ### Added
13
+
14
+ - **Windows installer:** `contrib/install-omnish.ps1` at `https://platform.omnish.dev/action/install-omnish.ps1` (`irm … | iex`); nvm-windows and winget paths.
15
+ - **macOS Homebrew path** in `contrib/install-omnish.sh` when Node is below 22.13.
16
+
17
+ ### Changed
18
+
19
+ - **Install docs:** README and quick-start use per-OS table (Linux, macOS, Windows, WSL); script-first hero line.
20
+ - **Preinstall/runtime errors:** Windows lead with PowerShell installer URL.
21
+
22
+ ## [2.1.9] - 2026-07-11
23
+
24
+ ### Added
25
+
26
+ - **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`.
27
+
28
+ ### Changed
29
+
30
+ - **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.
31
+ - **`scripts/install-script-url.cjs`:** canonical public installer URL.
32
+
10
33
  ## [2.1.8] - 2026-07-11
11
34
 
12
35
  ### Changed
@@ -101,6 +124,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
101
124
 
102
125
  - Documentation and formatting updates across chat components and feature docs.
103
126
 
127
+ [2.2.0]: https://github.com/labKnowledge/omnish/compare/v2.1.9...v2.2.0
128
+ [2.1.9]: https://github.com/labKnowledge/omnish/compare/v2.1.8...v2.1.9
104
129
  [2.1.8]: https://github.com/labKnowledge/omnish/compare/v2.1.7...v2.1.8
105
130
  [2.1.7]: https://github.com/labKnowledge/omnish/compare/v2.1.6...v2.1.7
106
131
  [2.1.6]: https://github.com/labKnowledge/omnish/compare/v2.1.5...v2.1.6
package/README.md CHANGED
@@ -8,7 +8,17 @@
8
8
 
9
9
  **Allowlisted inbox → your real shell.** No AI layer: commands run on **your** machine, and only identities you allow can trigger them.
10
10
 
11
- **Try it:** [omnish.dev](https://omnish.dev) · `npm install -g omnish` → **[Quick start](docs/guides/quick-start.md)** (first `!` command in minutes).
11
+ **Try it:** [omnish.dev](https://omnish.dev) · one-command install → **[Quick start](docs/guides/quick-start.md)** (first `!` command in minutes).
12
+
13
+ ```bash
14
+ # Linux / macOS / WSL
15
+ curl -fsSL https://platform.omnish.dev/action/install-omnish.sh | bash
16
+ ```
17
+
18
+ ```powershell
19
+ # Windows (PowerShell)
20
+ irm https://platform.omnish.dev/action/install-omnish.ps1 | iex
21
+ ```
12
22
 
13
23
  > The OpenClaw alternative that puts developers back in control.
14
24
 
@@ -107,12 +117,23 @@ Each **chat** (WhatsApp DM / Telegram DM) has its own shortcut map on disk (`sho
107
117
 
108
118
  Names are alphanumeric plus `_`/`-`, max 32 characters; several names are reserved (e.g. `help`, `apps`, `bg`). See `/shortcut help` for the full behavior.
109
119
 
110
- ## Install from npm
120
+ ## Install
121
+
122
+ Use the **guided installer** — it upgrades Node when needed and runs `npm install -g omnish`. Pick your OS:
123
+
124
+ | OS | Command |
125
+ | --------------------- | ------------------------------------------------------------------------------- |
126
+ | **Linux** (incl. VPS) | `curl -fsSL https://platform.omnish.dev/action/install-omnish.sh \| bash` |
127
+ | **macOS** | Same as Linux (Terminal). Uses Homebrew, nvm, or fnm when Node is below 22.13 |
128
+ | **Windows** | `irm https://platform.omnish.dev/action/install-omnish.ps1 \| iex` (PowerShell) |
129
+ | **WSL** | Use the Linux command inside your WSL distro |
111
130
 
112
- **Requires Node.js 22.13+** (`node -v`).
131
+ The installer prints next steps: `omnish link` → `omnish allow` → `omnish start` → first `!` command in chat.
113
132
 
114
133
  ### Already on Node 22.13+
115
134
 
135
+ If `node -v` shows v22.13 or newer, you can skip the installer:
136
+
116
137
  ```bash
117
138
  npm install -g omnish
118
139
  omnish link
@@ -120,15 +141,7 @@ omnish allow +YOUR_E164
120
141
  omnish run
121
142
  ```
122
143
 
123
- ### Old Node (VPS with apt Node 12, etc.)
124
-
125
- `npm install -g omnish` will fail on Node below 22.13 — that is expected. **Run the bootstrap installer instead** (upgrades Node, installs build tools on Debian/Ubuntu, then `npm install -g omnish`):
126
-
127
- ```bash
128
- curl -fsSL https://unpkg.com/omnish/contrib/install-omnish.sh | bash
129
- ```
130
-
131
- The script is published in the npm package (no GitHub clone required). If `npm install -g omnish` failed, the error message prints the same one-liner with your package version.
144
+ `npm install -g omnish` on Node below 22.13 will fail by design — use the installer above (ignore `EBADENGINE` warnings on old distro Node).
132
145
 
133
146
  **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).
134
147
 
@@ -0,0 +1,133 @@
1
+ # omnish bootstrap installer for Windows — Node 22.13+ then npm install -g omnish
2
+ # Canonical URL: https://platform.omnish.dev/action/install-omnish.ps1
3
+ # Usage: irm https://platform.omnish.dev/action/install-omnish.ps1 | iex
4
+
5
+ $ErrorActionPreference = "Stop"
6
+
7
+ $OmnishSpec = if ($env:OMNISH_NPM_SPEC) { $env:OMNISH_NPM_SPEC } else { "omnish" }
8
+ $NodeMajor = if ($env:OMNISH_NODE_MAJOR) { $env:OMNISH_NODE_MAJOR } else { "22" }
9
+ $InstallScriptUrl = "https://platform.omnish.dev/action/install-omnish.ps1"
10
+
11
+ function Write-Banner {
12
+ Write-Host ""
13
+ Write-Host " omnish — allowlisted inbox → your real shell"
14
+ Write-Host " ────────────────────────────────────────────"
15
+ Write-Host " WhatsApp / Telegram / 20+ channels. No AI layer."
16
+ Write-Host ""
17
+ }
18
+
19
+ function Write-Step([string]$Message) {
20
+ Write-Host ""
21
+ Write-Host "▸ $Message" -ForegroundColor Cyan
22
+ }
23
+
24
+ function Get-NodeVersionLabel {
25
+ try {
26
+ return (node -v)
27
+ } catch {
28
+ return "(not installed)"
29
+ }
30
+ }
31
+
32
+ function Test-NodeVersionOk {
33
+ try {
34
+ $raw = (node -v) -replace '^v', ''
35
+ $parts = $raw.Split('.')
36
+ if ($parts.Count -lt 2) { return $false }
37
+ $maj = [int]$parts[0]
38
+ $min = [int]$parts[1]
39
+ return ($maj -gt 22) -or ($maj -eq 22 -and $min -ge 13)
40
+ } catch {
41
+ return $false
42
+ }
43
+ }
44
+
45
+ function Install-Omnish {
46
+ Write-Step "Installing omnish CLI (npm install -g $OmnishSpec) …"
47
+ npm install -g $OmnishSpec
48
+ Write-Host ""
49
+ try {
50
+ $ver = omnish --version 2>$null
51
+ if ($ver) { Write-Host "✓ omnish $ver" -ForegroundColor Green }
52
+ else { Write-Host "✓ omnish installed (reopen PowerShell if omnish not found)" -ForegroundColor Green }
53
+ } catch {
54
+ Write-Host "✓ omnish installed (reopen PowerShell if omnish not found)" -ForegroundColor Green
55
+ }
56
+ Write-Host ""
57
+ Write-Host @"
58
+ You're ready. Run these next (≈2 minutes to first command):
59
+
60
+ omnish link Link WhatsApp (QR) or Telegram (--tg <token>)
61
+ omnish allow +E164 Allow your phone number
62
+ omnish start Run the gateway in the background
63
+
64
+ Then message yourself: !pwd or !ls
65
+
66
+ Docs: https://omnish.dev · Help: omnish --help
67
+ "@
68
+ }
69
+
70
+ function Try-NvmWindows {
71
+ $nvm = Get-Command nvm -ErrorAction SilentlyContinue
72
+ if (-not $nvm) { return $false }
73
+ Write-Step "Upgrading Node via nvm-windows ($NodeMajor) …"
74
+ nvm install $NodeMajor
75
+ nvm use $NodeMajor
76
+ return $true
77
+ }
78
+
79
+ function Try-WingetNode {
80
+ $winget = Get-Command winget -ErrorAction SilentlyContinue
81
+ if (-not $winget) { return $false }
82
+ Write-Step "Installing Node.js LTS via winget …"
83
+ winget install --id OpenJS.NodeJS.LTS -e --accept-source-agreements --accept-package-agreements
84
+ $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
85
+ return $true
86
+ }
87
+
88
+ function Show-ManualHelp {
89
+ Write-Host ""
90
+ Write-Host "omnish needs Node.js 22.13 or newer."
91
+ Write-Host "You have: $(Get-NodeVersionLabel)"
92
+ Write-Host ""
93
+ Write-Host "Automatic upgrade failed. Pick one path:"
94
+ Write-Host ""
95
+ Write-Host " nvm-windows (recommended):"
96
+ Write-Host " nvm install $NodeMajor"
97
+ Write-Host " nvm use $NodeMajor"
98
+ Write-Host " npm install -g $OmnishSpec"
99
+ Write-Host ""
100
+ Write-Host " winget:"
101
+ Write-Host " winget install OpenJS.NodeJS.LTS"
102
+ Write-Host " npm install -g $OmnishSpec"
103
+ Write-Host ""
104
+ Write-Host " Official installer:"
105
+ Write-Host " https://nodejs.org/en/download"
106
+ Write-Host ""
107
+ Write-Host " Re-run the guided installer:"
108
+ Write-Host " irm $InstallScriptUrl | iex"
109
+ Write-Host ""
110
+ }
111
+
112
+ Write-Banner
113
+ Write-Step "Checking Node.js (need 22.13+, you have $(Get-NodeVersionLabel))"
114
+
115
+ if ((Get-Command omnish -ErrorAction SilentlyContinue) -and (Test-NodeVersionOk)) {
116
+ Write-Host "omnish is already installed."
117
+ try { omnish --version } catch {}
118
+ Write-Host "To upgrade: npm install -g omnish@latest"
119
+ exit 0
120
+ }
121
+
122
+ if (Test-NodeVersionOk) {
123
+ Install-Omnish
124
+ exit 0
125
+ }
126
+
127
+ if ((Try-NvmWindows -or Try-WingetNode) -and (Test-NodeVersionOk)) {
128
+ Install-Omnish
129
+ exit 0
130
+ }
131
+
132
+ Show-ManualHelp
133
+ exit 1
@@ -1,12 +1,28 @@
1
1
  #!/usr/bin/env bash
2
- # Bootstrap omnish install: ensure Node 22.13+, then npm install -g omnish.
3
- # Served from npm (unpkg) — see scripts/node-version.cjs readBootstrapInstallScriptUrl().
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
4
  set -euo pipefail
5
5
 
6
6
  OMNISH_NPM_SPEC="${OMNISH_NPM_SPEC:-omnish}"
7
7
  NODE_MAJOR="${OMNISH_NODE_MAJOR:-22}"
8
8
  NVM_INSTALL_URL="${NVM_INSTALL_URL:-https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh}"
9
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
+
10
26
  need() {
11
27
  command -v "$1" >/dev/null 2>&1 || {
12
28
  echo "error: required command not found: $1" >&2
@@ -36,22 +52,33 @@ current_node() {
36
52
 
37
53
  install_omnish() {
38
54
  need npm
39
- echo ""
40
- echo "Installing ${OMNISH_NPM_SPEC} with Node $(node -v) …"
55
+ step "Installing omnish CLI (npm install -g ${OMNISH_NPM_SPEC}) …"
41
56
  npm install -g "${OMNISH_NPM_SPEC}"
42
57
  echo ""
43
- echo "Done. Next steps:"
44
- echo " omnish --version"
45
- echo " omnish link # WhatsApp QR or --tg for Telegram"
46
- echo " omnish allow +E164 # your phone number"
47
- echo " omnish start"
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
48
75
  }
49
76
 
50
77
  ensure_build_deps() {
51
78
  if ! is_debian_ubuntu; then
52
79
  return 0
53
80
  fi
54
- echo "Installing build tools for native modules (better-sqlite3, node-pty) …"
81
+ step "Installing build tools (better-sqlite3, node-pty native modules) …"
55
82
  export DEBIAN_FRONTEND=noninteractive
56
83
  apt-get update -qq
57
84
  apt-get install -y build-essential python3 curl ca-certificates
@@ -68,7 +95,7 @@ load_nvm() {
68
95
 
69
96
  try_nvm() {
70
97
  if load_nvm; then
71
- echo "Using nvm to install Node ${NODE_MAJOR} and set default …"
98
+ step "Upgrading Node via nvm (${NODE_MAJOR}, set as default) …"
72
99
  nvm install "${NODE_MAJOR}"
73
100
  nvm alias default "${NODE_MAJOR}"
74
101
  nvm use default
@@ -79,7 +106,7 @@ try_nvm() {
79
106
 
80
107
  try_fnm() {
81
108
  if command -v fnm >/dev/null 2>&1; then
82
- echo "Using fnm to install Node ${NODE_MAJOR} and set default …"
109
+ step "Upgrading Node via fnm (${NODE_MAJOR}) …"
83
110
  fnm install "${NODE_MAJOR}"
84
111
  fnm default "${NODE_MAJOR}"
85
112
  eval "$(fnm env)"
@@ -88,12 +115,23 @@ try_fnm() {
88
115
  return 1
89
116
  }
90
117
 
118
+ try_homebrew() {
119
+ if [[ "$(uname -s)" != "Darwin" ]] || ! command -v brew >/dev/null 2>&1; then
120
+ return 1
121
+ fi
122
+ step "Upgrading Node via Homebrew node@${NODE_MAJOR} …"
123
+ brew install "node@${NODE_MAJOR}"
124
+ brew link --overwrite --force "node@${NODE_MAJOR}"
125
+ hash -r || true
126
+ return 0
127
+ }
128
+
91
129
  try_nodesource() {
92
130
  if ! is_debian_ubuntu; then
93
131
  return 1
94
132
  fi
95
133
  need curl
96
- echo "Using NodeSource to install Node ${NODE_MAJOR}.x (replaces old apt node) …"
134
+ step "Upgrading Node via NodeSource ${NODE_MAJOR}.x (replaces old apt node) …"
97
135
  curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash -
98
136
  apt-get install -y nodejs
99
137
  hash -r 2>/dev/null || true
@@ -102,10 +140,11 @@ try_nodesource() {
102
140
 
103
141
  install_nvm() {
104
142
  need curl
105
- echo "nvm not found installing nvm …"
143
+ step "Installing nvm, then Node ${NODE_MAJOR} …"
106
144
  curl -fsSL "${NVM_INSTALL_URL}" | bash
107
145
  load_nvm || {
108
- echo "error: nvm install finished but nvm.sh is missing. Open a new shell and re-run this script." >&2
146
+ echo "error: nvm install finished but nvm.sh is missing. Open a new shell and re-run:" >&2
147
+ echo " curl -fsSL https://platform.omnish.dev/action/install-omnish.sh | bash" >&2
109
148
  exit 1
110
149
  }
111
150
  nvm install "${NODE_MAJOR}"
@@ -137,11 +176,22 @@ Automatic upgrade failed. Pick one path:
137
176
  Official installers:
138
177
  https://nodejs.org/en/download
139
178
 
179
+ Re-run the guided installer anytime:
180
+ curl -fsSL https://platform.omnish.dev/action/install-omnish.sh | bash
181
+
140
182
  EOF
141
183
  }
142
184
 
143
185
  main() {
144
- echo "omnish installer — Node $(current_node) (need 22.13+)"
186
+ banner
187
+ step "Checking Node.js (need 22.13+, you have $(current_node))"
188
+
189
+ if command -v omnish >/dev/null 2>&1 && command -v node >/dev/null 2>&1 && node_version_ok; then
190
+ echo "omnish is already installed."
191
+ omnish --version 2>/dev/null || true
192
+ echo "To upgrade: npm install -g omnish@latest"
193
+ exit 0
194
+ fi
145
195
 
146
196
  if command -v node >/dev/null 2>&1 && node_version_ok; then
147
197
  install_omnish
@@ -157,6 +207,12 @@ main() {
157
207
  fi
158
208
  fi
159
209
 
210
+ # macOS — Homebrew before nvm when available.
211
+ if [[ "$(uname -s)" == "Darwin" ]] && try_homebrew && node_version_ok; then
212
+ install_omnish
213
+ exit 0
214
+ fi
215
+
160
216
  if try_nvm || try_fnm; then
161
217
  if node_version_ok; then
162
218
  install_omnish
Binary file
Binary file