@barbapapazes/content-creation
v0.16.0
Published
A CLI tool to streamline multi-platform content creation by generating dated directories with content files for LinkedIn, X (Twitter), YouTube, and Instagram.
Downloads
972
Readme
@barbapapazes/content-creation
A CLI tool to streamline multi-platform content creation by generating dated directories with content files for LinkedIn, X (Twitter), YouTube, and Instagram.
Features
- Create dated directory structure (YYYY/MM/DD format)
- Support for multiple content types: LinkedIn, X, YouTube, Instagram
- User-friendly date selection (up to 7 days ahead or custom date)
- Multi-select content types to create multiple files in one run
- Config-driven templates for each content type
- Never overwrites existing files (skip if exists behavior)
- Generate separate index files per content type
- Link images to LinkedIn post frontmatter
- Create resource directories (articles, videos, audio)
Installation
npm install -g @barbapapazes/content-creationUsage
Create Content Directory
Create a dated directory with content files for selected platforms:
# Create content directory in current working directory
content-creation
# Prompts you to select: LinkedIn, X, YouTube, and/or Instagram
# Create content directory at a specific path
content-creation --path /path/to/contentThe tool will prompt you to:
- Enter a title (shared across all selected types)
- Select one or more content types
- Answer type-specific questions:
- LinkedIn: Whether to include video and images
- YouTube/Instagram: Whether to create script and description files
- Choose a date
Content Files by Type
Each content type creates specific files:
- LinkedIn:
linkedin.md,linkedin-script.md(if video planned) - X:
x.md - YouTube:
youtube.md,youtube-script.md,youtube-description.md - Instagram:
instagram.md,instagram-script.md,instagram-description.md
All main files (*.md) include frontmatter with at least a title field for indexing.
Important: Files are never overwritten. If a file already exists, it will be skipped.
Create Index Files
Generate index files for each content type found in your dated folders:
# Generate index files in current directory
content-creation create-index
# Generate index files at a specific path
content-creation create-index --path /path/to/contentThis command scans your YYYY/MM/DD directory structure and creates:
linkedin-posts.md- Index of all LinkedIn postsx-posts.md- Index of all X postsyoutube-videos.md- Index of all YouTube videosinstagram-posts.md- Index of all Instagram posts
Each index file contains:
# LinkedIn Posts
_Generated on 1/31/2026_
Total posts: 15
- [Understanding AI Agents](2026/01/20/linkedin.md) - _January 20, 2026_
- [Deep Dive into RAG](2026/01/15/linkedin.md) - _January 15, 2026_
...Link Images
Scan recent LinkedIn posts and link images to their frontmatter:
# Link images in current directory
content-creation link-images
# Link images at a specific path
content-creation link-images --path /path/to/contentCreate Resource
Create a resource directory with article, video, or audio content:
# Create resource in current directory
content-creation resource
# Create resource at a specific path
content-creation resource --path /path/to/resourcesSchedule Reminder
Schedule a reminder for X (Twitter) content to be posted at 11:00 AM UTC on the date specified in the folder path:
# Schedule reminder for X content
content-creation schedule-reminder
# Schedule reminder at a specific path
content-creation schedule-reminder --path /path/to/contentThe command will:
- Scan your directory for dated folders containing
x.mdfiles - Prompt you to select which content to schedule
- Check if the content is already scheduled (exits early if
scheduled: truein frontmatter) - Extract the tweet content from
x.md - Calculate the scheduled time (11:00 AM UTC based on the folder date: YYYY/MM/DD)
- Send a POST request to your automation endpoint
- Update the frontmatter with
scheduled: true - Display a confirmation message with the scheduled date/time
Required Configuration: You must set up the following environment variables in a .env file:
AUTOMATION_ENDPOINT=https://automation.soubiran.dev/trigger
CF_ACCESS_CLIENT_ID=your-client-id-here
CF_ACCESS_CLIENT_SECRET=your-client-secret-hereSee .env.example for a template.
Configuration
You can configure the tool using a configuration file. Create one of the following files:
- Local config:
content-creation.config.{ts,js,mjs,json}in your project root - Global config:
~/.content-creationrc(JSON format)
Configuration Options
export default {
// Array of thematic areas (reserved for future features)
thematic: ['JavaScript', 'TypeScript', 'Node.js'],
// Base directory for external template files (optional)
templatesDir: '~/.config/content-creation/templates',
// Templates configuration per content type
templates: {
linkedin: {
body: '', // Inline template for body content
bodyPath: 'linkedin-body.md', // Or path to template file
footer: '\n\n---\n\nCustom footer text', // Inline footer
footerPath: 'linkedin-footer.md', // Or path to footer file
},
x: {
body: '',
bodyPath: 'x-body.md',
},
youtube: {
body: '',
script: '',
description: '',
// Or use paths: bodyPath, scriptPath, descriptionPath
},
instagram: {
body: '',
script: '',
description: '',
},
},
// Scheduling configuration (optional, can also be set via environment variables)
scheduling: {
automationEndpoint: 'https://automation.soubiran.dev/trigger',
cfAccessClientId: 'your-client-id',
cfAccessClientSecret: 'your-client-secret',
},
}Template Resolution
For each template field (body, footer, script, description):
- If
*Pathis specified, it's resolved relative totemplatesDiror the config file location - Otherwise, the inline string value is used
- If neither is specified, defaults are used (LinkedIn has a default footer)
Example: Customizing LinkedIn Footer
Create a content-creation.config.ts file:
import { defineConfig } from '@barbapapazes/content-creation'
export default defineConfig({
templates: {
linkedin: {
footer: '\n\n---\n\nCustom signature here! 🚀',
},
},
})Or store templates in external files:
import { defineConfig } from '@barbapapazes/content-creation'
export default defineConfig({
templatesDir: '~/.config/content-creation/templates',
templates: {
linkedin: {
footerPath: 'linkedin-footer.md',
},
youtube: {
descriptionPath: 'youtube-description.md',
},
},
})Then create ~/.config/content-creation/templates/linkedin-footer.md:
---
Subscribe for more content! 🎯JSON Configuration
For a JSON config file (~/.content-creationrc):
{
"thematic": ["JavaScript", "TypeScript", "Node.js"],
"templates": {
"linkedin": {
"footer": "\n\n---\n\nFollow for more! 🚀"
}
}
}Directory Structure
The CLI creates a nested directory structure organized by date:
base-path/
└── YYYY/ # Year folder
└── MM/ # Month folder
└── DD/ # Day folder
├── linkedin.md
├── linkedin-script.md
├── x.md
├── youtube.md
├── youtube-script.md
├── youtube-description.md
├── instagram.md
├── instagram-script.md
└── instagram-description.mdExample: Running the CLI on January 31, 2026 and selecting all types will create a 2026/01/31/ directory with all the relevant files.
License
MIT
