Commit Graph
14 Commits
Author SHA1 Message Date
i 512c03dfab refactor: remove Docker from Linux install.sh; fix log file path; add confirm prompt 2026-06-02 00:36:08 +08:00
i e5c70a7d8b fix: offer mirror config or source switch when version fetch fails, no silent fallback 2026-06-02 00:31:23 +08:00
i 04f3f21f14 refactor: remove all Docker checks, warnings, compose operations from install script 2026-06-02 00:27:01 +08:00
i fcba4c6eef fix: remove Out-Null swallowing failures; fallback to fork when official repo has no matching Windows asset 2026-06-02 00:24:44 +08:00
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