@customerio/cli 0.0.11 → 0.0.13
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 +53 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -37,7 +37,25 @@ rm -rf ~/.cio
|
|
|
37
37
|
|
|
38
38
|
## Install the agent skill
|
|
39
39
|
|
|
40
|
-
This repo ships a [SKILL.md](skills/cio/SKILL.md) so Claude Code, Cursor, Codex, Windsurf, and other agents that support [open agent skills](https://github.com/vercel-labs/skills) know how to drive the CLI.
|
|
40
|
+
This repo ships a [SKILL.md](skills/cio/SKILL.md) so Claude Code, Cursor, Codex, Windsurf, and other agents that support [open agent skills](https://github.com/vercel-labs/skills) know how to drive the CLI.
|
|
41
|
+
|
|
42
|
+
The CLI can install the current skills directly:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Installs the bootstrap skill; prompts for global (~/.claude, ~/.agents)
|
|
46
|
+
# vs. project (./.claude, ./.agents)
|
|
47
|
+
cio skills install
|
|
48
|
+
|
|
49
|
+
cio skills install --global # install for every project
|
|
50
|
+
cio skills install --project # install into the current directory
|
|
51
|
+
cio skills install --target claude # Claude Code only (use --target codex for Codex)
|
|
52
|
+
cio skills install --dry-run # show what would be written
|
|
53
|
+
cio skills install --force # overwrite an existing SKILL.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This installs only the Customer.io bootstrap skill — its `SKILL.md` routing index is written to `<target>/skills/<name>/` for Claude Code (`.claude`) and the open agent skills convention (`.agents`) Codex, Cursor, and Windsurf read. Every other reference (Journeys, CDP, Design Studio, recipes) is served by the backend and pulled on demand via `cio skills read <skill>`, so nothing else is copied locally and the content stays current.
|
|
57
|
+
|
|
58
|
+
Or install via the open agent skills tooling:
|
|
41
59
|
|
|
42
60
|
```bash
|
|
43
61
|
npx skills add customerio/cli
|
|
@@ -75,6 +93,39 @@ cio auth logout
|
|
|
75
93
|
When you use `CIO_TOKEN` or `--token` directly on normal commands, you may
|
|
76
94
|
also need `CIO_REGION=us|eu` or `--api-url`.
|
|
77
95
|
|
|
96
|
+
### Profiles
|
|
97
|
+
|
|
98
|
+
Keep multiple credential sets — production, staging, several client accounts —
|
|
99
|
+
in one config file and switch between them. Each profile has its own token,
|
|
100
|
+
region, and optional custom base URL.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Log into a named profile (custom --api-url is remembered; switches to it)
|
|
104
|
+
echo "$STAGING_TOKEN" | cio auth login --profile staging --with-token --api-url https://<staging-host>
|
|
105
|
+
|
|
106
|
+
# List profiles (the saved default is marked current)
|
|
107
|
+
cio profile list
|
|
108
|
+
|
|
109
|
+
# Use a profile for one command…
|
|
110
|
+
cio --profile staging api /v1/campaigns
|
|
111
|
+
# …or a whole session
|
|
112
|
+
export CIO_PROFILE=staging
|
|
113
|
+
|
|
114
|
+
# Change the default, or remove a profile
|
|
115
|
+
cio profile use default
|
|
116
|
+
cio profile remove staging
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Profile resolution: `--profile` flag → `CIO_PROFILE` → stored `current_profile`
|
|
120
|
+
→ `default`. An existing single-credential config is migrated to a `default`
|
|
121
|
+
profile automatically. Profile names may contain letters, digits, `.`, `-`,
|
|
122
|
+
and `_`.
|
|
123
|
+
|
|
124
|
+
`cio auth login` without `--profile` re-authenticates whichever profile is
|
|
125
|
+
currently selected, not always `default` — pass `--profile <name>` to target a
|
|
126
|
+
specific one. `cio profile list` marks the saved default (`current_profile`),
|
|
127
|
+
which a per-command `--profile` / `CIO_PROFILE` override does not change.
|
|
128
|
+
|
|
78
129
|
### How It Works
|
|
79
130
|
|
|
80
131
|
1. You provide a service account token (`sa_live_...` from Customer.io UI → Account Settings → Manage API Credentials → Service Accounts, or `sa_sandbox_...` returned by Builder sandbox signup)
|
|
@@ -171,6 +222,7 @@ cio api /v1/environments/{environment_id}/campaigns \
|
|
|
171
222
|
| Flag | Env Var | Description |
|
|
172
223
|
|---|---|---|
|
|
173
224
|
| `--token <value>` | `CIO_TOKEN` | Service account token override |
|
|
225
|
+
| `--profile <name>` | `CIO_PROFILE` | Configuration profile to use |
|
|
174
226
|
| `-X, --method` | | HTTP method override (default: GET, or POST if --json) |
|
|
175
227
|
| `--json <payload>` | | Raw JSON request body or `@filename` to read from file |
|
|
176
228
|
| `--params <json>` | | Query parameters as JSON → query string |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@customerio/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Agent-first CLI for Customer.io APIs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cio": ".npm/run.js"
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"@customerio/cli-darwin-arm64": "0.0.
|
|
15
|
-
"@customerio/cli-darwin-x64": "0.0.
|
|
16
|
-
"@customerio/cli-linux-arm64": "0.0.
|
|
17
|
-
"@customerio/cli-linux-x64": "0.0.
|
|
18
|
-
"@customerio/cli-win32-arm64": "0.0.
|
|
19
|
-
"@customerio/cli-win32-x64": "0.0.
|
|
14
|
+
"@customerio/cli-darwin-arm64": "0.0.13",
|
|
15
|
+
"@customerio/cli-darwin-x64": "0.0.13",
|
|
16
|
+
"@customerio/cli-linux-arm64": "0.0.13",
|
|
17
|
+
"@customerio/cli-linux-x64": "0.0.13",
|
|
18
|
+
"@customerio/cli-win32-arm64": "0.0.13",
|
|
19
|
+
"@customerio/cli-win32-x64": "0.0.13"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public",
|