@agentxm/client-core 0.4.0 → 0.4.2

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.2",
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.2"
213
213
  }
214
214
  }
@@ -20,29 +20,10 @@ extension packs across your AI agents from a single CLI.
20
20
 
21
21
  ## Step 1: Install
22
22
 
23
- Choose one installation method. Agents typically run in Node.js environments, so
24
- npx is the recommended default.
23
+ Each method below installs a persistent `axm` binary on the machine. Pick the
24
+ one that matches the environment (operating system or package manager).
25
25
 
26
- ### Option A: npx (recommended for agents)
27
-
28
- Requires Node.js. No global install needed.
29
-
30
- ```bash
31
- npx axm.sh --version
32
- ```
33
-
34
- Prefix all axm commands with `npx axm.sh` instead of `axm`:
35
-
36
- ```bash
37
- npx axm.sh auth login
38
- npx axm.sh whoami
39
- ```
40
-
41
- ### Option B: Native install scripts
42
-
43
- For environments without Node.js. Downloads a standalone binary.
44
-
45
- **macOS / Linux (bash):**
26
+ ### Option A: macOS / Linux (install script)
46
27
 
47
28
  ```bash
48
29
  curl -fsSL https://axm.sh/install.sh | sh
@@ -54,7 +35,7 @@ Installs to `~/.axm/bin/axm`. If `axm` is not found after install, add to PATH:
54
35
  export PATH="$HOME/.axm/bin:$PATH"
55
36
  ```
56
37
 
57
- **Windows (PowerShell):**
38
+ ### Option B: Windows (PowerShell)
58
39
 
59
40
  ```powershell
60
41
  irm https://axm.sh/install.ps1 | iex
@@ -63,9 +44,7 @@ irm https://axm.sh/install.ps1 | iex
63
44
  Installs to `%LOCALAPPDATA%\axm\axm.exe`. Follow the printed PATH instructions
64
45
  if `axm` is not recognized.
65
46
 
66
- **Windows (CMD):**
67
-
68
- Download and run `install.cmd` from `https://axm.sh/install.cmd`:
47
+ ### Option C: Windows (CMD)
69
48
 
70
49
  ```cmd
71
50
  curl -fsSL -o install.cmd https://axm.sh/install.cmd && install.cmd
@@ -74,12 +53,27 @@ curl -fsSL -o install.cmd https://axm.sh/install.cmd && install.cmd
74
53
  Installs to `%LOCALAPPDATA%\axm\axm.exe`. Follow the printed PATH instructions
75
54
  if `axm` is not recognized.
76
55
 
77
- ### Option C: Homebrew (macOS / Linux)
56
+ ### Option D: Homebrew (macOS / Linux)
78
57
 
79
58
  ```bash
80
59
  brew install agentxm/tap/axm
81
60
  ```
82
61
 
62
+ ### Option E: npm (any OS with Node.js)
63
+
64
+ Installs the `axm.sh` package globally. Requires Node.js.
65
+
66
+ ```bash
67
+ npm install -g axm.sh
68
+ ```
69
+
70
+ If `axm` is not found after install, ensure the npm global bin directory is on
71
+ PATH:
72
+
73
+ ```bash
74
+ export PATH="$(npm config get prefix)/bin:$PATH"
75
+ ```
76
+
83
77
  **Verify:**
84
78
 
85
79
  ```bash
@@ -147,7 +141,6 @@ axm skills list --json
147
141
 
148
142
  The fix depends on how you installed:
149
143
 
150
- - **npx:** Use `npx axm.sh` instead of `axm`. Ensure Node.js is installed.
151
144
  - **Install script (macOS/Linux):** Add `~/.axm/bin` to PATH:
152
145
  ```bash
153
146
  export PATH="$HOME/.axm/bin:$PATH"
@@ -160,7 +153,7 @@ The fix depends on how you installed:
160
153
  $env:Path = "$env:LOCALAPPDATA\axm;$env:Path"
161
154
  ```
162
155
  - **Homebrew:** Run `brew link axm` or check `brew --prefix axm`.
163
- - **npm (legacy):** Ensure your global npm bin directory is on PATH:
156
+ - **npm:** Ensure the global npm bin directory is on PATH:
164
157
  ```bash
165
158
  export PATH="$(npm config get prefix)/bin:$PATH"
166
159
  ```
@@ -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