Commit Graph
26 Commits
Author SHA1 Message Date
i 9539487f1c feat: confirm before installing in quick mode (irm | iex) 2026-06-02 00:23:13 +08:00
i be09e5b20c fix: check npm exists before version check; reject unmatched platform assets in Match-GithubAsset 2026-06-02 00:22:32 +08:00
i 61d75a730c feat: offer mirror config choices interactively when version fetch fails in quick mode 2026-06-02 00:19:51 +08:00
iandHAPI 305d07e14b fix: use user dir on Windows, detect pipe execution for one-click install
- Windows default: $env:USERPROFILE\hapi instead of C:\hapi
- PowerShell: detect iex/pipe execution ($PSCommandPath empty) to skip
  Read-Host prompt and enter quick install mode
- Bash: detect curl|bash pipe (! -t 0) to enter quick install mode
- This fixes scripts hanging on menu prompts when run via irm|iex
  or curl|bash

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-02 00:09:31 +08:00
iandHAPI 14791602d6 feat: ask install directory, support non-root on Linux
- Remove forced root check; detect user and default to ~/.local/hapi
  for non-root, /opt/hapi for root
- Interactive prompt to confirm or customize install directory
- Non-root users can install CLI but get warned about Docker/systemd
  limitations
- Windows: ask to confirm C:\hapi or enter custom path
- Hub/autostart options grayed out when prerequisites unavailable

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-02 00:02:33 +08:00
iandHAPI 96290bee6a feat: rewrite install scripts with status dashboard + interactive menu
Both install.sh and install.ps1 now show a status panel first, then
present an interactive menu for common operations:

- View system status (CLI version, source, path, Hub state, autostart)
- Install / Upgrade / Reinstall / Uninstall HAPI CLI
- Configure / Start / Stop HAPI Hub (Docker)
- Enable / Disable autostart (systemd on Linux, Scheduled Tasks on Windows)
- Refresh status

Backward compatibility: old CLI flags (--upgrade, --force, --source,
--skip-hub) still trigger quick non-interactive mode.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-01 23:44:31 +08:00
iandHAPI 65c6e960a9 fix: remove npm version/source file writes, infer from path instead
npm installs to global node_modules, so writing .hapi-version and
.hapi-source under /opt/hapi (or C:\hapi) is unnecessary and fails
when that directory doesn't exist yet.

- Stop writing VERSION_FILE and SOURCE_FILE in install_from_npm
- Infer "npm" source from hapi path in print_result when files absent
- Sync both install.sh and install.ps1

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-01 23:18:11 +08:00
iandHAPI 8cb35598af feat: add npm timeout, mirror support, and interactive fallback
- Add --npm-registry param for custom npm mirrors
- Add --github-mirror param for GitHub API/download proxy
- npm install now has 120s timeout with interactive fallback menu
- On timeout/failure, prompt user to switch source or use mirror
- Update docs with mirror usage examples

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-01 23:15:06 +08:00
iandHAPI 43c4fbe1e8 fix: replace PowerShell 7 pipeline operator with 5.1 compatible syntax
The `||` operator is not available in Windows PowerShell 5.1.
Use if/else variable assignment instead.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-01 23:01:21 +08:00
iandHAPI 4f2a71c3e3 feat: add one-click install scripts for Linux and Windows
- Support multiple install sources: npm, GitHub Release (official/fork)
- Auto-detect installed version and support upgrade across sources
- Auto-match system architecture when downloading from GitHub Release
- Create systemd services (Linux) and scheduled tasks (Windows)
- Update README with quick-start one-liner commands

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-06-01 22:57:55 +08:00
iandHAPI 4759787276 docs: restructure README and add Linux systemd auto-start guide
- Add Build Options section documenting default/npm, pre-built images
  (latest/origin/self), local builds, and CI workflow parameters
- Fix Windows scheduled task script: -Logon → -AtLogon
- Update docker-compose example with image tag alternatives
- Rename bottom section from Local Build to Local Clone

