@wrangled/cli 0.3.5 → 0.3.6

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/guide.js CHANGED
@@ -9,12 +9,12 @@ export const guide = `# ${brand.name} CLI
9
9
 
10
10
  ## Setup
11
11
 
12
- 1. Check the login: \`${cli} whoami\`. It prints the workspace name, slug, and id.
12
+ 1. Check the login: \`${cli} whoami\`. It prints the workspace name, slug, and id, and whether the key has library access.
13
13
  2. If it exits with code 3, you are not logged in. Ask the user to run \`${cli} login\` in their own terminal. It prompts for the key without showing it. Never ask for the key in chat and never put it on a command line, where it lands in shell history and logs. In CI, the key comes from the \`${envPrefix}_API_KEY\` environment variable.
14
14
 
15
15
  ## Start with the data guide
16
16
 
17
- Run \`${cli} guide\` first. It says, in plain words, what this workspace has. It starts with the settled facts: rows to leave out of the numbers, known gaps in the data, last month's normal numbers and the latest changes, with \`${cli} facts\` for the rest. Then each connected source with when it last synced and how many rows it holds over which dates; the content library's ads, emails, text messages, landing pages, videos and posts and how many videos and recordings have transcripts; and what is missing, such as a source that is not connected, a failing sync, or videos and recordings without a transcript yet.
17
+ Run \`${cli} guide\` first. It says, in plain words, what this workspace has. It starts with the settled facts: rows to leave out of the numbers, known gaps in the data, last month's normal numbers and the latest changes, with \`${cli} facts\` for the rest. Next comes the latest weekly story's headline, with \`${cli} story\` for the whole story. Then each connected source with when it last synced and how many rows it holds over which dates; the content library's ads, emails, text messages, landing pages, videos and posts and how many videos and recordings have transcripts; and what is missing, such as a source that is not connected, a failing sync, or videos and recordings without a transcript yet.
18
18
 
19
19
  ## Before writing ads: the campaign brief
20
20
 
@@ -203,7 +203,7 @@ A scheduled hand's run acts as its skill's agent, the way the Facebook ads agent
203
203
  \`\`\`
204
204
  ${cli} login validate a key (prompted, piped, or ${envPrefix}_API_KEY) and save it
205
205
  ${cli} logout delete saved credentials
206
- ${cli} whoami show the current workspace
206
+ ${cli} whoami show the current workspace and library access
207
207
  ${cli} guide what this workspace's data holds, how fresh it is, and what is missing: read it first
208
208
  ${cli} brief [--from <date>] [--to <date>] [--channel <channel>] [--campaign <id>] [--top <n>] the offer, voice, best and worst ads, pages, results and audience: start here before writing ads
209
209
  ${cli} warehouse schema [--summary] [--table <name> ...] [--search <words>] list tables and columns; --summary for one row per table
package/dist/main.js CHANGED
@@ -51,7 +51,7 @@ const commands = {
51
51
  if (options.format === "json")
52
52
  return printJson(me);
53
53
  const { name, slug, id } = me.workspace;
54
- console.log(renderTable(["workspace", "slug", "id"], [{ workspace: name, slug, id }]));
54
+ console.log(renderTable(["workspace", "slug", "id", "library access"], [{ workspace: name, slug, id, "library access": me.knowledge ? "on" : "off" }]));
55
55
  },
56
56
  },
57
57
  "warehouse schema": {
package/dist/playbooks.js CHANGED
@@ -99,6 +99,14 @@ ${cli} facts --format json
99
99
 
100
100
  Treat confirmed facts as true. Confirmed \`baseline\` facts are the normal numbers to compare against. \`watch\` facts are what an earlier run asked to re-check (one past its \`validUntil\` has run its course), \`change\` facts are what changed or was proposed and when, and \`gap\` facts are the data's quirks. A summary that starts "Not yet confirmed:" is a suggestion no person has checked yet: weigh it, but never let it outweigh what a query shows.
101
101
 
102
+ Then read the latest weekly story about this client:
103
+
104
+ \`\`\`sh
105
+ ${cli} story --format json
106
+ \`\`\`
107
+
108
+ It is the newest weekly story of what the data said and why: context to build on and to check, never a fact and never a substitute for a query. Never take a number from it; where this run's numbers disagree with it, this run's numbers win. If its \`story\` is null, there is no story yet: carry on.
109
+
102
110
  ## 2. Check that the data is fresh
103
111
 
104
112
  \`\`\`sh
@@ -404,6 +412,14 @@ ${cli} facts --format json
404
412
 
405
413
  Treat confirmed facts as true. Confirmed \`baseline\` facts are the normal numbers to compare against. \`watch\` facts are what an earlier run asked to re-check (one past its \`validUntil\` has run its course), \`change\` facts are what changed or was proposed and when, and \`gap\` facts are the data's quirks. A summary that starts "Not yet confirmed:" is a suggestion no person has checked yet: weigh it, but never let it outweigh what a query shows.
406
414
 
415
+ Then read the latest weekly story about this client:
416
+
417
+ \`\`\`sh
418
+ ${cli} story --format json
419
+ \`\`\`
420
+
421
+ It is the newest weekly story of what the data said and why: context to build on and to check, never a fact and never a substitute for a query. Never take a number from it; where this run's numbers disagree with it, this run's numbers win. If its \`story\` is null, there is no story yet: carry on.
422
+
407
423
  Then read how people decided:
408
424
 
409
425
  \`\`\`sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrangled/cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Command-line access to your marketing data warehouse, for people and coding agents",
5
5
  "type": "module",
6
6
  "bin": {