@agentxm/client-core 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentxm/client-core",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Core library for the axm agent extension manager",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -209,6 +209,6 @@
209
209
  "typescript": "^5.9.3",
210
210
  "vitest": "^4.0.0",
211
211
  "yaml": "^2.8.2",
212
- "@agentxm/client-utils": "0.4.0"
212
+ "@agentxm/client-utils": "0.4.1"
213
213
  }
214
214
  }
@@ -0,0 +1,128 @@
1
+ # Install script for axm — the extension manager for AI coding agents.
2
+ # Usage: irm https://axm.sh/install.ps1 | iex
3
+ $ErrorActionPreference = 'Stop'
4
+
5
+ $GITHUB_REPO = if ($env:AXM_INSTALL_GITHUB_REPO) { $env:AXM_INSTALL_GITHUB_REPO } else { "agentxm/axm" }
6
+ $BASE_URL = if ($env:AXM_INSTALL_BASE_URL) {
7
+ $env:AXM_INSTALL_BASE_URL
8
+ }
9
+ else {
10
+ "https://github.com/$GITHUB_REPO/releases/latest/download"
11
+ }
12
+
13
+ function Detect-Architecture {
14
+ $arch = $env:PROCESSOR_ARCHITECTURE
15
+
16
+ switch ($arch) {
17
+ "AMD64" {
18
+ return "x64"
19
+ }
20
+ "ARM64" {
21
+ Write-Host "Error: Windows arm64 is not yet supported." -ForegroundColor Red
22
+ exit 1
23
+ }
24
+ default {
25
+ Write-Host "Error: Unsupported architecture: $arch" -ForegroundColor Red
26
+ Write-Host ""
27
+ Write-Host "Supported architectures:"
28
+ Write-Host " - x64 (AMD64)"
29
+ exit 1
30
+ }
31
+ }
32
+ }
33
+
34
+ function Download-Binary {
35
+ param (
36
+ [string]$Arch
37
+ )
38
+
39
+ $artifact = "axm-windows-${Arch}.exe"
40
+ $downloadUrl = "$BASE_URL/$artifact"
41
+ $installDir = Join-Path $env:LOCALAPPDATA "axm"
42
+ $target = Join-Path $installDir "axm.exe"
43
+
44
+ Write-Host "Detected platform: windows-$Arch"
45
+ Write-Host "Downloading $artifact..."
46
+
47
+ if (-not (Test-Path $installDir)) {
48
+ New-Item -ItemType Directory -Path $installDir -Force | Out-Null
49
+ }
50
+
51
+ $previousProgressPreference = $ProgressPreference
52
+ $ProgressPreference = 'SilentlyContinue'
53
+
54
+ try {
55
+ Invoke-WebRequest -Uri $downloadUrl -OutFile $target -UseBasicParsing
56
+ }
57
+ catch {
58
+ Write-Host ""
59
+ Write-Host "Error: Failed to download $artifact." -ForegroundColor Red
60
+ Write-Host "URL: $downloadUrl"
61
+ Write-Host ""
62
+ Write-Host "Check that the release exists and your network connection is working."
63
+ exit 1
64
+ }
65
+ finally {
66
+ $ProgressPreference = $previousProgressPreference
67
+ }
68
+
69
+ Write-Host "Installed to $target"
70
+
71
+ # Write install metadata
72
+ $metaFile = Join-Path $installDir "install-meta.json"
73
+ $timestamp = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
74
+ $metaContent = "{`"method`": `"script`", `"installedAt`": `"$timestamp`"}"
75
+ Set-Content -Path $metaFile -Value $metaContent -Encoding UTF8
76
+
77
+ return $installDir
78
+ }
79
+
80
+ function Test-AxmOnPath {
81
+ $cmd = Get-Command "axm" -ErrorAction SilentlyContinue
82
+ return $null -ne $cmd
83
+ }
84
+
85
+ function Print-PathInstructions {
86
+ param (
87
+ [string]$InstallDir
88
+ )
89
+
90
+ Write-Host "Add axm to your PATH:"
91
+ Write-Host ""
92
+ Write-Host " Option 1: Via System Properties"
93
+ Write-Host " 1. Press Win+R, type 'sysdm.cpl', press Enter"
94
+ Write-Host " 2. Go to Advanced > Environment Variables"
95
+ Write-Host " 3. Under User variables, select Path, click Edit"
96
+ Write-Host " 4. Click New, add: $InstallDir"
97
+ Write-Host " 5. Click OK to save"
98
+ Write-Host ""
99
+ Write-Host " Option 2: Via PowerShell (current user):"
100
+ Write-Host " `$currentPath = [Environment]::GetEnvironmentVariable('Path', 'User')"
101
+ Write-Host " [Environment]::SetEnvironmentVariable('Path', `"$InstallDir;`$currentPath`", 'User')"
102
+ }
103
+
104
+ function Verify {
105
+ param (
106
+ [string]$InstallDir
107
+ )
108
+
109
+ Write-Host ""
110
+
111
+ if (Test-AxmOnPath) {
112
+ & axm --version
113
+ Write-Host ""
114
+ Write-Host "Done! Run 'axm auth login' to get started."
115
+ }
116
+ else {
117
+ Write-Host "axm was installed to $InstallDir but it is not on your PATH."
118
+ Write-Host ""
119
+ Print-PathInstructions -InstallDir $InstallDir
120
+ Write-Host ""
121
+ Write-Host "Then open a new terminal and run: axm auth login"
122
+ }
123
+ }
124
+
125
+ # Main
126
+ $arch = Detect-Architecture
127
+ $installDir = Download-Binary -Arch $arch
128
+ Verify -InstallDir $installDir