diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a4de0..7bca20a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b Every entry says what changed as a caller sees it, why, and what to watch for — the rules are [`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog). +## Unreleased + +### Added + +- **The words of a content CLI (posts on a site or blog).** `posts` and `channels` are resources, `stats` is a view + as well as the root command (`posts stats `), and `--slug `, `--tags ` and `--replace-body` have + their roles. cli-core's content commands use them, and reuse the words the vocabulary had: `--text-file`, + `--description`, `--at-time`, `--allow-delete`, `tags` and `users`. Before this, `cli-dev lint` refused a CLI made + from cli-core's content commands. + ## 0.122.0 — 19.11.2026 ### Added diff --git a/src/standards/flags-content.ts b/src/standards/flags-content.ts new file mode 100644 index 0000000..e37c7f4 --- /dev/null +++ b/src/standards/flags-content.ts @@ -0,0 +1,19 @@ +import type { VocabularyFlag } from "./vocabulary.js" + +/** Posts and pages on a site or blog the owner publishes. */ +export const CONTENT_FLAGS: VocabularyFlag[] = [ + { name: "--slug", value: "", role: "value", type: "string", meaning: "the last part of its web address" }, + { + name: "--tags", + value: "", + role: "value", + type: "list", + meaning: "its tags and categories, by comma-separated ids; replaces the ones it has", + }, + { + name: "--replace-body", + role: "mode", + type: "switch", + meaning: "write the new text over a body the tool cannot fully read back, losing what it could not show", + }, +] diff --git a/src/standards/vocabulary.ts b/src/standards/vocabulary.ts index e399757..e837f7e 100644 --- a/src/standards/vocabulary.ts +++ b/src/standards/vocabulary.ts @@ -1,6 +1,7 @@ import * as v from "valibot" import { ACCOUNT_FLAGS } from "./flags-account.js" import { CALENDAR_FLAGS } from "./flags-calendar.js" +import { CONTENT_FLAGS } from "./flags-content.js" import { CRM_FLAGS } from "./flags-crm.js" import { HOW_FLAGS } from "./flags-how.js" import { KNOWLEDGE_FLAGS } from "./flags-knowledge.js" @@ -256,6 +257,8 @@ const collections: [string, string][] = [ ["messages", "posts in a messenger chat, or emails"], ["drafts", "e-mails saved in a mailbox's Drafts folder, written and not sent"], ["polls", "polls in a chat"], + ["posts", "posts and pages on a site or blog the owner publishes"], + ["channels", "the sites and social accounts the owner publishes posts on"], ["reactions", "reactions to a message"], ["recipients", "who a message goes to"], ["replies", "the automatic replies of a profile"], @@ -387,6 +390,7 @@ const singulars: [string, string][] = [ const views: [string, string][] = [ ["tree", "the parent and child hierarchy of stored sources"], + ["stats", "a thing's own numbers, such as a post's views, as read at each sync"], ["logs", "the log of a running process"], ["events", "what happened in a thing over time"], ["scheduled", "what is scheduled to happen"], @@ -463,5 +467,6 @@ export const VOCABULARY: Vocabulary = defineVocabulary({ ...KNOWLEDGE_FLAGS, ...CRM_FLAGS, ...SCHEDULE_FLAGS, + ...CONTENT_FLAGS, ], })