Style Guide commands
The 4 koast CLI commands for the Style Guide operations.
Every command is one API operation, named by its operationId. Global flags such as --output and --api-url work on all of them, see CLI commands.
extract-brand-style
Extract brand style. POST /v1/brands/{brandId}/style-guide/extractions, API reference.
koast extract-brand-style --brand <brand> --url <url> [--json <file|->]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--url | string | Yes | The website to read, such as "koast.ai" or a full https address. At most 2048 characters. |
Required scope: write. Accepts --idempotency-key. The CLI sends a key only when you give one. --json <file|-> supplies the whole body. Body flags are applied over it.
Example:
koast extract-brand-style --brand 123 --url URLget-brand-style-guide
Get brand style guide. GET /v1/brands/{brandId}/style-guide, API reference.
koast get-brand-style-guide --brand <brand>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
Required scope: read.
Example:
koast get-brand-style-guide --brand 123get-brand-website-candidates
Get brand website candidates. GET /v1/brands/{brandId}/style-guide/website-candidates, API reference.
koast get-brand-website-candidates --brand <brand>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
Required scope: read.
Example:
koast get-brand-website-candidates --brand 123save-brand-style-guide
Save brand style guide. PUT /v1/brands/{brandId}/style-guide, API reference.
koast save-brand-style-guide --brand <brand> --source-url <source-url> --guide <guide> --confirmed <confirmed> [--json <file|->] [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--source-url | string | Yes | The website the guide was built from, or null. At most 2048 characters. |
--guide | JSON object | Yes | |
--confirmed | boolean | Yes | True only when the user has approved the guide. |
--replaces-site | boolean | No | True only when the user chose sourceUrl as this brand's own website. Without it, a guide from another site than the brand's saved guide is refused, so a site read to make ads for another brand never replaces this brand's style. |
Required scope: write. --json <file|-> supplies the whole body. Body flags are applied over it.
Example:
koast save-brand-style-guide --brand 123 --json body.jsonWith body.json:
{
"sourceUrl": "string",
"guide": {
"palette": [
{
"hex": "string",
"role": "primary",
"name": "string",
"source": "measured"
}
],
"typography": {
"heading": {
"family": "string",
"weight": 100,
"fallback": "serif",
"source": "measured",
"assetIds": [
1
]
},
"body": {
"family": "string",
"weight": 100,
"fallback": "serif",
"source": "measured",
"assetIds": [
1
]
}
},
"shapes": {
"corners": "string",
"buttons": "string",
"cards": "string",
"lines": "string",
"other": "string"
},
"logo": {
"assetId": 1,
"use": "onDark"
},
"imagery": "string",
"voice": "string",
"dos": [
"string"
],
"donts": [
"string"
]
},
"confirmed": true,
"replacesSite": true
}