Skip to main content
Scaffold a social marketing post inside a module. The command generates a unique post id, creates a folder for it under the module’s marketing/ directory, copies any images and videos into that folder under generated names, and writes a YAML file describing the post.

Usage

Examples

Create an empty post in the default shared module:
Create a post with a title, body, and target platforms:
Add hashtags and attach media. The --hashtag, --platform, --image, and --video flags are repeatable:
Store the post in a specific module and mark it as ready for review:

Options

Platforms

--platform accepts any of X, Instagram, Facebook, LinkedIn, TikTok, Threads, WhatsApp, Telegram, Messenger, Discord, Reddit, and Medium. Matching ignores case and the value is rewritten to its canonical casing, so linkedin is stored as LinkedIn. twitter is accepted as an alias of X. An unrecognized platform aborts the command and prints the list of accepted values.

States

--state accepts Todo, In Review, and Published, ignoring case. in-review and inreview are accepted as aliases of In Review. An unrecognized state aborts the command.

Generated files

Each post gets its own directory named after a generated ABC-123456 id, unique among the posts already in the module:
Media files are copied in under generated names rather than their original ones. Whichever of images/ and videos/ ends up empty receives a .gitkeep so the folder survives version control. The YAML file carries the post’s id, module, title, content, hashtags, images, videos, platforms, and state. The images and videos keys list the generated file names, not the paths you passed in.
Media is copied before the YAML is written. If an image or video cannot be copied — for example, a path that does not exist or has the wrong extension — the command reports the error and removes the post directory, leaving nothing behind.