From f0d3477d695c1f9f7943d545e8c5046402178f3e Mon Sep 17 00:00:00 2001 From: yunyingk Date: Tue, 25 Aug 2026 14:34:17 +0800 Subject: [PATCH] Add one-line install script and quick installation guide --- README.md | 31 +++++++++++++---- scripts/install.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 6 deletions(-) create mode 100755 scripts/install.sh diff --git a/README.md b/README.md index d28ec96..f9d26c8 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,35 @@ The first provider is Hose/合思: `key`, `password`, `corpId`, `staffId`, and a Seal-native enterprise pages can be added with a Seal Bearer token. The older `direct` source remains available for existing configs that already provide a Seal Bearer token. -## Setup +## Quick Install (Standalone Binary) + +No Node.js, Bun, or external runtime required. Run the one-line installer for macOS and Linux: ```bash -bun install -cp enterprises/example.hose.json enterprises/local.json -bun run check -bun run probe -- -bun run start +curl -fsSL https://raw.githubusercontent.com/yunyingk/seal-home/master/scripts/install.sh | bash ``` +Or download the native binary directly from [GitHub Releases](https://github.com/yunyingk/seal-home/releases/latest): + +- **macOS (Apple Silicon)**: `curl -fsSL https://github.com/yunyingk/seal-home/releases/latest/download/seal-home-darwin-arm64 -o /usr/local/bin/seal-home && chmod +x /usr/local/bin/seal-home` +- **macOS (Intel)**: `curl -fsSL https://github.com/yunyingk/seal-home/releases/latest/download/seal-home-darwin-x64 -o /usr/local/bin/seal-home && chmod +x /usr/local/bin/seal-home` +- **Linux (x86_64)**: `curl -fsSL https://github.com/yunyingk/seal-home/releases/latest/download/seal-home-linux-x64 -o /usr/local/bin/seal-home && chmod +x /usr/local/bin/seal-home` +- **Linux (ARM64)**: `curl -fsSL https://github.com/yunyingk/seal-home/releases/latest/download/seal-home-linux-arm64 -o /usr/local/bin/seal-home && chmod +x /usr/local/bin/seal-home` +- **Windows (x64)**: Download `seal-home-windows-x64.zip` from Releases and extract `seal-home-windows-x64.exe`. + +After installation: + +```bash +seal-home version # Check version +seal-home skill install # Install Agent skill to ~/.agents/skills/seal-home +seal-home mcp-config # Print .mcp.json snippet for Cursor / Claude Desktop / Codex +seal-home update # Future self-update directly from GitHub Release +``` + +## Source Setup & Development + +For local development from source with Bun: + For an already-authenticated Seal-native source, use `seal-home corps add-seal` or copy `enterprises/example.seal.json`. Existing `direct` configs remain supported via `enterprises/example.direct.json`. ## Public Usage diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 0000000..bf0cf64 --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,83 @@ +#!/usr/bin/env bash +set -e + +REPO="yunyingk/seal-home" +INSTALL_DIR="/usr/local/bin" +ALT_INSTALL_DIR="$HOME/.local/bin" + +echo "==> Detecting platform and architecture..." +OS="$(uname -s | tr '[:upper:]' '[:lower:]')" +ARCH="$(uname -m)" + +case "$OS" in + darwin) + PLATFORM="darwin" + ;; + linux) + PLATFORM="linux" + ;; + *) + echo "Unsupported operating system: $OS" >&2 + exit 1 + ;; +esac + +case "$ARCH" in + x86_64|amd64) + ARCH_NAME="x64" + ;; + arm64|aarch64) + ARCH_NAME="arm64" + ;; + *) + echo "Unsupported architecture: $ARCH" >&2 + exit 1 + ;; +esac + +ASSET_NAME="seal-home-${PLATFORM}-${ARCH_NAME}" +DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${ASSET_NAME}" + +echo "==> Downloading latest seal-home for ${PLATFORM}-${ARCH_NAME}..." +TMP_FILE="$(mktemp)" +if ! curl -fsSL "$DOWNLOAD_URL" -o "$TMP_FILE"; then + echo "Error: Failed to download $DOWNLOAD_URL" >&2 + rm -f "$TMP_FILE" + exit 1 +fi + +chmod +x "$TMP_FILE" + +# Determine target directory +TARGET_PATH="${INSTALL_DIR}/seal-home" +if [ -w "$INSTALL_DIR" ]; then + mv "$TMP_FILE" "$TARGET_PATH" +elif command -v sudo >/dev/null 2>&1; then + echo "==> Installing to ${TARGET_PATH} (requires sudo)..." + sudo mv "$TMP_FILE" "$TARGET_PATH" + sudo chmod 755 "$TARGET_PATH" +else + mkdir -p "$ALT_INSTALL_DIR" + TARGET_PATH="${ALT_INSTALL_DIR}/seal-home" + mv "$TMP_FILE" "$TARGET_PATH" + echo "==> Installed to ${TARGET_PATH}" + echo " Please ensure ${ALT_INSTALL_DIR} is in your PATH." +fi + +# Ad-hoc sign on macOS +if [ "$PLATFORM" = "darwin" ] && command -v codesign >/dev/null 2>&1; then + codesign --force --sign - "$TARGET_PATH" 2>/dev/null || true +fi + +echo "==> Initializing agent skill..." +"$TARGET_PATH" skill install >/dev/null 2>&1 || true + +echo "" +echo "✨ seal-home successfully installed!" +"$TARGET_PATH" version +echo "" +echo "Quick start:" +echo " 1. Add enterprise: seal-home corps add-hose --json '{...}'" +echo " 2. View MCP config: seal-home mcp-config" +echo " 3. Self-update: seal-home update" +echo ""