@soku-ai/cli 0.1.0-alpha.1 → 0.1.0-alpha.11

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.
Files changed (92) hide show
  1. package/dist/auth/device.d.ts +11 -0
  2. package/dist/auth/device.d.ts.map +1 -1
  3. package/dist/auth/device.js +17 -1
  4. package/dist/auth/device.js.map +1 -1
  5. package/dist/commands/ads.d.ts +32 -0
  6. package/dist/commands/ads.d.ts.map +1 -0
  7. package/dist/commands/ads.js +752 -0
  8. package/dist/commands/ads.js.map +1 -0
  9. package/dist/commands/auth.d.ts +2 -0
  10. package/dist/commands/auth.d.ts.map +1 -1
  11. package/dist/commands/auth.js +28 -7
  12. package/dist/commands/auth.js.map +1 -1
  13. package/dist/commands/automation.d.ts +80 -0
  14. package/dist/commands/automation.d.ts.map +1 -0
  15. package/dist/commands/automation.js +213 -0
  16. package/dist/commands/automation.js.map +1 -0
  17. package/dist/commands/brand-skill.d.ts +72 -0
  18. package/dist/commands/brand-skill.d.ts.map +1 -0
  19. package/dist/commands/brand-skill.js +351 -0
  20. package/dist/commands/brand-skill.js.map +1 -0
  21. package/dist/commands/brand.d.ts.map +1 -1
  22. package/dist/commands/brand.js +59 -1
  23. package/dist/commands/brand.js.map +1 -1
  24. package/dist/commands/call.d.ts.map +1 -1
  25. package/dist/commands/call.js +6 -3
  26. package/dist/commands/call.js.map +1 -1
  27. package/dist/commands/context.d.ts +23 -0
  28. package/dist/commands/context.d.ts.map +1 -0
  29. package/dist/commands/context.js +291 -0
  30. package/dist/commands/context.js.map +1 -0
  31. package/dist/commands/files.d.ts +10 -0
  32. package/dist/commands/files.d.ts.map +1 -0
  33. package/dist/commands/files.js +48 -0
  34. package/dist/commands/files.js.map +1 -0
  35. package/dist/commands/generated.d.ts +24 -3
  36. package/dist/commands/generated.d.ts.map +1 -1
  37. package/dist/commands/generated.js +97 -10
  38. package/dist/commands/generated.js.map +1 -1
  39. package/dist/commands/memory.d.ts +18 -0
  40. package/dist/commands/memory.d.ts.map +1 -0
  41. package/dist/commands/memory.js +70 -0
  42. package/dist/commands/memory.js.map +1 -0
  43. package/dist/commands/review.d.ts.map +1 -1
  44. package/dist/commands/review.js +46 -2
  45. package/dist/commands/review.js.map +1 -1
  46. package/dist/commands/seo-hosting.d.ts +107 -0
  47. package/dist/commands/seo-hosting.d.ts.map +1 -0
  48. package/dist/commands/seo-hosting.js +499 -0
  49. package/dist/commands/seo-hosting.js.map +1 -0
  50. package/dist/commands/skill.d.ts +50 -6
  51. package/dist/commands/skill.d.ts.map +1 -1
  52. package/dist/commands/skill.js +120 -56
  53. package/dist/commands/skill.js.map +1 -1
  54. package/dist/commands/update.d.ts +23 -0
  55. package/dist/commands/update.d.ts.map +1 -0
  56. package/dist/commands/update.js +345 -0
  57. package/dist/commands/update.js.map +1 -0
  58. package/dist/commands/workspace.d.ts +4 -0
  59. package/dist/commands/workspace.d.ts.map +1 -0
  60. package/dist/commands/workspace.js +132 -0
  61. package/dist/commands/workspace.js.map +1 -0
  62. package/dist/config.d.ts +5 -4
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +5 -7
  65. package/dist/config.js.map +1 -1
  66. package/dist/generated/capabilities.json +291 -30
  67. package/dist/http/client.d.ts.map +1 -1
  68. package/dist/http/client.js +74 -16
  69. package/dist/http/client.js.map +1 -1
  70. package/dist/index.js +35 -3
  71. package/dist/index.js.map +1 -1
  72. package/dist/output/envelope.d.ts +5 -0
  73. package/dist/output/envelope.d.ts.map +1 -1
  74. package/dist/output/envelope.js +101 -2
  75. package/dist/output/envelope.js.map +1 -1
  76. package/dist/output/unwrap.d.ts.map +1 -1
  77. package/dist/output/unwrap.js +18 -1
  78. package/dist/output/unwrap.js.map +1 -1
  79. package/dist/skills/unzip.d.ts +1 -1
  80. package/dist/skills/unzip.js +1 -1
  81. package/dist/update-check.d.ts +0 -1
  82. package/dist/update-check.d.ts.map +1 -1
  83. package/dist/update-check.js +4 -54
  84. package/dist/update-check.js.map +1 -1
  85. package/dist/version.d.ts +1 -1
  86. package/dist/version.d.ts.map +1 -1
  87. package/dist/version.js +1 -1
  88. package/dist/version.js.map +1 -1
  89. package/package.json +7 -4
  90. package/postinstall.cjs +85 -0
  91. package/skills/soku/SKILL.md +402 -32
  92. package/README.md +0 -91
