> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# marketing:create

> Create a marketing post as a YAML file with its own media folders.

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

```bash theme={null}
talos marketing:create [options]
```

## Examples

Create an empty post in the default `shared` module:

```bash theme={null}
talos marketing:create
```

Create a post with a title, body, and target platforms:

```bash theme={null}
talos marketing:create \
  --title="Talos 2.0 is out" \
  --content="Modules, workflows, and a Rust CLI." \
  --platform=X \
  --platform=LinkedIn
```

Add hashtags and attach media. The `--hashtag`, `--platform`, `--image`, and `--video` flags are repeatable:

```bash theme={null}
talos marketing:create \
  --title="Release week" \
  --hashtag=talos \
  --hashtag="#typescript" \
  --image=./assets/hero.png \
  --video=./assets/demo.mp4
```

Store the post in a specific module and mark it as ready for review:

```bash theme={null}
talos marketing:create --title="Launch" --module=blog --state="In Review"
```

## Options

| Option       | Description                                                                            | Default                   |
| ------------ | -------------------------------------------------------------------------------------- | ------------------------- |
| `--title`    | Post title.                                                                            | Empty                     |
| `--content`  | Post body.                                                                             | Empty                     |
| `--hashtag`  | Hashtag to attach. Repeatable. A leading `#` is stripped and empty values are dropped. | None                      |
| `--platform` | Target platform. Repeatable, case-insensitive, and deduplicated.                       | None                      |
| `--image`    | Path to a `.png` image copied into the post's `images/` folder. Repeatable.            | None                      |
| `--video`    | Path to a `.mp4` video copied into the post's `videos/` folder. Repeatable.            | None                      |
| `--state`    | Post state: `Todo`, `In Review`, or `Published`.                                       | `Todo`                    |
| `--module`   | Module the post is created in. Created if it does not exist.                           | `shared`                  |
| `--cwd`      | Project directory the post is created in.                                              | Current working directory |

## 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:

```
modules/<module>/marketing/
  ABC-123456/
    ABC-123456.yml
    images/
    videos/
```

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.

<Note>
  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.
</Note>
