@agentxm/client-core 0.4.2 → 0.4.3
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/README.md +11 -0
- package/package.json +51 -45
- package/site-content/install.md +231 -62
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @agentxm/client-core
|
|
2
|
+
|
|
3
|
+
> ⚠️ **Unstable, unsupported library.** This package exists to support the
|
|
4
|
+
> [`axm.sh`](https://www.npmjs.com/package/axm.sh) CLI. Its APIs live under
|
|
5
|
+
> `./unstable/*` and can change or disappear in any release without notice.
|
|
6
|
+
>
|
|
7
|
+
> **Use the [`axm.sh`](https://www.npmjs.com/package/axm.sh) CLI instead.**
|
|
8
|
+
>
|
|
9
|
+
> See https://axm.sh.
|
|
10
|
+
|
|
11
|
+
MIT © 2025-2026 AgentXM, Inc.
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentxm/client-core",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Core library for the axm agent extension manager",
|
|
3
|
+
"version": "0.4.3",
|
|
4
|
+
"description": "Core library for the axm agent extension manager. Unstable and unsupported — use the axm.sh CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"homepage": "https://axm.sh",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/agentxm/axm/issues"
|
|
10
|
+
},
|
|
11
|
+
"author": "AgentXM <hello@agentxm.ai> (https://agentxm.ai)",
|
|
7
12
|
"repository": {
|
|
8
13
|
"type": "git",
|
|
9
14
|
"url": "https://github.com/agentxm/axm.git",
|
|
@@ -11,175 +16,176 @@
|
|
|
11
16
|
},
|
|
12
17
|
"exports": {
|
|
13
18
|
"./unstable/app-error": {
|
|
14
|
-
"types": "./src/unstable/app-error/index.ts",
|
|
19
|
+
"types": "./dist/src/unstable/app-error/index.d.ts",
|
|
15
20
|
"default": "./dist/src/unstable/app-error/index.js"
|
|
16
21
|
},
|
|
17
22
|
"./unstable/prompt-cancelled": {
|
|
18
|
-
"types": "./src/unstable/cli-prompt/prompt-cancelled.ts",
|
|
23
|
+
"types": "./dist/src/unstable/cli-prompt/prompt-cancelled.d.ts",
|
|
19
24
|
"default": "./dist/src/unstable/cli-prompt/prompt-cancelled.js"
|
|
20
25
|
},
|
|
21
26
|
"./unstable/version-constraints": {
|
|
22
|
-
"types": "./src/unstable/version-constraints/version-constraints.ts",
|
|
27
|
+
"types": "./dist/src/unstable/version-constraints/version-constraints.d.ts",
|
|
23
28
|
"default": "./dist/src/unstable/version-constraints/version-constraints.js"
|
|
24
29
|
},
|
|
25
30
|
"./unstable/branding": {
|
|
26
|
-
"types": "./src/unstable/branding.ts",
|
|
31
|
+
"types": "./dist/src/unstable/branding.d.ts",
|
|
27
32
|
"default": "./dist/src/unstable/branding.js"
|
|
28
33
|
},
|
|
29
34
|
"./unstable/date-time": {
|
|
30
|
-
"types": "./src/unstable/date-time.ts",
|
|
35
|
+
"types": "./dist/src/unstable/date-time.d.ts",
|
|
31
36
|
"default": "./dist/src/unstable/date-time.js"
|
|
32
37
|
},
|
|
33
38
|
"./unstable/utils": {
|
|
34
|
-
"types": "./src/unstable/utils/index.ts",
|
|
39
|
+
"types": "./dist/src/unstable/utils/index.d.ts",
|
|
35
40
|
"default": "./dist/src/unstable/utils/index.js"
|
|
36
41
|
},
|
|
37
42
|
"./unstable/agents": {
|
|
38
|
-
"types": "./src/unstable/agents/index.ts",
|
|
43
|
+
"types": "./dist/src/unstable/agents/index.d.ts",
|
|
39
44
|
"default": "./dist/src/unstable/agents/index.js"
|
|
40
45
|
},
|
|
41
46
|
"./unstable/extensions": {
|
|
42
|
-
"types": "./src/unstable/extensions/index.ts",
|
|
47
|
+
"types": "./dist/src/unstable/extensions/index.d.ts",
|
|
43
48
|
"default": "./dist/src/unstable/extensions/index.js"
|
|
44
49
|
},
|
|
45
50
|
"./unstable/extensions/common": {
|
|
46
|
-
"types": "./src/unstable/extensions/common.ts",
|
|
51
|
+
"types": "./dist/src/unstable/extensions/common.d.ts",
|
|
47
52
|
"default": "./dist/src/unstable/extensions/common.js"
|
|
48
53
|
},
|
|
49
54
|
"./unstable/extensions/fqn": {
|
|
50
|
-
"types": "./src/unstable/extensions/fqn.ts",
|
|
55
|
+
"types": "./dist/src/unstable/extensions/fqn.d.ts",
|
|
51
56
|
"default": "./dist/src/unstable/extensions/fqn.js"
|
|
52
57
|
},
|
|
53
58
|
"./unstable/extensions/handle": {
|
|
54
|
-
"types": "./src/unstable/extensions/handle.ts",
|
|
59
|
+
"types": "./dist/src/unstable/extensions/handle.d.ts",
|
|
55
60
|
"default": "./dist/src/unstable/extensions/handle.js"
|
|
56
61
|
},
|
|
57
62
|
"./unstable/extensions/registry-source": {
|
|
58
|
-
"types": "./src/unstable/extensions/registry-source.ts",
|
|
63
|
+
"types": "./dist/src/unstable/extensions/registry-source.d.ts",
|
|
59
64
|
"default": "./dist/src/unstable/extensions/registry-source.js"
|
|
60
65
|
},
|
|
61
66
|
"./unstable/lockfile": {
|
|
62
|
-
"types": "./src/unstable/lockfile/index.ts",
|
|
67
|
+
"types": "./dist/src/unstable/lockfile/index.d.ts",
|
|
63
68
|
"default": "./dist/src/unstable/lockfile/index.js"
|
|
64
69
|
},
|
|
65
70
|
"./unstable/schema": {
|
|
66
|
-
"types": "./src/unstable/schema/index.ts",
|
|
71
|
+
"types": "./dist/src/unstable/schema/index.d.ts",
|
|
67
72
|
"default": "./dist/src/unstable/schema/index.js"
|
|
68
73
|
},
|
|
69
74
|
"./unstable/settings": {
|
|
70
|
-
"types": "./src/unstable/settings/index.ts",
|
|
75
|
+
"types": "./dist/src/unstable/settings/index.d.ts",
|
|
71
76
|
"default": "./dist/src/unstable/settings/index.js"
|
|
72
77
|
},
|
|
73
78
|
"./unstable/sources": {
|
|
74
|
-
"types": "./src/unstable/sources/index.ts",
|
|
79
|
+
"types": "./dist/src/unstable/sources/index.d.ts",
|
|
75
80
|
"default": "./dist/src/unstable/sources/index.js"
|
|
76
81
|
},
|
|
77
82
|
"./unstable/cli-flags": {
|
|
78
|
-
"types": "./src/unstable/cli-flags/index.ts",
|
|
83
|
+
"types": "./dist/src/unstable/cli-flags/index.d.ts",
|
|
79
84
|
"default": "./dist/src/unstable/cli-flags/index.js"
|
|
80
85
|
},
|
|
81
86
|
"./unstable/cli-runtime": {
|
|
82
|
-
"types": "./src/unstable/cli-runtime/index.ts",
|
|
87
|
+
"types": "./dist/src/unstable/cli-runtime/index.d.ts",
|
|
83
88
|
"default": "./dist/src/unstable/cli-runtime/index.js"
|
|
84
89
|
},
|
|
85
90
|
"./unstable/telemetry": {
|
|
86
|
-
"types": "./src/unstable/telemetry/index.ts",
|
|
91
|
+
"types": "./dist/src/unstable/telemetry/index.d.ts",
|
|
87
92
|
"default": "./dist/src/unstable/telemetry/index.js"
|
|
88
93
|
},
|
|
89
94
|
"./unstable/cli-renderer": {
|
|
90
|
-
"types": "./src/unstable/cli-renderer/index.ts",
|
|
95
|
+
"types": "./dist/src/unstable/cli-renderer/index.d.ts",
|
|
91
96
|
"default": "./dist/src/unstable/cli-renderer/index.js"
|
|
92
97
|
},
|
|
93
98
|
"./unstable/git": {
|
|
94
|
-
"types": "./src/unstable/git/index.ts",
|
|
99
|
+
"types": "./dist/src/unstable/git/index.d.ts",
|
|
95
100
|
"default": "./dist/src/unstable/git/index.js"
|
|
96
101
|
},
|
|
97
102
|
"./unstable/registry": {
|
|
98
|
-
"types": "./src/unstable/registry/index.ts",
|
|
103
|
+
"types": "./dist/src/unstable/registry/index.d.ts",
|
|
99
104
|
"default": "./dist/src/unstable/registry/index.js"
|
|
100
105
|
},
|
|
101
106
|
"./unstable/auth": {
|
|
102
|
-
"types": "./src/unstable/auth/index.ts",
|
|
107
|
+
"types": "./dist/src/unstable/auth/index.d.ts",
|
|
103
108
|
"default": "./dist/src/unstable/auth/index.js"
|
|
104
109
|
},
|
|
105
110
|
"./unstable/plan": {
|
|
106
|
-
"types": "./src/unstable/plan/index.ts",
|
|
111
|
+
"types": "./dist/src/unstable/plan/index.d.ts",
|
|
107
112
|
"default": "./dist/src/unstable/plan/index.js"
|
|
108
113
|
},
|
|
109
114
|
"./unstable/lint": {
|
|
110
|
-
"types": "./src/unstable/lint/index.ts",
|
|
115
|
+
"types": "./dist/src/unstable/lint/index.d.ts",
|
|
111
116
|
"default": "./dist/src/unstable/lint/index.js"
|
|
112
117
|
},
|
|
113
118
|
"./unstable/workspace": {
|
|
114
|
-
"types": "./src/unstable/workspace/index.ts",
|
|
119
|
+
"types": "./dist/src/unstable/workspace/index.d.ts",
|
|
115
120
|
"default": "./dist/src/unstable/workspace/index.js"
|
|
116
121
|
},
|
|
117
122
|
"./unstable/source-resolution": {
|
|
118
|
-
"types": "./src/unstable/source-resolution/index.ts",
|
|
123
|
+
"types": "./dist/src/unstable/source-resolution/index.d.ts",
|
|
119
124
|
"default": "./dist/src/unstable/source-resolution/index.js"
|
|
120
125
|
},
|
|
121
126
|
"./unstable/skills": {
|
|
122
|
-
"types": "./src/unstable/skills/index.ts",
|
|
127
|
+
"types": "./dist/src/unstable/skills/index.d.ts",
|
|
123
128
|
"default": "./dist/src/unstable/skills/index.js"
|
|
124
129
|
},
|
|
125
130
|
"./unstable/packs": {
|
|
126
|
-
"types": "./src/unstable/packs/index.ts",
|
|
131
|
+
"types": "./dist/src/unstable/packs/index.d.ts",
|
|
127
132
|
"default": "./dist/src/unstable/packs/index.js"
|
|
128
133
|
},
|
|
129
134
|
"./unstable/commands": {
|
|
130
|
-
"types": "./src/unstable/commands/index.ts",
|
|
135
|
+
"types": "./dist/src/unstable/commands/index.d.ts",
|
|
131
136
|
"default": "./dist/src/unstable/commands/index.js"
|
|
132
137
|
},
|
|
133
138
|
"./unstable/mcp-servers": {
|
|
134
|
-
"types": "./src/unstable/mcp-servers/index.ts",
|
|
139
|
+
"types": "./dist/src/unstable/mcp-servers/index.d.ts",
|
|
135
140
|
"default": "./dist/src/unstable/mcp-servers/index.js"
|
|
136
141
|
},
|
|
137
142
|
"./unstable/workflows": {
|
|
138
|
-
"types": "./src/unstable/workflows/index.ts",
|
|
143
|
+
"types": "./dist/src/unstable/workflows/index.d.ts",
|
|
139
144
|
"default": "./dist/src/unstable/workflows/index.js"
|
|
140
145
|
},
|
|
141
146
|
"./unstable/publish": {
|
|
142
|
-
"types": "./src/unstable/publish/index.ts",
|
|
147
|
+
"types": "./dist/src/unstable/publish/index.d.ts",
|
|
143
148
|
"default": "./dist/src/unstable/publish/index.js"
|
|
144
149
|
},
|
|
145
150
|
"./unstable/site-content/schemas/*": "./site-content/__generated__/schemas/*",
|
|
146
151
|
"./unstable/site-content/*": "./site-content/*",
|
|
147
152
|
"./unstable/install-method": {
|
|
148
|
-
"types": "./src/unstable/install-method/install-method.ts",
|
|
153
|
+
"types": "./dist/src/unstable/install-method/install-method.d.ts",
|
|
149
154
|
"default": "./dist/src/unstable/install-method/install-method.js"
|
|
150
155
|
},
|
|
151
156
|
"./unstable/install-meta": {
|
|
152
|
-
"types": "./src/unstable/install-meta/install-meta.ts",
|
|
157
|
+
"types": "./dist/src/unstable/install-meta/install-meta.d.ts",
|
|
153
158
|
"default": "./dist/src/unstable/install-meta/install-meta.js"
|
|
154
159
|
},
|
|
155
160
|
"./unstable/update-check": {
|
|
156
|
-
"types": "./src/unstable/update-check/update-check.ts",
|
|
161
|
+
"types": "./dist/src/unstable/update-check/update-check.d.ts",
|
|
157
162
|
"default": "./dist/src/unstable/update-check/update-check.js"
|
|
158
163
|
},
|
|
159
164
|
"./unstable/version-resolution": {
|
|
160
|
-
"types": "./src/unstable/version-resolution/version-resolution.ts",
|
|
165
|
+
"types": "./dist/src/unstable/version-resolution/version-resolution.d.ts",
|
|
161
166
|
"default": "./dist/src/unstable/version-resolution/version-resolution.js"
|
|
162
167
|
},
|
|
163
168
|
"./unstable/packaging": {
|
|
164
|
-
"types": "./src/unstable/packaging/index.ts",
|
|
169
|
+
"types": "./dist/src/unstable/packaging/index.d.ts",
|
|
165
170
|
"default": "./dist/src/unstable/packaging/index.js"
|
|
166
171
|
},
|
|
167
172
|
"./unstable/discover": {
|
|
168
|
-
"types": "./src/unstable/discover/index.ts",
|
|
173
|
+
"types": "./dist/src/unstable/discover/index.d.ts",
|
|
169
174
|
"default": "./dist/src/unstable/discover/index.js"
|
|
170
175
|
},
|
|
171
176
|
"./unstable/subagents": {
|
|
172
|
-
"types": "./src/unstable/subagents/index.ts",
|
|
177
|
+
"types": "./dist/src/unstable/subagents/index.d.ts",
|
|
173
178
|
"default": "./dist/src/unstable/subagents/index.js"
|
|
174
179
|
},
|
|
175
180
|
"./unstable/cli/prompt": {
|
|
176
|
-
"types": "./src/unstable/cli/prompt/index.ts",
|
|
181
|
+
"types": "./dist/src/unstable/cli/prompt/index.d.ts",
|
|
177
182
|
"default": "./dist/src/unstable/cli/prompt/index.js"
|
|
178
183
|
}
|
|
179
184
|
},
|
|
180
185
|
"files": [
|
|
181
186
|
"dist/src/",
|
|
182
|
-
"site-content/"
|
|
187
|
+
"site-content/",
|
|
188
|
+
"!**/*.map"
|
|
183
189
|
],
|
|
184
190
|
"publishConfig": {
|
|
185
191
|
"access": "public"
|
|
@@ -209,6 +215,6 @@
|
|
|
209
215
|
"typescript": "^5.9.3",
|
|
210
216
|
"vitest": "^4.0.0",
|
|
211
217
|
"yaml": "^2.8.2",
|
|
212
|
-
"@agentxm/client-utils": "0.4.
|
|
218
|
+
"@agentxm/client-utils": "^0.4.3"
|
|
213
219
|
}
|
|
214
220
|
}
|
package/site-content/install.md
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
# Install axm
|
|
2
2
|
|
|
3
|
-
**DONE WHEN:** `axm --version
|
|
3
|
+
**DONE WHEN:** `axm --version` succeeds and (if the user chose workspace setup)
|
|
4
|
+
`axm setup` has completed.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
## TODO
|
|
8
9
|
|
|
9
|
-
- [ ]
|
|
10
|
-
- [ ]
|
|
11
|
-
|
|
10
|
+
- [ ] Detect existing install (`axm --version`)
|
|
11
|
+
- [ ] If installed: `axm upgrade`. Otherwise: detect available package
|
|
12
|
+
managers (brew, npm) and pick the install method
|
|
13
|
+
- [ ] If multiple install methods are available: ask the user which to use
|
|
14
|
+
- [ ] Run the chosen installer
|
|
15
|
+
- [ ] Verify `axm --version`
|
|
16
|
+
- [ ] Check sign-in state with `axm whoami --json`
|
|
17
|
+
- [ ] If not signed in: ask the user to choose between signing in to
|
|
18
|
+
AgentXM.ai or going directly to workspace setup
|
|
19
|
+
- [ ] If the user chose to sign in: hand off signup/login, then re-check
|
|
20
|
+
`axm whoami`
|
|
21
|
+
- [ ] Run `axm setup --yes` to initialize the project workspace
|
|
12
22
|
|
|
13
23
|
---
|
|
14
24
|
|
|
@@ -16,12 +26,106 @@
|
|
|
16
26
|
|
|
17
27
|
axm is the open extension manager for AI coding agents. It lets you discover,
|
|
18
28
|
install, publish, and manage skills, commands, subagents, MCP servers, and
|
|
19
|
-
extension packs across your AI agents from a single CLI.
|
|
29
|
+
extension packs across your AI agents from a single CLI. axm is the CLI;
|
|
30
|
+
[AgentXM.ai](https://agentxm.ai) is the extension registry it connects to —
|
|
31
|
+
accounts, publishing, and extension discovery live there. An AgentXM.ai
|
|
32
|
+
account is only required for publishing extensions or installing private
|
|
33
|
+
extensions; public extensions install without an account.
|
|
20
34
|
|
|
21
|
-
##
|
|
35
|
+
## Detect existing install
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
Before installing, check whether axm is already on the machine:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
axm --version
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **Succeeds** (prints `X.Y.Z`) → axm is installed. Upgrade it to the latest
|
|
44
|
+
version and skip the Install section:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
axm upgrade
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`axm upgrade` auto-detects how axm was installed. For script installs it
|
|
51
|
+
downloads and swaps the binary in place. For Homebrew or npm installs it
|
|
52
|
+
prints the exact command to run (`brew upgrade agentxm/tap/axm` or
|
|
53
|
+
`npm update -g axm.sh`) — run whichever it emits, then re-run
|
|
54
|
+
`axm --version`. Continue to **Verify** when done.
|
|
55
|
+
|
|
56
|
+
- **Fails** with `command not found` → axm is not installed. Continue to
|
|
57
|
+
**Install**.
|
|
58
|
+
- **Fails** with any other error → treat as not installed and reinstall via
|
|
59
|
+
the Install section.
|
|
60
|
+
|
|
61
|
+
## Choose install method
|
|
62
|
+
|
|
63
|
+
axm can be installed via a standalone binary script, Homebrew, or npm. Pick
|
|
64
|
+
based on what's already on the machine — don't install a new package manager
|
|
65
|
+
just to install axm.
|
|
66
|
+
|
|
67
|
+
### 1. Detect available package managers
|
|
68
|
+
|
|
69
|
+
Check which package managers are installed. A manager is "available" if the
|
|
70
|
+
`--version` command exits successfully.
|
|
71
|
+
|
|
72
|
+
On macOS / Linux:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
brew --version >/dev/null 2>&1 && echo "brew: available"
|
|
76
|
+
npm --version >/dev/null 2>&1 && echo "npm: available"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
On Windows (PowerShell):
|
|
80
|
+
|
|
81
|
+
```powershell
|
|
82
|
+
if (Get-Command brew -ErrorAction SilentlyContinue) { "brew: available" }
|
|
83
|
+
if (Get-Command npm -ErrorAction SilentlyContinue) { "npm: available" }
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 2. Pick the method
|
|
87
|
+
|
|
88
|
+
Use this decision table — same logic on every platform:
|
|
89
|
+
|
|
90
|
+
| Detected managers | Chosen method |
|
|
91
|
+
| ------------------------------ | ------------------------------------------------------------- |
|
|
92
|
+
| Neither | Install script (Option A on macOS/Linux, Option B on Windows) |
|
|
93
|
+
| Homebrew only | Homebrew (Option D) |
|
|
94
|
+
| npm only | npm (Option E) |
|
|
95
|
+
| Homebrew and npm (two or more) | **STOP AND ASK** the user — see the prompt below |
|
|
96
|
+
|
|
97
|
+
The install script is always a valid fallback. If a package-manager install
|
|
98
|
+
fails, retry with Option A or B.
|
|
99
|
+
|
|
100
|
+
### 3. Ask the user when multiple managers are available
|
|
101
|
+
|
|
102
|
+
All three options install the same axm binary. **The main difference is how
|
|
103
|
+
you'll update it later.** Frame the choice that way when asking.
|
|
104
|
+
|
|
105
|
+
**STOP HERE AND ASK THE USER:**
|
|
106
|
+
|
|
107
|
+
> Multiple install methods are available on this machine. The main
|
|
108
|
+
> difference is how you'll update axm later — pick the update path that
|
|
109
|
+
> matches how you manage other tools.
|
|
110
|
+
>
|
|
111
|
+
> 1. **Install script** (recommended) — Updates via `axm upgrade`
|
|
112
|
+
> (self-managed, independent of any package manager). Standalone binary
|
|
113
|
+
> installed to `~/.axm/bin` (macOS/Linux) or `%LOCALAPPDATA%\axm`
|
|
114
|
+
> (Windows). No extra tools required.
|
|
115
|
+
> 2. **Homebrew** — Updates via `brew upgrade agentxm/tap/axm`, alongside
|
|
116
|
+
> your other brew packages. Choose this if you already manage most CLIs
|
|
117
|
+
> with brew.
|
|
118
|
+
> 3. **npm** — Updates via `npm update -g axm.sh`, alongside your other
|
|
119
|
+
> global npm packages. Choose this if axm is part of a Node.js-heavy
|
|
120
|
+
> environment. Requires Node.js.
|
|
121
|
+
|
|
122
|
+
Wait for the user's response before continuing. Then run the corresponding
|
|
123
|
+
option below.
|
|
124
|
+
|
|
125
|
+
## Install
|
|
126
|
+
|
|
127
|
+
Each option below installs a persistent `axm` binary on the machine. Run the
|
|
128
|
+
option selected in **Choose install method**.
|
|
25
129
|
|
|
26
130
|
### Option A: macOS / Linux (install script)
|
|
27
131
|
|
|
@@ -74,67 +178,155 @@ PATH:
|
|
|
74
178
|
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
75
179
|
```
|
|
76
180
|
|
|
77
|
-
|
|
181
|
+
## Verify
|
|
78
182
|
|
|
79
183
|
```bash
|
|
80
184
|
axm --version
|
|
81
185
|
# Expected: X.Y.Z
|
|
82
186
|
```
|
|
83
187
|
|
|
84
|
-
|
|
188
|
+
---
|
|
85
189
|
|
|
86
|
-
|
|
190
|
+
EXECUTE NOW: Run `axm --version`. If it succeeds, run `axm upgrade`. If it
|
|
191
|
+
fails, detect available package managers per **Choose install method**, ask
|
|
192
|
+
the user if more than one is available, and run the chosen installer. Stop
|
|
193
|
+
when `axm --version` succeeds, then proceed to **Check sign-in state**.
|
|
87
194
|
|
|
88
|
-
|
|
195
|
+
---
|
|
89
196
|
|
|
90
|
-
|
|
91
|
-
export AXM_TOKEN=<your-token>
|
|
92
|
-
```
|
|
197
|
+
## Check sign-in state
|
|
93
198
|
|
|
94
|
-
|
|
95
|
-
|
|
199
|
+
axm is installed. Before continuing, detect whether this machine is already
|
|
200
|
+
signed in to AgentXM.ai — the result decides whether to ask the user about
|
|
201
|
+
signing in or skip straight to workspace setup.
|
|
96
202
|
|
|
97
203
|
```bash
|
|
98
|
-
|
|
204
|
+
axm whoami --json
|
|
99
205
|
```
|
|
100
206
|
|
|
101
|
-
|
|
207
|
+
- **Exit 0 with an identity** → already signed in. Skip to **Workspace setup**.
|
|
208
|
+
- **Exit non-zero** (for example, error code `AUTH_LOGIN_REQUIRED`) → not
|
|
209
|
+
signed in. Continue to **Ask the user what to do next**.
|
|
102
210
|
|
|
103
|
-
|
|
104
|
-
axm auth login
|
|
105
|
-
```
|
|
211
|
+
## Ask the user what to do next
|
|
106
212
|
|
|
107
|
-
|
|
213
|
+
This machine is not signed in to AgentXM.ai.
|
|
108
214
|
|
|
109
|
-
|
|
215
|
+
Before asking, tell the user why the choice matters: signing in is only
|
|
216
|
+
needed to publish extensions or install private extensions, so the workspace
|
|
217
|
+
can still be set up without it. The choice is about whether to do that
|
|
218
|
+
sign-in now or defer it.
|
|
110
219
|
|
|
111
|
-
|
|
112
|
-
axm whoami
|
|
113
|
-
# Expected: displays your handle and account
|
|
114
|
-
```
|
|
220
|
+
**STOP HERE AND ASK THE USER:**
|
|
115
221
|
|
|
116
|
-
|
|
222
|
+
> axm is installed. Before setting up the project workspace, would you like
|
|
223
|
+
> to sign in to AgentXM.ai? Signing in is only needed if you plan to
|
|
224
|
+
> publish extensions or install private extensions — public extensions
|
|
225
|
+
> install without an account.
|
|
226
|
+
>
|
|
227
|
+
> 1. **Sign up or log in to AgentXM.ai** (recommended if you plan to
|
|
228
|
+
> publish extensions or install private extensions)
|
|
229
|
+
> 2. **Proceed to setting up your project workspace** (you can sign in
|
|
230
|
+
> later with `axm login`)
|
|
117
231
|
|
|
118
|
-
|
|
119
|
-
|
|
232
|
+
Wait for the user's response before continuing.
|
|
233
|
+
|
|
234
|
+
- **Option 1** → continue with **Sign up or log in to AgentXM.ai** below,
|
|
235
|
+
then **Workspace setup**.
|
|
236
|
+
- **Option 2** → skip to **Workspace setup**.
|
|
120
237
|
|
|
121
238
|
---
|
|
122
239
|
|
|
123
|
-
##
|
|
240
|
+
## Sign up or log in to AgentXM.ai
|
|
241
|
+
|
|
242
|
+
AgentXM.ai is the extension registry that axm connects to. Accounts live on
|
|
243
|
+
AgentXM.ai, not in the CLI — `axm login` signs this machine in to an
|
|
244
|
+
AgentXM.ai account.
|
|
245
|
+
|
|
246
|
+
### If the user does not have an AgentXM.ai account
|
|
247
|
+
|
|
248
|
+
You cannot create an account for the user. Hand off:
|
|
124
249
|
|
|
125
|
-
|
|
250
|
+
1. Tell the user to open https://agentxm.ai/signup and create an account —
|
|
251
|
+
explain that this sets up the AgentXM.ai account that `axm login` will
|
|
252
|
+
later authenticate against, and that axm can't create the account
|
|
253
|
+
because signup happens through the web.
|
|
254
|
+
2. Wait for the user to confirm signup is complete.
|
|
255
|
+
3. Continue to **Log in** below.
|
|
256
|
+
|
|
257
|
+
### Log in
|
|
258
|
+
|
|
259
|
+
Explain to the user what logging in will do before handing off: it proves
|
|
260
|
+
to AgentXM.ai that this machine belongs to their account, and stores a
|
|
261
|
+
local token so subsequent `axm` commands can reach the registry.
|
|
262
|
+
|
|
263
|
+
Offer both paths and let the user pick:
|
|
264
|
+
|
|
265
|
+
- **Interactive (recommended):** ask the user to run `axm login` in their
|
|
266
|
+
terminal. Tell them this opens a browser for a one-time OAuth device
|
|
267
|
+
flow; axm can't run it on their behalf because the browser step requires
|
|
268
|
+
them to be present.
|
|
269
|
+
- **Non-interactive:** ask the user to export `AXM_TOKEN` in the
|
|
270
|
+
environment where axm will run. Explain that `AXM_TOKEN` is a
|
|
271
|
+
pre-generated credential that skips the browser step; you must not
|
|
272
|
+
paste a token the user has not shared with you.
|
|
273
|
+
|
|
274
|
+
Wait for the user to confirm sign-in is complete. Tell them you're about to
|
|
275
|
+
re-run `axm whoami --json` to verify the sign-in succeeded before moving
|
|
276
|
+
on:
|
|
126
277
|
|
|
127
278
|
```bash
|
|
128
|
-
|
|
129
|
-
|
|
279
|
+
axm whoami --json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
If it returns an identity, continue to **Workspace setup**. If not, the
|
|
283
|
+
sign-in did not complete — explain which check failed and ask the user to
|
|
284
|
+
retry the same path or switch paths.
|
|
285
|
+
|
|
286
|
+
---
|
|
130
287
|
|
|
131
|
-
|
|
132
|
-
axm skills install @acme/skills/code-review --yes --non-interactive
|
|
288
|
+
## Workspace setup
|
|
133
289
|
|
|
134
|
-
|
|
135
|
-
axm
|
|
290
|
+
Before running the command, tell the user what it will do to their project:
|
|
291
|
+
create `.axm/` configuration files, install default extensions (including
|
|
292
|
+
`@agentxm/skills/axm`), and register agent discovery symlinks in the
|
|
293
|
+
current working directory.
|
|
294
|
+
|
|
295
|
+
Run:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
axm setup --yes
|
|
136
299
|
```
|
|
137
300
|
|
|
301
|
+
Once it succeeds, consult the installed `@agentxm/skills/axm` skill for
|
|
302
|
+
day-to-day operations — workspace scenarios (greenfield, brownfield,
|
|
303
|
+
unmanaged skills), extension management, and publishing.
|
|
304
|
+
|
|
305
|
+
## Invariants
|
|
306
|
+
|
|
307
|
+
- **Explain why you're asking.** Whenever you need the user's consent, input,
|
|
308
|
+
or out-of-band action — picking an install method, running `axm login`,
|
|
309
|
+
opening a signup URL, approving a command you'd otherwise run yourself —
|
|
310
|
+
state the purpose first: what you're about to do, why it's needed for
|
|
311
|
+
this install, and what the user should do next. No yes/no prompts without
|
|
312
|
+
context; no command handoffs without explaining the effect.
|
|
313
|
+
- **Never** run `axm login` without explicit user consent. The device flow
|
|
314
|
+
opens a browser and requires the user to be present. When requesting
|
|
315
|
+
consent, tell the user that `axm login` will open a browser, complete an
|
|
316
|
+
OAuth device flow with AgentXM.ai, and store a local token so axm can
|
|
317
|
+
talk to the registry on their behalf.
|
|
318
|
+
- **Never** set or paste an `AXM_TOKEN` the user has not shared. If the
|
|
319
|
+
user is providing a token, explain that it authenticates the CLI against
|
|
320
|
+
the user's AgentXM.ai account for the current shell session.
|
|
321
|
+
- **Always** re-run `axm whoami` after any user-driven sign-in step before
|
|
322
|
+
running `axm setup`. Tell the user you're verifying the sign-in succeeded
|
|
323
|
+
before moving on.
|
|
324
|
+
- **Resume, do not restart.** If the user completes sign-in out-of-band and
|
|
325
|
+
returns, skip to **Workspace setup** — do not re-ask which option they
|
|
326
|
+
picked.
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
138
330
|
## Troubleshooting
|
|
139
331
|
|
|
140
332
|
**`axm: command not found`**
|
|
@@ -157,26 +349,3 @@ The fix depends on how you installed:
|
|
|
157
349
|
```bash
|
|
158
350
|
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
159
351
|
```
|
|
160
|
-
|
|
161
|
-
**Not authenticated / `AUTH_LOGIN_REQUIRED`**
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
axm auth login
|
|
165
|
-
# Or for non-interactive: export AXM_TOKEN=<token>
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Wrong account**
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
axm auth logout && axm auth login
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**Registry unreachable**
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
# Check connectivity to the default registry
|
|
178
|
-
curl -sf https://registry.agentxm.ai/v1/health || echo "Registry unreachable"
|
|
179
|
-
# Or override the built-in default source for development/testing:
|
|
180
|
-
export AXM_REGISTRY_LOCATION=http://localhost:4300
|
|
181
|
-
# AXM_REGISTRY_LOCATION may also be a file path or file:// URL
|
|
182
|
-
```
|