package/README.md DELETED
@@ -1,91 +0,0 @@
1
- # @soku-ai/cli
2
-
3
- Call Soku ads/GA4 data capabilities from any shell or AI agent. It's the
4
- preferred surface for external agents — equivalent to the hosted MCP server, but
5
- works without an MCP host.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm i -g @soku-ai/cli
11
- ```
12
-
13
- Development builds can be linked from this repo:
14
-
15
- ```bash
16
- pnpm --filter @soku-ai/cli run build
17
- npm link apps/cli
18
- ```
19
-
20
- ## Quick start
21
-
22
- ```bash
23
- soku auth login # device-login in the browser
24
- soku org use <slug|id> # pick a workspace (id, slug, or name)
25
- soku brand use <slug|id>
26
- soku --help # discover namespaces (ads, ga4, …)
27
- soku update-check # check npm for a newer CLI release
28
- soku ads --help # actions in a namespace
29
- soku ads list-ad-accounts --platform google
30
- ```
31
-
32
- Each data capability is a typed sub-command under its namespace; `<command>
33
- --help` shows its flags. `soku call <ns> <action>` is a raw escape hatch for
34
- actions not yet exposed as a typed sub-command.
35
-
36
- ## Authentication
37
-
38
- `soku` uses an org-agnostic, device-login session token (RFC 8628). You log in
39
- once; the org and brand are chosen at runtime and sent per request.
40
-
41
- - **Human:** `soku auth login` opens the browser and waits for approval.
42
- - **Agent (non-blocking):** `soku auth login --no-wait` returns the verification
43
- URL immediately; resume with `soku auth login --device-code <code>` after the
44
- user approves.
45
- - **CI / headless:** set `SOKU_TOKEN` to a pre-issued token to skip interactive
46
- auth (and the OS keychain).
47
-
48
- Token storage: OS keychain when available, else `~/.soku/credentials.json`
49
- (0600). Set `SOKU_NO_KEYCHAIN=1` to always use the file. Behind a proxy, set
50
- `ALL_PROXY`.
51
-
52
- ## Output
53
-
54
- stdout is JSON (`{"ok":true,"data":...}` when piped; pretty when a TTY).
55
- Errors go to stderr as `{"ok":false,"error":{type,message,hint}}` with a
56
- semantic exit code (0 ok / 1 usage / 2 auth / 4 not-found / 5 runtime).
57
-
58
- ## Use from an AI agent
59
-
60
- For a fresh agent, point it at the hosted installer guide:
61
-
62
- ```text
63
- Read https://soku.ai/cli/skill.md and install the Soku CLI.
64
- ```
65
-
66
- Install the bundled skill so Claude Code / Codex / Cursor know how to drive the
67
- CLI:
68
-
69
- ```bash
70
- soku skill install --global # all detected agents
71
- soku skill install --agent claude # one agent, into the project
72
- ```
73
-
74
- ## Updates
75
-
76
- `soku update-check` queries the npm registry for `@soku-ai/cli@latest` and tells
77
- the user whether `npm i -g @soku-ai/cli` should be re-run. The CLI also performs a
78
- TTY-only advisory check at most once every 24 hours, cached in
79
- `~/.soku/update-check.json`. Set `SOKU_NO_UPDATE_CHECK=1` to disable the
80
- background notice.
81
-
82
- ## Environment variables
83
-
84
- | Variable | Purpose |
85
- |----------|---------|
86
- | `SOKU_TOKEN` | Pre-issued session token (overrides stored credentials) |
87
- | `SOKU_API_BASE` | API base URL override |
88
- | `SOKU_ORG_ID` / `SOKU_BRAND_ID` | One-off workspace override |
89
- | `SOKU_NO_KEYCHAIN` | Skip the OS keychain; use the 0600 file |
90
- | `SOKU_NO_UPDATE_CHECK` | Disable the TTY-only update notice |
91
- | `ALL_PROXY` | Proxy for outbound HTTPS |