Skip to content

Commit 399b469

Browse files
committed
chore: release cli v0.5.25
1 parent a29a228 commit 399b469

4 files changed

Lines changed: 37 additions & 33 deletions

File tree

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Analytics your AI agent can actually use — track, analyze, experiment, optimiz
99
Try the seeded public demo without signing in:
1010

1111
```bash
12-
npx --yes @agent-analytics/cli@0.5.24 demo
13-
npx --yes @agent-analytics/cli@0.5.24 --demo projects
14-
npx --yes @agent-analytics/cli@0.5.24 --demo funnel agentanalytics-demo --steps "page_view,signup_started,signup"
15-
npx --yes @agent-analytics/cli@0.5.24 --demo experiments list agentanalytics-demo
12+
npx --yes @agent-analytics/cli@0.5.25 demo
13+
npx --yes @agent-analytics/cli@0.5.25 --demo projects
14+
npx --yes @agent-analytics/cli@0.5.25 --demo funnel agentanalytics-demo --steps "page_view,signup_started,signup"
15+
npx --yes @agent-analytics/cli@0.5.25 --demo experiments list agentanalytics-demo
1616
```
1717

1818
Demo mode fetches a short-lived read-only `aas_*` session from the hosted API. It does not expose a raw `aak_*` API key, does not write local CLI config, and blocks mutating commands before making API requests.
@@ -21,19 +21,19 @@ Get the fastest path to useful analytics before installing events:
2121

2222
```bash
2323
# 1. Preview what your agent should track first
24-
npx --yes @agent-analytics/cli@0.5.24 scan https://mysite.com --json
24+
npx --yes @agent-analytics/cli@0.5.25 scan https://mysite.com --json
2525

2626
# 2. Sign in when you want the full instrumentation plan
27-
npx --yes @agent-analytics/cli@0.5.24 login
27+
npx --yes @agent-analytics/cli@0.5.25 login
2828

2929
# 3. Create or identify the project domain
30-
npx --yes @agent-analytics/cli@0.5.24 create my-site --domain https://mysite.com
30+
npx --yes @agent-analytics/cli@0.5.25 create my-site --domain https://mysite.com
3131

3232
# 4. Run the full signed-in analysis for that project domain
33-
npx --yes @agent-analytics/cli@0.5.24 scan https://mysite.com --full --project my-site --json
33+
npx --yes @agent-analytics/cli@0.5.25 scan https://mysite.com --full --project my-site --json
3434

3535
# Or resume and upgrade the anonymous analysis after login
36-
npx --yes @agent-analytics/cli@0.5.24 scan \
36+
npx --yes @agent-analytics/cli@0.5.25 scan \
3737
--resume <analysis_id> \
3838
--resume-token <resume_token> \
3939
--full \
@@ -45,19 +45,19 @@ Anonymous `scan` returns a one-analysis `rst_*` resume token, not an `aas_*` age
4545

4646
```bash
4747
# 1. Start agent login or signup in the browser
48-
npx --yes @agent-analytics/cli@0.5.24 login
48+
npx --yes @agent-analytics/cli@0.5.25 login
4949

5050
# 2. Create a project
51-
npx --yes @agent-analytics/cli@0.5.24 create my-site --domain https://mysite.com
51+
npx --yes @agent-analytics/cli@0.5.25 create my-site --domain https://mysite.com
5252

5353
# 3. Watch it live
54-
npx --yes @agent-analytics/cli@0.5.24 live
54+
npx --yes @agent-analytics/cli@0.5.25 live
5555

5656
# Optional detached login for remote or issue-based agent work
57-
npx --yes @agent-analytics/cli@0.5.24 login --detached
57+
npx --yes @agent-analytics/cli@0.5.25 login --detached
5858