via HAPI

Co-Authored-By: HAPI <[email protected]>
2026-05-25 00:08:06 +08:00
iandHAPI 72ab8e95bc docs: restructure README and add Linux systemd auto-start guide
- Add table of contents for quick navigation
- Collapse long Windows/Linux scripts behind <details>
- Consolidate client setup into cleaner sections
- Add systemd user service instructions for Linux
- Move reference data (env vars, persistence) to the bottom

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-05-24 22:59:30 +08:00
i b139ff3a3a Merge branch 'main' of https://mybugs.work/i/Hapi-Docker 2026-05-24 22:41:15 +08:00
i 76fc0a6246 docs: add Windows scheduled task script for auto-starting HAPI Runner
Add a PowerShell one-liner script to README that creates a
logon-triggered scheduled task to automatically start
`hapi runner start` on Windows login.

Includes install, uninstall, and manual control commands.

via HAPI (https://hapi.run)
Co-Authored-By: HAPI <[email protected]>
2026-05-24 22:38:49 +08:00
iandHAPI acd51fae08 refactor: unify build/release workflows into a single parameterized workflow
Replace 4 separate workflows (docker-build-self, docker-build-origin,
release-self-binaries, release-origin-binaries) with one build-and-release.yml
that accepts repository, ref, docker_tag, and release_tag as inputs.

- origin/Dockerfile: now copies pre-built binary like self/Dockerfile
- origin/build.sh: clones tiann/hapi@main and builds before docker build

via HAPI

Co-Authored-By: HAPI <[email protected]>
2026-05-22 17:52:44 +08:00
iandHAPI f23b40f554 feat: add origin Docker image and release workflow from official hapi repo
Build from tiann/hapi main branch, tag as origin.

via HAPI

Co-Authored-By: HAPI <[email protected]>
2026-05-22 14:45:48 +08:00
i 2a44d333f2 docs: document CORS_ORIGINS=* requirement for reverse proxy / WebSocket terminal 2026-05-22 11:02:55 +08:00
iandHAPI 6948808f18 feat: add workflow to release self-built hapi binaries
Add a manual-trigger workflow that builds all platform binaries from
arkylin/hapi self branch and publishes them as GitHub Release assets.

Supports optional commit SHA and custom release tag inputs.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-05-21 23:10:14 +08:00
iandHAPI 002e0b5e46 feat: add self-built Docker image from local hapi source
Add a new Docker image variant (tag: self) that uses compiled binaries
from the hapi self branch instead of installing from npm.

- self/Dockerfile: runtime image copying pre-built binary by arch
- self/build.sh: local build script from ../hapi/dist-exe
- .github/workflows/docker-build-self.yml: CI workflow to build and
  push multi-arch image to GHCR with tag "self"

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
2026-05-21 22:28:25 +08:00
i 88c9c12804 docs: add Windows CLI setup instructions 2026-05-20 15:46:24 +08:00
i ff77a879bc docs: rewrite README with full server + client workflow 2026-05-20 15:44:58 +08:00
i 59c0934274 chore: bump Node to 24
Build and Push Docker Image to GHCR / build-and-push (push) Has been cancelled
2026-05-20 15:36:12 +08:00
i 9bfc11e740 fix: single-stage build to include platform binary
Build and Push Docker Image to GHCR / build-and-push (push) Has been cancelled
2026-05-20 15:35:54 +08:00
i d60fe49414 chore: use latest tag instead of main
Build and Push Docker Image to GHCR / build-and-push (push) Has been cancelled
2026-05-20 15:31:30 +08:00
i 03bdec1ce0 docs: update README with correct GHCR repo
Build and Push Docker Image to GHCR / build-and-push (push) Has been cancelled
2026-05-20 15:26:27 +08:00
i 94de06a832 init: HAPI Hub Docker 部署 (Dockerfile + docker-compose + GHCR workflow)
Build and Push Docker Image to GHCR / build-and-push (push) Has been cancelled
2026-05-20 15:14:09 +08:00