feat: add local native CLI installer for Linux and macOS
Bootstrap the pinned GraalVM when needed, validate native build prerequisites, and install a verified standalone executable with the aie shortcut. Document usage and add installer fixtures to native CI. Validated with 14 installer tests, a real macOS ARM64 native build and installation, and the full installed CLI smoke suite. Publication explicitly authorized by the user: commit e push.
This commit is contained in:
@@ -55,6 +55,42 @@ The JAR requires Java 25 at runtime. On Windows, use `gradlew.bat` in place of
|
||||
|
||||
### Build a native executable
|
||||
|
||||
On Linux (x64/ARM64) and macOS (Apple Silicon), build and install for your user:
|
||||
|
||||
```sh
|
||||
./scripts/install-native.sh
|
||||
```
|
||||
|
||||
The script uses a compatible `GRAALVM_HOME` or `JAVA_HOME`, otherwise installs the
|
||||
GraalVM version pinned in `.sdkmanrc` through [SDKMAN](https://sdkman.io/install/),
|
||||
installing SDKMAN too when needed. It builds with the Gradle Wrapper, checks the
|
||||
executable, copies it to `~/.local/bin/ai-engineering`, and creates the `aie`
|
||||
shortcut. Run the same command again to update. The installed copy works independently
|
||||
of this checkout. A failed build or executable check leaves the previous installation
|
||||
in place. Downloads require internet access.
|
||||
|
||||
If `~/.local/bin` is not in your `PATH`, add this to your shell profile and current
|
||||
session (the script prints the appropriate command for your destination):
|
||||
|
||||
```sh
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
aie --help
|
||||
```
|
||||
|
||||
Use `./scripts/install-native.sh --bin-dir /path/to/bin` to select another destination.
|
||||
The script can be invoked from any directory and does not modify shell profiles or
|
||||
install system packages. It requires `curl`, `zip`, and `unzip` when installing GraalVM
|
||||
through SDKMAN. Install [native build prerequisites](https://www.graalvm.org/jdk25/reference-manual/native-image/)
|
||||
before running it:
|
||||
|
||||
- macOS: `xcode-select --install` (Apple Command Line Tools).
|
||||
- Debian/Ubuntu: `sudo apt-get install build-essential zlib1g-dev`.
|
||||
- Fedora/RHEL: `sudo dnf install gcc gcc-c++ glibc-devel zlib-devel libstdc++-static`.
|
||||
|
||||
The pinned GraalVM does not support macOS Intel; use the JVM instructions above.
|
||||
|
||||
For a manual native build:
|
||||
|
||||
The native executable runs without a JVM. Building it requires **GraalVM for
|
||||
JDK 25**, Native Image, and a C/C++ toolchain for the target platform. Set both
|
||||
`JAVA_HOME` and `GRAALVM_HOME` to your GraalVM installation.
|
||||
|
||||
Reference in New Issue
Block a user