5959
# Optional: clear your saved local auth later
60-
npx --yes @agent-analytics/cli@0.5.24 logout
60+
npx --yes @agent-analytics/cli@0.5.25 logout
6161
```
6262

6363
## Commands
@@ -134,17 +134,17 @@ The CLI is agent-session-first. It stores a renewable Agent Analytics session lo
134134
When a free account hits a Pro-only analytics task, run an explicit upgrade handoff:
135135

136136
```bash
137-
npx --yes @agent-analytics/cli@0.5.24 upgrade-link --detached \
137+
npx --yes @agent-analytics/cli@0.5.25 upgrade-link --detached \
138138
--reason "Need funnel and retention reads for this analysis" \
139-
--command "npx --yes @agent-analytics/cli@0.5.24 funnel my-site --steps page_view,signup,purchase"
139+
--command "npx --yes @agent-analytics/cli@0.5.25 funnel my-site --steps page_view,signup,purchase"
140140
```
141141

142142
The CLI prints an `app.agentanalytics.sh` link. The human confirms the logged-in dashboard account, pays in Lemon Squeezy, and returns to the agent after Pro activates. Use `upgrade-link --wait` when the local shell should keep polling for activation.
143143

144144
Project management commands accept exact project names or project IDs. For local browser QA, update origins through the CLI while keeping the production origin:
145145

146146
```bash
147-
npx --yes @agent-analytics/cli@0.5.24 update stylio --origins 'https://stylio.app,http://lvh.me:3101'
147+
npx --yes @agent-analytics/cli@0.5.25 update stylio --origins 'https://stylio.app,http://lvh.me:3101'
148148
```
149149

150150
Use `scan` before tracker installation when you want judgment instead of generic event lists. The preview is intentionally small: prioritized minimum viable instrumentation, what each event unlocks, current blind spots, and what not to track yet. The stable JSON is designed for agent skills to install only the high-priority events first and verify the first useful recommended event.
@@ -157,13 +157,13 @@ Bounce metrics (`insights`, `pages`, `sessions`) treat a session as a bounce whe
157157
`query` keeps `/events` raw and lossless, but `/query` uses activation-safe dedupe (`session_then_user`) as the default for `event_count`: session-backed rows count by session, no-session rows fall back to `user_id` only when that user has no session-backed row in the same filtered/grouped result set, and fully anonymous rows fall back to event `id`. For recent signup or ingestion debugging, check `events <project> --event <actual_event_name>` first, then use `query` after verifying the raw event names the project emits. `--count-mode` only affects `event_count`. Use `--count-mode raw` when you need the old ingested-row count for debugging or audit work:
158158

159159
```bash
160-
npx --yes @agent-analytics/cli@0.5.24 query my-site --metrics event_count --count-mode raw
160+
npx --yes @agent-analytics/cli@0.5.25 query my-site --metrics event_count --count-mode raw
161161
```
162162

163163
Property filters must use canonical `properties.*` fields. Built-in filter fields are only `event`, `user_id`, `date`, `country`, `session_id`, and `timestamp`. Example:
164164

165165
```bash
166-
npx --yes @agent-analytics/cli@0.5.24 query my-site --filter '[{"field":"properties.referrer","op":"contains","value":"clawflows.com"}]'
166+
npx --yes @agent-analytics/cli@0.5.25 query my-site --filter '[{"field":"properties.referrer","op":"contains","value":"clawflows.com"}]'
167167
```
168168

169169
Invalid filter fields now fail loudly and return property discovery guidance instead of being silently ignored.
@@ -177,9 +177,9 @@ Use annotations for major product changes that could explain later graph movemen
177177
Before setting or refreshing the glossary, inspect the project's current event names:
178178

179179
```bash
180-
npx --yes @agent-analytics/cli@0.5.24 properties my-site
181-
npx --yes @agent-analytics/cli@0.5.24 properties-received my-site
182-
npx --yes @agent-analytics/cli@0.5.24 context set my-site --json '{
180+
npx --yes @agent-analytics/cli@0.5.25 properties my-site
181+
npx --yes @agent-analytics/cli@0.5.25 properties-received my-site
182+
npx --yes @agent-analytics/cli@0.5.25 context set my-site --json '{
183183
"goals": ["Increase activated Agent Analytics accounts"],
184184
"activation_events": ["signup_completed", "project_created", "first_event_received"],
185185
"glossary": [
@@ -204,7 +204,7 @@ npx --yes @agent-analytics/cli@0.5.24 context set my-site --json '{
204204
Use the CLI feedback command when Agent Analytics was confusing, a task took too long, or the agent had to do manual analysis that the product should have handled:
205205

206206
```bash
207-
npx --yes @agent-analytics/cli@0.5.24 feedback \
207+
npx --yes @agent-analytics/cli@0.5.25 feedback \
208208
--message "The agent had to calculate the funnel drop-off manually" \
209209
--project my-site \
210210
--command "agent-analytics funnel my-site --steps page_view,signup,purchase" \
@@ -221,24 +221,24 @@ Claude Code, OpenClaw, Cursor, Codex — any AI agent that can run `npx`. Or add
221221
claude mcp add agent-analytics --transport http https://mcp.agentanalytics.sh/mcp
222222
```
223223

224-
For managed, issue-based, or remote runtimes that cannot receive a localhost callback or keep a long-running process alive, use `npx --yes @agent-analytics/cli@0.5.24 login --detached`. It prints the approval URL and exits. After browser approval, resume with the printed `login --auth-request <id> --exchange-code <code>` command.
224+
For managed, issue-based, or remote runtimes that cannot receive a localhost callback or keep a long-running process alive, use `npx --yes @agent-analytics/cli@0.5.25 login --detached`. It prints the approval URL and exits. After browser approval, resume with the printed `login --auth-request <id> --exchange-code <code>` command.
225225

226226
For managed runtimes where the default home config path may not persist, point auth storage at a persistent runtime/workspace directory:
227227

228228
```bash
229229
export AGENT_ANALYTICS_CONFIG_DIR="$PWD/.openclaw/agent-analytics"
230-
npx --yes @agent-analytics/cli@0.5.24 login --detached
231-
npx --yes @agent-analytics/cli@0.5.24 auth status
230+
npx --yes @agent-analytics/cli@0.5.25 login --detached
231+
npx --yes @agent-analytics/cli@0.5.25 auth status
232232
```
233233

234234
For one-off commands, use `--config-dir "$PWD/.openclaw/agent-analytics"` before or after the command. The CLI stores the same `config.json` file in that directory and does not migrate credentials from the default path.
235235

236-
For a local shell where it is useful to keep waiting, use `npx --yes @agent-analytics/cli@0.5.24 login --detached --wait`.
236+
For a local shell where it is useful to keep waiting, use `npx --yes @agent-analytics/cli@0.5.25 login --detached --wait`.
237237

238238
If your saved session predates CLI `0.5.9`, run a fresh login before calling `projects`. Older saved agent-session tokens were minted without `projects:read`, so they will keep failing until you re-authenticate. Verify with:
239239

240240
```bash
241-
npx --yes @agent-analytics/cli@0.5.24 projects
241+
npx --yes @agent-analytics/cli@0.5.25 projects
242242
```
243243

244244
## Agent Skill

bin/cli.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ function printUpgradeLinkHint(err) {
249249
warn('This needs Pro for the full agent analytics loop.');
250250
if (auth?.api_key) {
251251
log(`Upgrade links require browser-approved CLI login, not a raw API key.`);
252-
log(` ${CYAN}${cliInvocationWithConfig()} login --detached${RESET}`);
252+
log(` ${CYAN}${cliInvocationWithConfig()} login${RESET}`);
253253
return;
254254
}
255255
log(`Ask the human to approve payment with one explicit command:`);
@@ -293,7 +293,8 @@ function unauthenticatedWebsiteAnalysisCliMessage() {
293293
return [
294294
`Website analysis preview is only available anonymously on the web: ${websiteAnalysisWebPreviewUrl()}`,
295295
`In CLI, sign in first, then scan sites for projects you own or manage.`,
296-
`Next step: npx @agent-analytics/cli login --detached`,
296+
`Next step: npx @agent-analytics/cli login`,
297+
`For Paperclip, OpenClaw, or issue-based runtimes, use: npx @agent-analytics/cli login --detached`,
297298
].join('\n');
298299
}
299300

@@ -481,10 +482,10 @@ async function cmdUpgradeLink({ detached, wait, reason, blockedCommand }) {
481482

482483
const auth = getStoredAuth();
483484
if (!auth) {
484-
error('Not logged in. Run: npx @agent-analytics/cli login --detached');
485+
error('Not logged in. Run: npx @agent-analytics/cli login');
485486
}
486487
if (auth.api_key) {
487-
error('upgrade-link requires browser-approved CLI login, not a raw API key. Run: npx @agent-analytics/cli login --detached');
488+
error('upgrade-link requires browser-approved CLI login, not a raw API key. Run: npx @agent-analytics/cli login');
488489
}
489490

490491
const api = createApiClient(auth);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-analytics/cli",
3-
"version": "0.5.24",
3+
"version": "0.5.25",
44
"description": "Stop juggling dashboards. Let your agent do it. Analytics your AI agent can actually use — track, analyze, experiment, optimize.",
55
"bin": {
66
"agent-analytics": "bin/cli.mjs"

test/cli.test.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ describe('CLI', () => {
259259

260260
assert.notEqual(code, 0);
261261
assert.ok(stripAnsi(stdout).includes('requires browser-approved CLI login'));
262+
assert.ok(stripAnsi(stdout).includes('Run: npx @agent-analytics/cli login'));
262263
} finally {
263264
config.cleanup();
264265
}
@@ -1534,6 +1535,8 @@ describe('CLI', () => {
15341535
assert.match(plain, /Website analysis preview is only available anonymously on the web/i);
15351536
assert.match(plain, /https:\/\/agentanalytics\.sh\/analysis\//i);
15361537
assert.match(plain, /sign in first/i);
1538+
assert.match(plain, /Next step: npx @agent-analytics\/cli login/i);
1539+
assert.match(plain, /Paperclip, OpenClaw, or issue-based runtimes/i);
15371540
assert.match(plain, /login --detached/i);
15381541
} finally {
15391542
await server.close();

0 commit comments

Comments
 (0)