Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ Then connect your account once and run **`ghost`**:
```bash
ghost-login # browser login -> hands a session token back to this machine
ghost # chat (default = Hermes 405B via the OpenGradient TEE gateway, OHTTP-private)
ghost --local # force the fully-offline local model (no scrubber, no og-veil, nothing leaves)
```

Inside, `/model` switches between the hosted line-up (Hermes 4 405B / 70B) and the
fully-local 32B. Optional install config via env:
fully-local model. `--local` does the same in one shot (requires a local install, `GHOST_LOCAL=1`).
Optional install config via env:

```bash
GHOST_PROXY=1 ./install.sh # opt in to the Webshare rotating proxy (IP-mask the relay; off by default)
Expand Down
18 changes: 18 additions & 0 deletions bin/ghost
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ esac
# before/after + restore map) WITHOUT sending anything. Lets you see what leaves the box.
if [ "${1:-}" = "--preview" ]; then shift; exec "$PY" "__GHOST_HOME__/privacy/presidio_scrub.py" "$@"; fi

# --local: force the fully-offline local model for this run (true incognito -- nothing leaves the
# box, no scrubber/og-veil/network). Requires a local install (GHOST_LOCAL=1). Picks the local
# model from the ollama-local provider's default_model in config (uncensored-local 32B if present,
# else ghost-tool 7B). Without a local model installed, tells you how to get one.
if [ "${1:-}" = "--local" ]; then
shift
LM=$(grep -A4 '^ ollama-local:' "__GHOST_HOME__/profiles/uncensored/config.yaml" 2>/dev/null \
| grep 'default_model:' | head -1 | sed 's/.*default_model:[[:space:]]*//')
[ -n "$LM" ] || LM="ghost-tool:latest"
OLLAMA_BIN="$(command -v ollama || echo /opt/homebrew/bin/ollama)"
if ! "$OLLAMA_BIN" list 2>/dev/null | grep -q "$(printf '%s' "$LM" | cut -d: -f1)"; then
echo "👻 ghost · ⚠️ no local model installed ($LM). Reinstall with GHOST_LOCAL=1 to add the offline model." >&2
exit 1
fi
echo "👻 ghost · 🔒 LOCAL mode = $LM (fully offline -- no scrubber, no og-veil, nothing leaves the box)" >&2
exec "__ENG__/venv/bin/hermes" -p uncensored -m "$LM" --provider ollama-local "$@"
fi

# Are we connected to a hosted account? (hosted models need `ghost-login` -> og-veil login.)
if "$PY" -m veil status >/dev/null 2>&1; then LOGIN="✅ connected"; else LOGIN="⚠️ not logged in (run: ghost-login)"; fi

Expand Down
Loading