A command-line tool for managing your TinyBones blog content.
- Create new blog posts (MDX or Markdown)
- Create new projects
- List existing blog posts and projects
- Update your blog with the latest TinyBones template
From your project root, run:
# Install the CLI tool dependencies and link it globally
npm run setup-cliOr manually:
# Navigate to the CLI directory
cd scripts/tinybones-cli
# Install dependencies
npm install
# Link the CLI to make it available globally
npm linkOnce installed, you can use the CLI with either:
# Using the npm script
npm run tb -- <command> <args>
# Or directly if linked globally
tinybones <command> <args>tinybones create new-postYou'll be prompted for:
- Title
- Description
- Format (MDX or Markdown)
The tool will create a new directory in src/content/blog/ with a slug based on the title and an index file with the current date as the publication date.
tinybones create new-projectYou'll be prompted for:
- Title
- Description
The tool will create a new directory in src/content/projects/ with a slug based on the title.
tinybones list postsDisplays a list of all blog posts with their titles, dates, and file paths.
tinybones list projectsDisplays a list of all projects with their titles, descriptions, and file paths.
tinybones updateUpdates your blog with the latest TinyBones template while preserving your content. This command:
- Backs up your content
- Fetches the latest template
- Applies the template changes
- Restores your content
- Creates a new branch with the changes
For more information, run:
tinybones --help