Commit Graph
5 Commits
Author SHA1 Message Date
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