Skip to content

Releases and signature verification

Install, update, and remove the CLI with its release trust policy.

Applies to
CLI
macOSLinuxWindows

Verified · v1.4.24

Markdown

Install

curl -fsSL https://agi-labo.com/wings/install.sh | sh

The installer checks the signatures of the CLI and release information before installing. It uses the public key included in the installer. It also checks the latest version against information published by the Console over HTTPS. On Windows, use the same command in Git Bash, MSYS2, or Cygwin. Git for Windows includes the required ssh-keygen and sha256sum tools. Installation stops if either tool is missing; verification is never skipped. In PowerShell 5.1 or 7, use the PowerShell command:

irm https://agi-labo.com/wings/install.ps1 | iex

It requires ssh-keygen.exe from the Windows OpenSSH client. If it is missing, installation stops and directs you to Git Bash. Signature verification is never skipped. WSL is expected to use the Linux build; its runtime behavior has not been verified.

This command trusts the HTTPS site that delivers the installer and its public key. It does not verify the installer's own signature before running it. Use the next procedure if you want to verify that signature first.

With curl | sh, a failed download is not reported to sh. However, a truncated download does not start the installation unless it reaches the final function call.

Verify the installer first (advanced)

Download a specific version and its signature. This procedure runs the installer only after verification with the pinned public key succeeds.

(
  set -eu
  tmp_dir=$(mktemp -d)
  trap 'rm -rf "$tmp_dir"' 0 HUP INT TERM
  curl -fsSLo "$tmp_dir/install.sh" https://releases.agi-labo.com/wings/v1.4.24/install.sh
  curl -fsSLo "$tmp_dir/install.sh.sshsig" https://releases.agi-labo.com/wings/v1.4.24/install.sh.sshsig
  printf '%s\n' 'agi-wings-release ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP0F1UbSUyGSbSD6+Gb1TKPiWgokOw5fFW7bmdWaTdro' > "$tmp_dir/allowed-signers"
  ssh-keygen -Y verify -f "$tmp_dir/allowed-signers" -I agi-wings-release -n agi-wings-release -s "$tmp_dir/install.sh.sshsig" < "$tmp_dir/install.sh"
  sh "$tmp_dir/install.sh"
)

Verify the PowerShell installer

Use this procedure in Windows PowerShell 5.1 or PowerShell 7.

TEMP must be inside %USERPROFILE%, and its ancestors from the profile must deny writes by other users. SYSTEM and Administrators remain trusted. Unsafe ownership, permissions, or links stop the procedure without changing existing permissions. OS-managed ancestors above the profile are trusted for permissions; links are still rejected. Downloads start only after the working directory has a protected user-only ACL, and the exact verified bytes are executed.

