--- since: 1.0.0 --- ## Installation ### Supported Platforms & Asset Coverage | Binary File | Target OS / Environment | Target Architecture | | :--- | :--- | :--- | | **`astwire-darwin-arm64`** | macOS (Apple Silicon: M1, M2, M3, M4) | ARM 64-bit (`arm64`) | | **`astwire-linux-amd64`** | Linux (Ubuntu, Debian, RedHat, standard cloud VMs) | Intel/AMD 64-bit (`x86_64`) | | **`astwire-linux-arm64`** | Linux (AWS Graviton, Raspberry Pi, Apple Silicon Docker) | ARM 64-bit (`aarch64`/`arm64`) | | **`astwire-windows-amd64.exe`** | Windows 10, 11, Server | 64-bit (`x86_64`) | ### 1. Quick Install (Recommended) **macOS & Linux (bash)**: ```bash # latest curl -fsSL https://install.djangoplay.org/astwire | bash # specific version — note the -s -- before args when piping into bash curl -fsSL https://install.djangoplay.org/astwire | bash -s -- v0.1.0 ``` **Windows (PowerShell as Administrator)**: ```powershell # latest irm https://install.djangoplay.org/astwire.ps1 | iex # specific version $env:ASTWIRE_VERSION = "v0.1.0"; irm https://install.djangoplay.org/astwire.ps1 | iex ``` ### 2. Build Native Binary From Source For customized environments, build via the provided script rather than invoking Nuitka directly — it resolves the version from `pyproject.toml`, sets up onefile caching, and stamps the binary's version metadata for you: ```bash git clone https://github.com/codefleetx/astwire.git cd astwire # Install compilation prerequisites into your virtualenv python3 -m venv .venv source .venv/bin/activate pip install -e ".[dev]" # includes nuitka # Compile into a standalone single-file binary make compile ./bin/astwire --version ``` `make compile` runs `scripts/install/compile.sh`, which reads the current version out of `pyproject.toml`, generates `src/_version.py` so it's baked into the binary (so `astwire --version` always matches the package version), and invokes Nuitka with `--standalone --onefile --prefer-source-code`. The resulting binary is written to `bin/astwire`. ### 3. Build Native Binary From Source For customized environments, or platforms without a prebuilt binary (macOS Intel): ```bash git clone https://github.com/codefleetx/astwire.git cd astwire # Install compilation prerequisites pip install -U nuitka zstandard # Compile into a standalone single-file binary PYTHONPATH=. "$PYTHON_BIN" -m nuitka \ --standalone \ --onefile \ --product-version="$VERSION_TAG" \ --file-version="$VERSION_TAG" \ --onefile-tempdir-spec="{CACHE_DIR}/astwire/{VERSION}" \ --remove-output \ --assume-yes-for-downloads \ --prefer-source-code \ --include-package=src \ --output-dir=bin \ --output-filename=astwire \ src/cli.py chmod +x bin/astwire echo "==> Build complete: ./bin/astwire" ./bin/astwire --version ``` See [`../deployment/local-development.md`](../deployment/local-development.md) for the full local build/test workflow. ## Verify Installation ```bash astwire --version astwire --help ``` ## Uninstallation ### CLI Uninstall (recommended) ```bash astwire --uninstall ``` Removes the binary and any local configuration files (`.astwire.toml`, `.astwireignore`, in both the current directory and `$HOME`). On Windows, this schedules a detached PowerShell process to remove the install directory and clean the user `PATH` entry once the running process exits. ### Manual Uninstall Because astwire is a self-contained, standalone single-file binary, manual uninstallation just means removing the binary and any local config: **macOS & Linux:** ```bash # Remove the global binary sudo rm -f /usr/local/bin/astwire # Remove local configuration files (if created) rm -f ~/.astwire.toml .astwire.toml .astwireignore ``` **Windows (PowerShell):** ```powershell # Remove installation directory Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Programs\astwire" # Clean up user PATH environment variable $UserPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User) $CleanPath = ($UserPath -split ";" | Where-Object { $_ -ne "$env:LOCALAPPDATA\Programs\astwire" }) -join ";" [Environment]::SetEnvironmentVariable("Path", $CleanPath, [EnvironmentVariableTarget]::User) ``` ## Upgrading Re-running the original install command cleanly overwrites the existing binary — you do **not** need to uninstall first: - **macOS & Linux:** `curl -fsSL https://install.djangoplay.org/astwire | bash` moves the latest binary directly over `/usr/local/bin/astwire`. - **Windows:** `irm https://install.djangoplay.org/astwire.ps1 | iex` overwrites `astwire.exe` in `%LOCALAPPDATA%\Programs\astwire` in place. The old binary is replaced atomically in-place either way.