Skip to content

Commit de20bb6

Browse files
committed
Improve docs formatting, support dark mode
1 parent a82d62b commit de20bb6

5 files changed

Lines changed: 54 additions & 28 deletions

File tree

COMMANDS.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Available Commands (109 commands)
1+
# Available Commands (109)
22

33
All commands follow the pattern: `iterable <category> <command> [options]`
44

55
Every command also accepts `--json <data>` for raw JSON input and `--help` for usage details.
66

7-
## campaigns (14 commands)
7+
## campaigns (14)
88

99
### campaigns abort
1010

@@ -193,7 +193,7 @@ iterable campaigns trigger --campaignId <campaignId> --listIds <listIds...>
193193
| `--suppressionListIds` | number[] | no | Lists to suppress |
194194

195195

196-
## catalogs (12 commands)
196+
## catalogs (12)
197197

198198
### catalogs bulk-delete-items
199199

@@ -350,7 +350,7 @@ iterable catalogs update-items <catalogName> --items <items...>
350350
| `--items` | json[] | **yes** | Catalog items to update |
351351

352352

353-
## events (4 commands)
353+
## events (4)
354354

355355
### events get-by-email
356356

@@ -411,7 +411,7 @@ iterable events track-bulk --events <events...>
411411
| `--events` | json[] | **yes** | |
412412

413413

414-
## experiments (4 commands)
414+
## experiments (4)
415415

416416
### experiments get
417417

@@ -462,7 +462,7 @@ List experiments with optional filtering by campaign, status, and date range
462462
| `--status` | `draft` \| `running` \| `finished` | no | Filter by status (draft, running, finished) |
463463

464464

465-
## export (4 commands)
465+
## export (4)
466466

467467
### export cancel
468468

@@ -517,7 +517,7 @@ iterable export start --dataTypeName <dataTypeName> --outputFormat <outputFormat
517517
| `--startDateTime` | string | no | Export events occurring or users updated after date and time inclusive |
518518

519519

520-
## journeys (2 commands)
520+
## journeys (2)
521521

522522
### journeys list
523523

@@ -548,7 +548,7 @@ iterable journeys trigger <workflowId>
548548
| `--userId` | string | no | User ID (alternative to email) |
549549

550550

551-
## lists (8 commands)
551+
## lists (8)
552552

553553
### lists create
554554

@@ -646,7 +646,7 @@ iterable lists unsubscribe <listId> --subscribers <subscribers...>
646646
| `--subscribers` | json[] | **yes** | Users to unsubscribe |
647647

648648

649-
## messaging (16 commands)
649+
## messaging (16)
650650

651651
### messaging cancel-email
652652

@@ -858,7 +858,7 @@ iterable messaging send-whatsapp <campaignId>
858858
| `--sendAt` | string | no | When to send (YYYY-MM-DD HH:MM:SS format) |
859859

860860

861-
## snippets (5 commands)
861+
## snippets (5)
862862

863863
### snippets create
864864

@@ -921,7 +921,7 @@ iterable snippets update --content <content> --identifier <identifier>
921921
| `--variables` | string[] | no | List of variable names used in the content with a Handlebars expression such as {{myField}}. Variable names are case-sensitive and should be simple identifiers (letters, numbers, underscores). To learn more about using Handlebars in Snippets, see Customizing Snippets with Variables. |
922922

923923

924-
## subscriptions (5 commands)
924+
## subscriptions (5)
925925

926926
### subscriptions bulk-update
927927

@@ -996,7 +996,7 @@ iterable subscriptions unsubscribe-by-userid --subscriptionGroup <subscriptionGr
996996
| `--userId` | string | **yes** | User's userId |
997997

998998

999-
## templates (21 commands)
999+
## templates (21)
10001000

10011001
### templates delete
10021002

@@ -1350,7 +1350,7 @@ iterable templates upsert-sms <clientTemplateId>
13501350
| `--name` | string | no | Template name |
13511351

13521352

1353-
## users (12 commands)
1353+
## users (12)
13541354

13551355
### users bulk-update
13561356