& {
  $ErrorActionPreference = 'Stop'
  $ProgressPreference = 'SilentlyContinue'
  function Get-WingsVerificationSshKeygen {
    $windows = [Environment]::GetFolderPath('Windows')
    foreach ($candidate in @("$windows\Sysnative\OpenSSH\ssh-keygen.exe", "$windows\System32\OpenSSH\ssh-keygen.exe")) {
      if (Test-Path -LiteralPath $candidate -PathType Leaf) { return $candidate }
    }
    throw 'OpenSSH is required. Use the Git Bash installer if it is unavailable.'
  }
  function New-WingsVerificationDirectory {
    $identity = [Security.Principal.WindowsIdentity]::GetCurrent()
    $fileSystem = New-Object -ComObject Scripting.FileSystemObject
    $profileFolder = $null
    $tempFolder = $null
    try {
      $profileFolder = $fileSystem.GetFolder($env:USERPROFILE)
      $tempFolder = $fileSystem.GetFolder([IO.Path]::GetTempPath())
      $profile = $profileFolder.ShortPath.TrimEnd('\')
      $temporary = $tempFolder.ShortPath.TrimEnd('\')
      if ($profile -notmatch '^[a-zA-Z]:\\' -or (-not $temporary.Equals($profile, [StringComparison]::OrdinalIgnoreCase) -and -not $temporary.StartsWith($profile + '\', [StringComparison]::OrdinalIgnoreCase))) {
        throw 'TEMP must be inside the current user profile.'
      }
      $owners = @($identity.User, $identity.Owner, (New-Object Security.Principal.SecurityIdentifier('S-1-5-18')), (New-Object Security.Principal.SecurityIdentifier('S-1-5-32-544')))
      $ownerRights = New-Object Security.Principal.SecurityIdentifier('S-1-3-4')
      $creatorOwner = New-Object Security.Principal.SecurityIdentifier('S-1-3-0')
      $paths = @()
      for ($current = $temporary; $current; $current = [IO.Path]::GetDirectoryName($current)) { $paths = @($current) + $paths }
      $insideProfile = $false
      foreach ($path in $paths) {
        $item = Get-Item -LiteralPath $path -Force
        if (-not $item.PSIsContainer -or (([int]$item.Attributes -band 1024) -ne 0)) { throw 'TEMP ancestors must be real directories without links or reparse points.' }
        if ($path.Equals($profile, [StringComparison]::OrdinalIgnoreCase)) { $insideProfile = $true }
        if (-not $insideProfile) { continue }
        $acl = Get-Acl -LiteralPath $path
        $owner = $acl.GetOwner([Security.Principal.SecurityIdentifier])
        if (@($owners | Where-Object { $_.Equals($owner) }).Count -eq 0) { throw 'TEMP ancestors must have a trusted owner.' }
        $descriptor = New-Object Security.AccessControl.RawSecurityDescriptor($acl.GetSecurityDescriptorBinaryForm(), 0)
        if ($null -eq $descriptor.DiscretionaryAcl) { throw 'TEMP ancestors must not have a null DACL.' }
        foreach ($ace in $descriptor.DiscretionaryAcl) {
          if ([int]$ace.AceType -eq 1) { continue }
          if ([int]$ace.AceType -ne 0) { throw 'TEMP ancestors contain an unsupported ACL entry.' }
          $trustee = $ace.SecurityIdentifier
          if (@($owners | Where-Object { $_.Equals($trustee) }).Count -gt 0 -or $ownerRights.Equals($trustee)) { continue }
          if ($creatorOwner.Equals($trustee) -and (([int]$ace.AceFlags -band 8) -ne 0)) { continue }
          $mask = [long]$ace.AccessMask -band 0xffffffffL
          if ($mask -band (0xffffffffL -bxor 0xa01200a9L)) { throw 'TEMP ancestors must not grant write access to another user.' }
        }
      }
      $path = Join-Path $temporary ('wings-verify-' + [guid]::NewGuid().ToString('N'))
      $private = New-Object Security.AccessControl.DirectorySecurity
      $private.SetOwner($identity.User)
      $private.SetAccessRuleProtection($true, $false)
      $private.AddAccessRule((New-Object Security.AccessControl.FileSystemAccessRule($identity.User, 'FullControl', 'ContainerInherit, ObjectInherit', 'None', 'Allow')))
      New-Item -ItemType Directory -Path $path | Out-Null
      try { Set-Acl -LiteralPath $path -AclObject $private }
      catch { Remove-Item -LiteralPath $path -Force; throw }
      return $path
    } finally {
      foreach ($folder in @($profileFolder, $tempFolder, $fileSystem)) {
        if ($folder) { [void][Runtime.InteropServices.Marshal]::FinalReleaseComObject($folder) }
      }
      $identity.Dispose()
    }
  }
  $verifier = Get-WingsVerificationSshKeygen
  $tmpDir = New-WingsVerificationDirectory
  $tls = [Net.ServicePointManager]::SecurityProtocol
  $process = $null
  try {
    [Net.ServicePointManager]::SecurityProtocol = $tls -bor [Net.SecurityProtocolType]::Tls12
    Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -Uri 'https://releases.agi-labo.com/wings/v1.4.24/install.ps1' -OutFile "$tmpDir\install.ps1"
    Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -Uri 'https://releases.agi-labo.com/wings/v1.4.24/install.ps1.sshsig' -OutFile "$tmpDir\install.ps1.sshsig"
    [IO.File]::WriteAllText("$tmpDir\allowed-signers", "agi-wings-release ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP0F1UbSUyGSbSD6+Gb1TKPiWgokOw5fFW7bmdWaTdro`n", (New-Object Text.UTF8Encoding($false)))
    $installerBytes = [IO.File]::ReadAllBytes("$tmpDir\install.ps1")
    $start = New-Object Diagnostics.ProcessStartInfo
    $start.FileName = $verifier
    $start.Arguments = '-Y verify -f "{0}\allowed-signers" -I agi-wings-release -n agi-wings-release -s "{0}\install.ps1.sshsig"' -f $tmpDir
    $start.UseShellExecute = $false
    $start.CreateNoWindow = $true
    $start.RedirectStandardInput = $true
    $start.RedirectStandardOutput = $true
    $start.RedirectStandardError = $true
    $process = New-Object Diagnostics.Process
    $process.StartInfo = $start
    $inputEncoding = [Console]::InputEncoding
    $restoreInputEncoding = $false
    try {
      if ($start.PSObject.Properties['StandardInputEncoding']) { $start.StandardInputEncoding = New-Object Text.UTF8Encoding($false) }
      elseif ($inputEncoding.GetPreamble().Length -gt 0) {
        [Console]::InputEncoding = New-Object Text.UTF8Encoding($false)
        $restoreInputEncoding = $true
      }
      [void]$process.Start()
    } finally { if ($restoreInputEncoding) { [Console]::InputEncoding = $inputEncoding } }
    $stdout = $process.StandardOutput.ReadToEndAsync()
    $stderr = $process.StandardError.ReadToEndAsync()
    $process.StandardInput.BaseStream.Write($installerBytes, 0, $installerBytes.Length)
    $process.StandardInput.Close()
    if (-not $process.WaitForExit(60000)) { $process.Kill(); throw 'Installer signature verification timed out.' }
    $null = $stdout.GetAwaiter().GetResult()
    $diagnostic = $stderr.GetAwaiter().GetResult()
    if ($process.ExitCode -ne 0) { throw "Installer signature verification failed (ssh-keygen exit code $($process.ExitCode)): $diagnostic" }
    Invoke-Expression ([Text.Encoding]::UTF8.GetString($installerBytes))
  } finally {
    if ($process) { $process.Dispose() }
    [Net.ServicePointManager]::SecurityProtocol = $tls
    Remove-Item -LiteralPath $tmpDir -Recurse -Force
  }
}

Update

wings update --check
wings update
wings version

Normal updates verify the signed latest-version information, file manifest, checksums, and binary. The signature on the latest-version information has a short expiry. If the CLI has no local update record yet, it also checks the Console's current-release information over HTTPS. A failed check leaves the installed CLI unchanged.

On Windows, the updater verifies the new executable, moves the running executable aside in the same directory, and installs the new one. The next CLI launch removes the old executable; if it is still in use, a later launch retries. Windows Authenticode signing is not provided; verification uses the same sshsig-ed25519 policy as other systems.

Choose a specific version

wings update --base-url https://releases.agi-labo.com/wings/vX.Y.Z

Specify --base-url explicitly to choose a version. The update command ignores AGI_WINGS_INSTALL_BASE_URL and AGI_WINGS_CURRENT_RELEASE_URL.

Ordinary downgrades are refused. The normal update process can roll back only with a short-lived, signed authorization from the operator.

macOS notarization and Gatekeeper acceptance are not guaranteed. If the OS blocks execution, check the signature verification result and contact support. Do not bypass the warning without checking it.

Uninstall

wings logout
wings skill uninstall --target all --yes
rm "$HOME/.agi-tools/bin/wings"

--yes skips the removal confirmation and is required when input is not a terminal.

If server-side sign-out fails, follow the instructions shown. Uninstalling does not remove cloud resources such as Handlers. Delete that data separately.

On Windows, remove the CLI with rm "$(cygpath -u -- "$USERPROFILE")/.agi-tools/bin/wings.exe".

In PowerShell, remove the CLI with Remove-Item -LiteralPath "$env:USERPROFILE\.agi-tools\bin\wings.exe".

Releases and signature verification | AGI Wings Documentation