offgrid-ai 0.8.6 → 0.8.7

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/install.sh CHANGED
@@ -27,6 +27,7 @@ set -euo pipefail
27
27
 
28
28
  DRY_RUN=false
29
29
  SKIP_RUN=false
30
+ DEFAULT_RC="${DEFAULT_RC:-}" # allow callers to override target rc file
30
31
 
31
32
  for arg in "$@"; do
32
33
  case "$arg" in
@@ -153,13 +154,12 @@ if [[ -n "$NPM_BIN" && -x "$NPM_BIN/offgrid-ai" ]]; then
153
154
  else
154
155
  # Not on PATH — add it
155
156
  export PATH="$NPM_BIN:$PATH"
156
- ok "Added $NPM_BIN to PATH for this session"
157
157
  ok "offgrid-ai ${INSTALLED_VERSION:+v${INSTALLED_VERSION} }installed"
158
158
 
159
159
  # Add to shell config for future sessions (pick first existing or .zshrc)
160
160
  ADDED_TO_RC=false
161
161
  # Respect user's shell preference; default to .zshrc on macOS
162
- [[ "$OSTYPE" == darwin* ]] && [[ -z "$DEFAULT_RC" ]] && DEFAULT_RC="$HOME/.zshrc"
162
+ [[ "$OSTYPE" == darwin* ]] && [[ -z "${DEFAULT_RC}" ]] && DEFAULT_RC="$HOME/.zshrc"
163
163
  RC_CANDIDATES=("${DEFAULT_RC:-}" "$HOME/.zshrc" "$HOME/.bashrc" "$HOME/.bash_profile")
164
164
  for RC_FILE in "${RC_CANDIDATES[@]}"; do
165
165
  [[ -z "$RC_FILE" ]] && continue
@@ -174,7 +174,13 @@ if [[ -n "$NPM_BIN" && -x "$NPM_BIN/offgrid-ai" ]]; then
174
174
  fi
175
175
  done
176
176
 
177
- if ! $ADDED_TO_RC; then
177
+ if $ADDED_TO_RC; then
178
+ echo ""
179
+ echo "To use it right now, run:"
180
+ echo " source ${RC_FILE}"
181
+ echo ""
182
+ echo "Or open a new terminal window/tab."
183
+ else
178
184
  warn "$NPM_BIN is already in a shell config file — restart your terminal to use offgrid-ai"
179
185
  fi
180
186
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "offgrid-ai",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "Privacy-first CLI for running local LLMs — discover, configure, run, benchmark",
5
5
  "author": "Eeshan Srivastava (https://eeshans.com)",
6
6
  "type": "module",
@@ -17,12 +17,6 @@ if (!prefix) {
17
17
  process.exit(0);
18
18
  }
19
19
 
20
- if (isHermesPrefix(prefix, process.env.HOME)) {
21
- console.log("offgrid-ai installed with a Hermes-managed npm prefix.");
22
- console.log("Not adding Hermes Node to PATH automatically. Use your normal Node/npm, or run the offgrid-ai install script.");
23
- process.exit(0);
24
- }
25
-
26
20
  const npmBin = join(prefix, "bin");
27
21
  const marker = "# Added by offgrid-ai installer";
28
22
  const pathLine = `export PATH="${npmBin}:$PATH"`;
@@ -100,12 +94,6 @@ function currentPackageVersion() {
100
94
  }
101
95
  }
102
96
 
103
- function isHermesPrefix(prefix, home) {
104
- const normalized = prefix.replace(/\\/gu, "/");
105
- if (normalized.includes("/.hermes/")) return true;
106
- return Boolean(home && normalized === `${home.replace(/\\/gu, "/")}/.hermes/node`);
107
- }
108
-
109
97
  function isLikelyGlobalPrefix(prefix, home) {
110
98
  if (!prefix || !home) return false;
111
99
  const normalized = prefix.replace(/\\/gu, "/");