@@ -1499,7 +1499,7 @@ Update user subscriptions (overwrites existing data for any non-null fields spec
14991499
| `--validateChannelAlignment` | boolean | no | Defaults to true (validation enabled). When false, allows subscribing users to message types that belong to unsubscribed channels. By default, Iterable validates that subscribed message types belong to subscribed channels. Setting this to false bypasses this validation, allowing you to save message type preferences even when the parent channel is unsubscribed. Users won't receive messages from these types while the channel remains unsubscribed, but their preferences are preserved for when the channel becomes subscribed. |
15001500

15011501

1502-
## webhooks (2 commands)
1502+
## webhooks (2)
15031503

15041504
### webhooks list
15051505

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ pnpm test:unit # Parser, router, commands registry, key manager — no n
6363
pnpm test:integration # Calls the real Iterable API (needs ITERABLE_API_KEY)
6464
pnpm test:e2e # Spawns the CLI binary as a subprocess
6565
pnpm test # All of the above (runs build first)
66+
pnpm check # Lint, typecheck, format
6667
```
6768

6869
Integration and E2E tests that need an API key are skipped automatically when `ITERABLE_API_KEY` is not set.
69-
70-
## Before Committing
71-
72-
Run `pnpm check` to catch formatting, type, and lint issues.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Iterable CLI
22

33
[![npm version](https://img.shields.io/npm/v/@iterable/cli.svg)](https://www.npmjs.com/package/@iterable/cli)
4-
5-
> **Note:** This is an open-source developer tool, not an officially supported Iterable product. It is provided "as is" under the MIT License with no warranty or support guarantees.
4+
[![docs](https://img.shields.io/badge/docs-iterable.github.io%2Fcli-blue)](https://iterable.github.io/cli/)
65

76
A command-line interface for the [Iterable API](https://api.iterable.com/api/docs). Manage campaigns, templates, users, lists, and more from your terminal.
87

8+
> **Note:** This is an open-source developer tool, not an officially supported Iterable product. It is provided "as is" under the MIT
9+
License with no warranty or support guarantees.
10+
911
## Installation
1012

1113
**Prerequisites:**

index.html

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,45 @@
55
<title>Iterable CLI</title>
66
<meta name="description" content="Command-line interface for the Iterable API">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
8-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
8+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css" media="(prefers-color-scheme: light)">
9+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css" media="(prefers-color-scheme: dark)">
910
<style>
10-
.sidebar > h1 { text-align: left; padding-left: 1rem; }
11-
.app-name-link { font-weight: bold; }
12-
.app-name-link img { vertical-align: middle; margin-right: 6px; border-radius: 4px; }
13-
.sidebar ul li a { font-size: 1rem; }
11+
:root {
12+
--sidebar-name-font-weight: bold;
13+
--sidebar-name-text-align: left;
14+
--heading-font-weight: 700;
15+
}
16+
@media (prefers-color-scheme: light) {
17+
:root {
18+
--theme-color: #357a69;
19+
--base-background-color: #f5f5f7;
20+
--sidebar-background: #ebebef;
21+
--heading-color: #1e1e2e;
22+
}
23+
}
24+
@media (prefers-color-scheme: dark) {
25+
:root {
26+
--theme-color: #5DB5A1;
27+
--mono-shade3: hsl(230, 20%, 7%);
28+
--mono-shade2: hsl(230, 20%, 9%);
29+
--mono-shade1: hsl(230, 20%, 11%);
30+
--mono-base: hsl(230, 20%, 13%);
31+
--mono-tint1: hsl(230, 20%, 19%);
32+
--heading-color: #e0e0e0;
33+
}
34+
}
35+
.app-name-link {
36+
background: url('https://github.com/Iterable.png') no-repeat left center / 1.2em;
37+
padding-left: 1.7em;
38+
border-radius: 4px;
39+
}
1440
</style>
1541
</head>
1642
<body>
1743
<div id="app"></div>
1844
<script>
1945
window.$docsify = {
20-
name: '<img src="https://github.com/Iterable.png" width="28" alt="Iterable"> Iterable CLI',
46+
name: 'Iterable CLI',
2147
repo: 'https://github.com/Iterable/cli',
2248
loadSidebar: true,
2349
subMaxLevel: 2,
@@ -26,6 +52,7 @@
2652
};
2753
</script>
2854
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
55+
<script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/js/docsify-themeable.min.js"></script>
2956
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
3057
<script src="https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
3158
<script src="https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-typescript.min.js"></script>

scripts/update-commands.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ try {
9393
);
9494

9595
const sections = [
96-
`# Available Commands (${totalCount} commands)`,
96+
`# Available Commands (${totalCount})`,
9797
"",
9898
`All commands follow the pattern: \`${COMMAND_NAME} <category> <command> [options]\``,
9999
"",
@@ -102,7 +102,7 @@ try {
102102

103103
for (const { category, commands } of commandsByCategory) {
104104
sections.push("");
105-
sections.push(`## ${category} (${commands.length} commands)`);
105+
sections.push(`## ${category} (${commands.length})`);
106106
sections.push("");
107107
for (const cmd of commands) {
108108
try {

0 commit comments

Comments
 (0)