@agentxm/client-core 0.6.0 → 0.7.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/dist/src/unstable/auth/auth-client.d.ts +17 -3
- package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
- package/dist/src/unstable/auth/auth-client.js +127 -58
- package/dist/src/unstable/auth/auth-client.js.map +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts +5 -4
- package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
- package/dist/src/unstable/auth/credential-store.js +115 -9
- package/dist/src/unstable/auth/credential-store.js.map +1 -1
- package/dist/src/unstable/auth/device-login.d.ts +4 -1
- package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
- package/dist/src/unstable/auth/device-login.js +13 -15
- package/dist/src/unstable/auth/device-login.js.map +1 -1
- package/dist/src/unstable/auth/index.d.ts +4 -1
- package/dist/src/unstable/auth/index.d.ts.map +1 -1
- package/dist/src/unstable/auth/index.js +3 -0
- package/dist/src/unstable/auth/index.js.map +1 -1
- package/dist/src/unstable/auth/login-strategy.d.ts +21 -0
- package/dist/src/unstable/auth/login-strategy.d.ts.map +1 -0
- package/dist/src/unstable/auth/login-strategy.js +25 -0
- package/dist/src/unstable/auth/login-strategy.js.map +1 -0
- package/dist/src/unstable/auth/loopback-login.d.ts +16 -0
- package/dist/src/unstable/auth/loopback-login.d.ts.map +1 -0
- package/dist/src/unstable/auth/loopback-login.js +86 -0
- package/dist/src/unstable/auth/loopback-login.js.map +1 -0
- package/dist/src/unstable/auth/loopback-server.d.ts +36 -0
- package/dist/src/unstable/auth/loopback-server.d.ts.map +1 -0
- package/dist/src/unstable/auth/loopback-server.js +136 -0
- package/dist/src/unstable/auth/loopback-server.js.map +1 -0
- package/dist/src/unstable/commands/operations/publish.js +1 -1
- package/dist/src/unstable/commands/operations/publish.js.map +1 -1
- package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
- package/dist/src/unstable/install-meta/install-meta.js +1 -1
- package/dist/src/unstable/install-method/install-method.d.ts +1 -4
- package/dist/src/unstable/install-method/install-method.d.ts.map +1 -1
- package/dist/src/unstable/install-method/install-method.js +29 -24
- package/dist/src/unstable/install-method/install-method.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.js +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.js.map +1 -1
- package/dist/src/unstable/packs/operations/publish.js +1 -1
- package/dist/src/unstable/packs/operations/publish.js.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts +170 -96
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.js +152 -64
- package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
- package/dist/src/unstable/settings/schema.d.ts.map +1 -1
- package/dist/src/unstable/settings/schema.js +39 -34
- package/dist/src/unstable/settings/schema.js.map +1 -1
- package/dist/src/unstable/skills/operations/publish.js +1 -1
- package/dist/src/unstable/skills/operations/publish.js.map +1 -1
- package/dist/src/unstable/subagents/operations/publish.js +1 -1
- package/dist/src/unstable/subagents/operations/publish.js.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +3 -0
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +1 -0
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
- package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/client.js +9 -1
- package/dist/src/unstable/telemetry/client.js.map +1 -1
- package/dist/src/unstable/update-check/update-check.d.ts.map +1 -1
- package/dist/src/unstable/update-check/update-check.js +1 -11
- package/dist/src/unstable/update-check/update-check.js.map +1 -1
- package/dist/src/unstable/utils/build-zip-archive.d.ts +8 -7
- package/dist/src/unstable/utils/build-zip-archive.d.ts.map +1 -1
- package/dist/src/unstable/utils/build-zip-archive.js +42 -52
- package/dist/src/unstable/utils/build-zip-archive.js.map +1 -1
- package/dist/src/unstable/utils/environment.d.ts +3 -3
- package/dist/src/unstable/utils/environment.d.ts.map +1 -1
- package/dist/src/unstable/utils/environment.js +7 -9
- package/dist/src/unstable/utils/environment.js.map +1 -1
- package/package.json +5 -2
- package/site-content/__generated__/schemas/settings.schema.json +36 -39
- package/site-content/docs/quickstart.md +8 -5
- package/site-content/install.cmd +2 -2
- package/site-content/install.md +122 -285
- package/site-content/install.ps1 +2 -2
package/site-content/install.md
CHANGED
|
@@ -1,363 +1,200 @@
|
|
|
1
1
|
# Install AXM
|
|
2
2
|
|
|
3
|
-
**DONE WHEN:** `axm --version` succeeds and (if the user chose workspace
|
|
4
|
-
`axm setup` has completed.
|
|
3
|
+
**DONE WHEN:** `axm --version` succeeds and (if the user chose workspace
|
|
4
|
+
setup) `axm setup` has completed.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## TODO
|
|
9
|
-
|
|
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 sign in to AgentXM.ai or proceed
|
|
18
|
-
to workspace setup; on the sign-in choice, hand off signup/login and
|
|
19
|
-
re-check `axm whoami`
|
|
20
|
-
- [ ] Run `axm setup --yes` to initialize the project workspace
|
|
21
|
-
- [ ] Load pre-req help topics: `axm help getting-started` and
|
|
22
|
-
`axm help basic-usage`
|
|
6
|
+
## Flow
|
|
23
7
|
|
|
24
|
-
|
|
8
|
+
1. Probe for existing install → upgrade or install.
|
|
9
|
+
2. Verify `axm --version`.
|
|
10
|
+
3. Probe sign-in → ask the user → optionally hand off `axm login`.
|
|
11
|
+
4. Run `axm setup --yes`.
|
|
12
|
+
5. Read `.axm/extensions/@agentxm/skills/axm/src/SKILL.md`, then load
|
|
13
|
+
`axm help getting-started` and `axm help basic-usage`.
|
|
25
14
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
AXM (Agent eXtension Manager) is the open extension manager for AI coding
|
|
29
|
-
agents — discover, install, publish, and manage skills, commands, subagents,
|
|
30
|
-
MCP servers, and packs from a single CLI.
|
|
31
|
-
[AgentXM.ai](https://agentxm.ai) is the extension registry AXM connects to.
|
|
32
|
-
An AgentXM.ai account is only required for publishing extensions or
|
|
33
|
-
installing private extensions; public extensions install without an account.
|
|
15
|
+
## Invariants
|
|
34
16
|
|
|
35
|
-
|
|
17
|
+
- **Probes exit 0.** `axm --version` and `axm whoami --json` have expected
|
|
18
|
+
non-zero exit paths ("not installed", "not signed in") that are part of
|
|
19
|
+
the flow. Always invoke them via the wrappers below and branch on stdout,
|
|
20
|
+
not the exit code.
|
|
21
|
+
- **Explain before asking.** Every stop-and-ask and command handoff states
|
|
22
|
+
what it does, why it's needed, and what the user should do next. Bare
|
|
23
|
+
yes/no prompts are non-conforming.
|
|
24
|
+
- **Guide sign-in, do not execute it.** Never run `axm login` without
|
|
25
|
+
explicit consent; never paste an `AXM_TOKEN` the user has not shared.
|
|
26
|
+
- **Resume, do not restart.** If the user completes sign-in out-of-band,
|
|
27
|
+
skip to **Workspace setup** — do not re-ask which option they picked.
|
|
28
|
+
- **Option 2 (defer sign-in) is legitimate, not a fallback.** Do not
|
|
29
|
+
re-prompt later in the flow.
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
it so the shell exits 0 on either branch and the signal lives in stdout
|
|
39
|
-
(see **Probe commands** under Invariants):
|
|
31
|
+
---
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
## 1. Detect existing install
|
|
42
34
|
|
|
43
35
|
```bash
|
|
36
|
+
# macOS / Linux
|
|
44
37
|
command -v axm >/dev/null 2>&1 && axm --version || echo "NOT_INSTALLED"
|
|
45
38
|
```
|
|
46
39
|
|
|
47
|
-
On Windows (PowerShell):
|
|
48
|
-
|
|
49
40
|
```powershell
|
|
41
|
+
# Windows (PowerShell)
|
|
50
42
|
if (Get-Command axm -ErrorAction SilentlyContinue) { axm --version } else { "NOT_INSTALLED" }
|
|
51
43
|
```
|
|
52
44
|
|
|
53
|
-
Branch on
|
|
54
|
-
|
|
55
|
-
- **Prints `X.Y.Z`** → AXM is installed. Upgrade and skip the Install section:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
axm upgrade
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`axm upgrade` auto-detects the install method and either swaps the binary
|
|
62
|
-
in place (script installs) or prints the right `brew`/`npm` command to
|
|
63
|
-
run. If it prints a command, run it and re-run the probe above. Continue
|
|
64
|
-
to **Verify** when done.
|
|
65
|
-
|
|
66
|
-
- **Prints `NOT_INSTALLED`** → AXM is not installed. Continue to **Install**.
|
|
67
|
-
- **Prints anything else** → treat as not installed and reinstall via the
|
|
68
|
-
Install section.
|
|
69
|
-
|
|
70
|
-
## Choose install method
|
|
71
|
-
|
|
72
|
-
AXM can be installed via a standalone binary script, Homebrew, or npm. Pick
|
|
73
|
-
based on what's already on the machine — don't install a new package manager
|
|
74
|
-
just to install AXM.
|
|
75
|
-
|
|
76
|
-
### 1. Detect available package managers
|
|
77
|
-
|
|
78
|
-
A manager is "available" if `--version` exits successfully.
|
|
79
|
-
|
|
80
|
-
On macOS / Linux:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
brew --version >/dev/null 2>&1 && echo "brew: available"
|
|
84
|
-
npm --version >/dev/null 2>&1 && echo "npm: available"
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
On Windows (PowerShell):
|
|
88
|
-
|
|
89
|
-
```powershell
|
|
90
|
-
if (Get-Command brew -ErrorAction SilentlyContinue) { "brew: available" }
|
|
91
|
-
if (Get-Command npm -ErrorAction SilentlyContinue) { "npm: available" }
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### 2. Pick the method
|
|
95
|
-
|
|
96
|
-
Use this decision table — same logic on every platform:
|
|
97
|
-
|
|
98
|
-
| Detected managers | Chosen method |
|
|
99
|
-
| ------------------------------ | ------------------------------------------------------------- |
|
|
100
|
-
| Neither | Install script (Option A on macOS/Linux, Option B on Windows) |
|
|
101
|
-
| Homebrew only | Homebrew (Option D) |
|
|
102
|
-
| npm only | npm (Option E) |
|
|
103
|
-
| Homebrew and npm (two or more) | **STOP AND ASK** the user — see the prompt below |
|
|
104
|
-
|
|
105
|
-
The install script is always a valid fallback. If a package-manager install
|
|
106
|
-
fails, retry with Option A or B.
|
|
107
|
-
|
|
108
|
-
### 3. Ask the user when multiple managers are available
|
|
109
|
-
|
|
110
|
-
All three options install the same `axm` binary. **The main difference is how
|
|
111
|
-
you'll update it later.** Frame the choice that way when asking.
|
|
112
|
-
|
|
113
|
-
**STOP HERE AND ASK THE USER:**
|
|
114
|
-
|
|
115
|
-
> Multiple install methods are available on this machine. The main
|
|
116
|
-
> difference is how you'll update AXM later — pick the update path that
|
|
117
|
-
> matches how you manage other tools.
|
|
118
|
-
>
|
|
119
|
-
> 1. **Install script** (recommended) — Updates via `axm upgrade`
|
|
120
|
-
> (self-managed, independent of any package manager). Standalone binary
|
|
121
|
-
> installed to `~/.axm/bin` (macOS/Linux) or `%LOCALAPPDATA%\axm`
|
|
122
|
-
> (Windows). No extra tools required.
|
|
123
|
-
> 2. **Homebrew** — Updates via `brew upgrade agentxm/tap/axm`, alongside
|
|
124
|
-
> your other brew packages. Choose this if you already manage most CLIs
|
|
125
|
-
> with brew.
|
|
126
|
-
> 3. **npm** — Updates via `npm update -g axm.sh`, alongside your other
|
|
127
|
-
> global npm packages. Choose this if AXM is part of a Node.js-heavy
|
|
128
|
-
> environment. Requires Node.js.
|
|
129
|
-
|
|
130
|
-
Wait for the user's response before continuing. Then run the corresponding
|
|
131
|
-
option below.
|
|
132
|
-
|
|
133
|
-
## Install
|
|
134
|
-
|
|
135
|
-
Each option below installs a persistent `axm` binary on the machine. Run the
|
|
136
|
-
option selected in **Choose install method**.
|
|
137
|
-
|
|
138
|
-
If `axm` is not found after any install option, see **Troubleshooting**.
|
|
139
|
-
|
|
140
|
-
### Option A: macOS / Linux (install script)
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
curl -fsSL https://axm.sh/install.sh | sh
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Installs to `~/.axm/bin/axm`.
|
|
45
|
+
Branch on stdout:
|
|
147
46
|
|
|
148
|
-
|
|
47
|
+
- **`X.Y.Z`** → installed. Run `axm upgrade` (auto-detects the install
|
|
48
|
+
method and upgrades script, Homebrew, and npm installs). Skip to **§3**.
|
|
49
|
+
- **`NOT_INSTALLED`** or anything else → continue to **§2**.
|
|
149
50
|
|
|
150
|
-
|
|
151
|
-
irm https://axm.sh/install.ps1 | iex
|
|
152
|
-
```
|
|
51
|
+
## 2. Install
|
|
153
52
|
|
|
154
|
-
|
|
53
|
+
### Choose the method
|
|
155
54
|
|
|
156
|
-
|
|
55
|
+
A manager is "available" if its `--version` exits 0 (`brew --version`,
|
|
56
|
+
`npm --version`; PowerShell: `Get-Command brew|npm`). Don't install a new
|
|
57
|
+
package manager just to install AXM.
|
|
157
58
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
59
|
+
| Detected | Method |
|
|
60
|
+
| ----------------- | ----------------------------------------------- |
|
|
61
|
+
| Neither | Install script (A on macOS/Linux, B on Windows) |
|
|
62
|
+
| Homebrew only | Homebrew (D) |
|
|
63
|
+
| npm only | npm (E) |
|
|
64
|
+
| Both brew and npm | **Ask the user** (see below) |
|
|
161
65
|
|
|
162
|
-
|
|
66
|
+
The install script is always a valid fallback if a package-manager install
|
|
67
|
+
fails.
|
|
163
68
|
|
|
164
|
-
###
|
|
69
|
+
### Ask when multiple managers are available
|
|
165
70
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
```
|
|
71
|
+
All three install the same `axm` binary; **the difference is how you update
|
|
72
|
+
it later.** Frame the choice that way, then ask the user to pick one:
|
|
169
73
|
|
|
170
|
-
|
|
74
|
+
1. **Install script** (recommended) — self-managed via `axm upgrade`,
|
|
75
|
+
independent of any package manager. Installs to `~/.axm/bin`
|
|
76
|
+
(macOS/Linux) or `%USERPROFILE%\.axm\bin` (Windows).
|
|
77
|
+
2. **Homebrew** — `brew upgrade agentxm/tap/axm`, alongside other brew
|
|
78
|
+
packages. Pick this if most CLIs are managed with brew.
|
|
79
|
+
3. **npm** — `npm install -g axm.sh`, alongside other global npm packages.
|
|
80
|
+
Pick this if AXM is part of a Node.js-heavy environment. Requires Node.js.
|
|
171
81
|
|
|
172
|
-
|
|
82
|
+
Wait for the user's choice before running an installer.
|
|
173
83
|
|
|
174
|
-
|
|
175
|
-
npm install -g axm.sh
|
|
176
|
-
```
|
|
84
|
+
### Run the installer
|
|
177
85
|
|
|
178
|
-
|
|
86
|
+
| Option | Platform | Command |
|
|
87
|
+
| ------ | ------------- | --------------------------------------------------------------------- |
|
|
88
|
+
| A | macOS / Linux | `curl -fsSL https://axm.sh/install.sh \| sh` |
|
|
89
|
+
| B | Windows (PS) | `irm https://axm.sh/install.ps1 \| iex` |
|
|
90
|
+
| C | Windows (CMD) | `curl -fsSL -o install.cmd https://axm.sh/install.cmd && install.cmd` |
|
|
91
|
+
| D | Homebrew | `brew install agentxm/tap/axm` |
|
|
92
|
+
| E | npm (any OS) | `npm install -g axm.sh` |
|
|
179
93
|
|
|
180
|
-
|
|
181
|
-
axm
|
|
182
|
-
# Expected: X.Y.Z
|
|
183
|
-
```
|
|
94
|
+
Install locations: `~/.axm/bin/axm` (script, macOS/Linux);
|
|
95
|
+
`%USERPROFILE%\.axm\bin\axm.exe` (script, Windows).
|
|
184
96
|
|
|
185
|
-
|
|
97
|
+
### Verify
|
|
186
98
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
is `X.Y.Z`, run `axm upgrade`. If the output is `NOT_INSTALLED`, detect
|
|
190
|
-
available package managers per **Choose install method**, ask the user if
|
|
191
|
-
more than one is available, and run the chosen installer. Stop when the
|
|
192
|
-
probe prints `X.Y.Z`, then proceed to **Check sign-in state**.
|
|
99
|
+
Re-run the probe from **§1**. Expect `X.Y.Z`. If `axm` is not found, see
|
|
100
|
+
**Troubleshooting**.
|
|
193
101
|
|
|
194
102
|
---
|
|
195
103
|
|
|
196
|
-
## Check sign-in state
|
|
197
|
-
|
|
198
|
-
Detect whether this machine is signed in to AgentXM.ai — the result decides
|
|
199
|
-
whether to ask the user about signing in or skip to workspace setup. Like
|
|
200
|
-
**Detect existing install**, this is a **probe** — invoke it so the shell
|
|
201
|
-
exits 0 on either branch and the signal lives in stdout:
|
|
202
|
-
|
|
203
|
-
On macOS / Linux:
|
|
104
|
+
## 3. Check sign-in state
|
|
204
105
|
|
|
205
106
|
```bash
|
|
107
|
+
# macOS / Linux
|
|
206
108
|
axm whoami --json 2>/dev/null || echo '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}'
|
|
207
109
|
```
|
|
208
110
|
|
|
209
|
-
On Windows (PowerShell):
|
|
210
|
-
|
|
211
111
|
```powershell
|
|
112
|
+
# Windows (PowerShell)
|
|
212
113
|
try { axm whoami --json } catch { '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}' }
|
|
213
114
|
```
|
|
214
115
|
|
|
215
|
-
Branch on the JSON `type` field
|
|
116
|
+
Branch on the JSON `type` field:
|
|
216
117
|
|
|
217
|
-
-
|
|
218
|
-
|
|
219
|
-
- **`type` is `"error"`** (typically with `code` = `AUTH_LOGIN_REQUIRED`) →
|
|
220
|
-
not signed in. Continue to **Ask the user what to do next**.
|
|
118
|
+
- **Not `"error"`** (identity payload) → signed in. Skip to **§5**.
|
|
119
|
+
- **`"error"`** (typically `code` = `AUTH_LOGIN_REQUIRED`) → continue to **§4**.
|
|
221
120
|
|
|
222
|
-
## Ask the user
|
|
121
|
+
## 4. Ask the user about sign-in
|
|
223
122
|
|
|
224
|
-
|
|
123
|
+
Tell the user _why_ the choice matters: signing in is only needed to publish
|
|
124
|
+
extensions or install private extensions; the workspace can still be set up
|
|
125
|
+
without it. Then ask them to pick:
|
|
225
126
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
sign-in now or defer it.
|
|
127
|
+
1. **Sign up or log in to AgentXM.ai** (recommended if publishing or
|
|
128
|
+
installing private extensions).
|
|
129
|
+
2. **Proceed to workspace setup** (can sign in later with `axm login`).
|
|
230
130
|
|
|
231
|
-
**Do not run `axm login`, `axm setup`, or any
|
|
232
|
-
|
|
131
|
+
**Do not run `axm login`, `axm setup`, or any signed-in command until the
|
|
132
|
+
user has picked.** Wait for the response, then:
|
|
233
133
|
|
|
234
|
-
**
|
|
134
|
+
- Option 1 → continue with **Sign in** below, then **§5**.
|
|
135
|
+
- Option 2 → skip to **§5**.
|
|
235
136
|
|
|
236
|
-
|
|
237
|
-
> to sign in to AgentXM.ai? Signing in is only needed if you plan to
|
|
238
|
-
> publish extensions or install private extensions — public extensions
|
|
239
|
-
> install without an account.
|
|
240
|
-
>
|
|
241
|
-
> 1. **Sign up or log in to AgentXM.ai** (recommended if you plan to
|
|
242
|
-
> publish extensions or install private extensions)
|
|
243
|
-
> 2. **Proceed to setting up your project workspace** (you can sign in
|
|
244
|
-
> later with `axm login`)
|
|
137
|
+
### Sign in
|
|
245
138
|
|
|
246
|
-
|
|
139
|
+
If the user has no AgentXM.ai account, point them to
|
|
140
|
+
https://agentxm.ai/signup — explain that signup happens through the web and
|
|
141
|
+
AXM can't create the account on their behalf. Wait for confirmation, then
|
|
142
|
+
continue.
|
|
247
143
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
---
|
|
253
|
-
|
|
254
|
-
## Sign up or log in to AgentXM.ai
|
|
255
|
-
|
|
256
|
-
`axm login` signs this machine in to an AgentXM.ai account.
|
|
257
|
-
|
|
258
|
-
### If the user does not have an AgentXM.ai account
|
|
259
|
-
|
|
260
|
-
You cannot create an account for the user. Hand off:
|
|
261
|
-
|
|
262
|
-
1. Tell the user to open https://agentxm.ai/signup and create an account —
|
|
263
|
-
explain that this sets up the AgentXM.ai account that `axm login` will
|
|
264
|
-
later authenticate against, and that AXM can't create the account
|
|
265
|
-
because signup happens through the web.
|
|
266
|
-
2. Wait for the user to confirm signup is complete.
|
|
267
|
-
3. Continue to **Log in** below.
|
|
268
|
-
|
|
269
|
-
### Log in
|
|
270
|
-
|
|
271
|
-
Explain to the user what logging in will do before handing off: it proves
|
|
272
|
-
to AgentXM.ai that this machine belongs to their account, and stores a
|
|
273
|
-
local token so subsequent `axm` commands can reach the registry.
|
|
274
|
-
|
|
275
|
-
Offer both paths and let the user pick:
|
|
144
|
+
Before handing off `axm login`, explain what it does: it proves the machine
|
|
145
|
+
belongs to their account and stores a local token so subsequent `axm`
|
|
146
|
+
commands can reach the registry. Offer both paths:
|
|
276
147
|
|
|
277
148
|
- **Interactive (recommended):** ask the user to run `axm login` in their
|
|
278
|
-
terminal.
|
|
279
|
-
|
|
280
|
-
|
|
149
|
+
terminal. It opens a browser for a one-time authorization flow; AXM can't
|
|
150
|
+
run it on their behalf because the browser step requires the user. In
|
|
151
|
+
SSH/CI/Codespaces or with `--device-code`, AXM falls back to a five-minute
|
|
152
|
+
device-code flow.
|
|
281
153
|
- **Non-interactive:** ask the user to export `AXM_TOKEN` in the
|
|
282
|
-
environment where AXM will run.
|
|
283
|
-
|
|
284
|
-
|
|
154
|
+
environment where AXM will run. `AXM_TOKEN` is a pre-generated credential
|
|
155
|
+
that skips the browser step; never paste a token the user has not shared
|
|
156
|
+
with you.
|
|
285
157
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
is not `"error"`, continue to **Workspace setup**. If `type` is `"error"`,
|
|
289
|
-
the sign-in did not complete — ask the user to retry the same path or
|
|
290
|
-
switch paths.
|
|
158
|
+
After the user confirms, re-run the probe from **§3**. If `type` is still
|
|
159
|
+
`"error"`, ask them to retry the same path or switch paths.
|
|
291
160
|
|
|
292
161
|
---
|
|
293
162
|
|
|
294
|
-
## Workspace setup
|
|
295
|
-
|
|
296
|
-
Before running the command, tell the user what it will do to their project:
|
|
297
|
-
create `.axm/` configuration files, install default extensions (including
|
|
298
|
-
`@agentxm/skills/axm`), and register agent discovery symlinks in the
|
|
299
|
-
current working directory.
|
|
163
|
+
## 5. Workspace setup
|
|
300
164
|
|
|
301
|
-
|
|
165
|
+
Before running, tell the user `axm setup` will: create `.axm/` configuration
|
|
166
|
+
files in the current directory, install default extensions (including
|
|
167
|
+
`@agentxm/skills/axm`), and register agent discovery symlinks.
|
|
302
168
|
|
|
303
169
|
```bash
|
|
304
170
|
axm setup --yes
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
Once it succeeds, load the two pre-req help topics before doing any other
|
|
308
|
-
AXM work in this session — they cover what `axm setup` produced and the
|
|
309
|
-
files an agent must understand before changing workspace state:
|
|
310
|
-
|
|
311
|
-
```bash
|
|
171
|
+
cat .axm/extensions/@agentxm/skills/axm/src/SKILL.md
|
|
312
172
|
axm help getting-started
|
|
313
173
|
axm help basic-usage
|
|
314
174
|
```
|
|
315
175
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
covers the key workspace files (`.axm/settings.json`, `axm-lock.yaml`,
|
|
319
|
-
`.axm/extensions/`), the commit policy (`.axm/` and `axm-lock.yaml` must
|
|
320
|
-
be checked in, not gitignored), and how to act safely in an existing
|
|
321
|
-
workspace.
|
|
176
|
+
After setup, read the installed AXM skill and both help topics before doing
|
|
177
|
+
any other AXM work in this session:
|
|
322
178
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
brownfield, unmanaged skills), extension management, and publishing.
|
|
326
|
-
|
|
327
|
-
## Invariants
|
|
179
|
+
- **`.axm/extensions/@agentxm/skills/axm/src/SKILL.md`** — agent rules for
|
|
180
|
+
safe AXM CLI use, permissions, output modes, and day-to-day operations.
|
|
328
181
|
|
|
329
|
-
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
consent request states what the action does, why it's needed, and what
|
|
336
|
-
the user should do next. Bare yes/no prompts and bare command handoffs
|
|
337
|
-
are non-conforming.
|
|
338
|
-
- **Guide sign-in, do not execute sign-in.** Never run `axm login` without
|
|
339
|
-
explicit user consent; never set or paste an `AXM_TOKEN` the user has
|
|
340
|
-
not shared. The device flow requires the user's browser; the token is
|
|
341
|
-
the user's credential.
|
|
342
|
-
- **Always** re-run the `axm whoami --json` probe after any user-driven
|
|
343
|
-
sign-in step before running `axm setup`.
|
|
344
|
-
- **Option 2 is legitimate, not a fallback.** If the user chose to defer
|
|
345
|
-
sign-in, do not re-prompt later in the flow. Signing in is deferred,
|
|
346
|
-
not required.
|
|
347
|
-
- **Resume, do not restart.** If the user completes sign-in out-of-band and
|
|
348
|
-
returns, skip to **Workspace setup** — do not re-ask which option they
|
|
349
|
-
picked.
|
|
182
|
+
- **`getting-started`** — first-time workspace setup; explains what `axm
|
|
183
|
+
setup` just produced.
|
|
184
|
+
- **`basic-usage`** — the key workspace files (`.axm/settings.json`,
|
|
185
|
+
`axm-lock.yaml`, `.axm/extensions/`), the commit policy (`.axm/` and
|
|
186
|
+
`axm-lock.yaml` must be checked in, not gitignored), and how to act safely
|
|
187
|
+
in an existing workspace.
|
|
350
188
|
|
|
351
189
|
---
|
|
352
190
|
|
|
353
191
|
## Troubleshooting
|
|
354
192
|
|
|
355
|
-
**`axm: command not found`** —
|
|
193
|
+
**`axm: command not found`** — install bin directory is not on PATH:
|
|
356
194
|
|
|
357
|
-
- **
|
|
358
|
-
|
|
359
|
-
- **
|
|
360
|
-
|
|
361
|
-
`$env:Path = "$env:LOCALAPPDATA\axm;$env:Path"`.
|
|
195
|
+
- **Script (macOS/Linux):** `export PATH="$HOME/.axm/bin:$PATH"`; persist in
|
|
196
|
+
`~/.bashrc` / `~/.zshrc`.
|
|
197
|
+
- **Script (Windows):** add `%USERPROFILE%\.axm\bin` to PATH via System
|
|
198
|
+
Environment Variables, or `$env:Path = "$env:USERPROFILE\.axm\bin;$env:Path"`.
|
|
362
199
|
- **Homebrew:** `brew link axm`.
|
|
363
200
|
- **npm:** `export PATH="$(npm config get prefix)/bin:$PATH"`.
|
package/site-content/install.ps1
CHANGED
|
@@ -38,7 +38,7 @@ function Download-Binary {
|
|
|
38
38
|
|
|
39
39
|
$artifact = "axm-windows-${Arch}.exe"
|
|
40
40
|
$downloadUrl = "$BASE_URL/$artifact"
|
|
41
|
-
$installDir = Join-Path $env:
|
|
41
|
+
$installDir = Join-Path $env:USERPROFILE ".axm\bin"
|
|
42
42
|
$target = Join-Path $installDir "axm.exe"
|
|
43
43
|
|
|
44
44
|
Write-Host "Detected platform: windows-$Arch"
|
|
@@ -69,7 +69,7 @@ function Download-Binary {
|
|
|
69
69
|
Write-Host "Installed to $target"
|
|
70
70
|
|
|
71
71
|
# Write install metadata
|
|
72
|
-
$metaFile = Join-Path $installDir "install-meta.json"
|
|
72
|
+
$metaFile = Join-Path (Split-Path $installDir -Parent) "install-meta.json"
|
|
73
73
|
$timestamp = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
|
|
74
74
|
$metaContent = "{`"method`": `"script`", `"installedAt`": `"$timestamp`"}"
|
|
75
75
|
Set-Content -Path $metaFile -Value $metaContent -Encoding UTF8
|