From a9ee4c17880a2d2a64c1188624772f5ada95fec1 Mon Sep 17 00:00:00 2001 From: "Customer.io Open Source Bot" Date: Mon, 15 Jun 2026 16:52:08 -0400 Subject: [PATCH] Add Customer.io CLI source CioCliPublicExport-RevId: 7001cd89e3108b1983b536ac701092d41ba89d5f --- cmd/prime_context.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cmd/prime_context.md b/cmd/prime_context.md index fb5fc45..a229819 100644 --- a/cmd/prime_context.md +++ b/cmd/prime_context.md @@ -18,6 +18,25 @@ cio auth status If auth fails, ask the user to run `cio auth login` and paste their `sa_live_` token. +## Profiles + +Credentials live in named profiles (in `~/.cio/config.json`), each with its own +token, region, and optional API base URL. This lets one machine hold several +accounts (e.g. production, staging, a client) without re-authenticating. + +```bash +cio profile list # list profiles; the saved default is marked current +cio profile use # set the default profile +cio profile remove # delete a profile +cio auth login --profile # create/re-auth a profile (persists a custom --api-url) +``` + +Select a profile for a single command with the global `--profile ` flag, +or for a whole session with the `CIO_PROFILE` env var. Resolution order: +`--profile` → `CIO_PROFILE` → stored `current_profile` → `default`. A legacy +single-credential config is migrated to a `default` profile automatically. +Profile names allow letters, digits, `.`, `-`, and `_`. + ## The `api` Command The primary command is `cio api `. It makes authenticated HTTP requests to supported Customer.io API endpoints. @@ -82,6 +101,7 @@ cio skills read design-studio/nodes.md # node creation, component markup | `--scope ` | Request additional OAuth scopes during token exchange | | `--api-url ` | Override the API base URL | | `--token ` | Override the service account token | +| `--profile ` | Configuration profile to use (overrides `CIO_PROFILE`; default: current profile) | | `--page ` | Page number | | `--limit ` | Page size | | `--page-all` | Auto-paginate, emit NDJSON (one JSON object per line) |